General simplification
[src]
$$- y^{2} + y + 2$$
$$\left(x - 2\right) \left(x + 1\right)$$
The perfect square
Let's highlight the perfect square of the square three-member
$$\left(- y^{2} + y\right) + 2$$
To do this, let's use the formula
$$a y^{2} + b y + c = a \left(m + y\right)^{2} + n$$
where
$$m = \frac{b}{2 a}$$
$$n = \frac{4 a c - b^{2}}{4 a}$$
In this case
$$a = -1$$
$$b = 1$$
$$c = 2$$
Then
$$m = - \frac{1}{2}$$
$$n = \frac{9}{4}$$
So,
$$\frac{9}{4} - \left(y - \frac{1}{2}\right)^{2}$$
Assemble expression
[src]
$$- y^{2} + y + 2$$
Rational denominator
[src]
$$- y^{2} + y + 2$$
$$- \left(y - 2\right) \left(y + 1\right)$$
Combining rational expressions
[src]
$$y \left(1 - y\right) + 2$$