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