Write an expression in java for
5x²+2y/x+y
Answers
Answer:
factorise completely the following polynomial 3x
3
+2x
2
−19x+6
Medium
Video Explanation
Solution To Question ID 578138
Answer
Let f(x)=3x
2
+2x
2
−19x+6
Using hit and trial method,
f(1)=3+2−19+6
=0
f(−1)=−3+2+19+6
=0
f(2)=24+8−38+6=0
∴(x−2) is a factor of f(x).
3x
2
+8x−3
Now, x−2
)3x
2
+2x
2
−19x+6
3x
2
−6x
----------------------------------
8x
2
−19x
8x
2
−16x
------------------------------------
−3x+6
−3x+6
-------------------------------------
x
--------------------------------------
To factorise 3x
2
+8x−3
=3x
2
+9x−x−3
=3x(x+3)−1(x+3)
=(3x−1)(x+3)
Hence 3x
3
+2x
3
−19x+6=(x−2)(3x−1)(x+3)
Answer
Answer:
The required Java expression for (5x²+2y)/(x+y) is :-
int x , y;
double z = (5*Math.pow(x,2)+2*y)/(x+y)