Consider the quadratic expression :
$$ f(x) = x^2 +(a+2)x + (a^2 – a +2 ) $$ given is that $a , p, q , (p<q)$ are real numbers and p and q are the roots of the equation $f(x)=0$.
Q1) find the maximum value of q.
Q2) find the maximum value of p.
Solution Q1) since q is a root of f(x), we have $f(q) = 0$. This gives:
$$ q^2 + (a+2)q + a^2 – a + 2 = 0 $$
Writing this as a quadratic in a we have
$$ a^2 + (q-1)a + q^2 +2q +2 = 0 $$
Since a is given to be real this quadratic must have its determinant greater than or equal to zero, which gives:
$$ (q-1)^2 -4(1)(q^2 +2q +2) \ge 0 $$
Which gives:
$$ -3q^2 -10q -7 \ge 0 $$
which gives: $q \in [-7/3 , -1]$ giving the maximum value of $q$ (the larger root ) to be -1.
I am however stuck with how to go about formulating the maximum value of the smaller root.
Best Answer
Thanks to mathlove's comments to the original query which indicated that I had misinterpreted the problem. The answer has been corrected.
I upvoted the original query, for the very good work. However, I prefer the
approach of solving for $p$ and $q$, given any fixed value of $a$, and then analyzing further.
$\{p,q\} = \frac{1}{2} \times [-(a +2) \pm \sqrt{(a+2)^2 - 4(a^2 - a + 2)}]$
$ = \frac{1}{2} \times [-(a +2) \pm \sqrt{(a^2 + 4a + 4) - 4(a^2 - a + 2)}]$
$ = \frac{1}{2} \times [-(a +2) \pm \sqrt{(-3)a^2 + 8a - 4)}].$
Since $p,q$ are required to be real, with $p < q$, it is required that $h(a) = [(-3)a^2 + 8a - 4)]$ must be positive.
That is, if $h(a) = 0$, this would cause $p = q$, which is forbidden by the premise to the problem.
Solving for $h(a) = 0$ gives $a = \frac{1}{-6} [-8 \pm \sqrt{64 - 48}] $
$= \frac{1}{-6} [-8 \pm \sqrt{16}] $
$= \frac{1}{-3} [-4 \pm 2] $
This means that $a$ must be in the open interval $(\frac{2}{3}, 2).$
Note : It is possible that different values for $a$ might be used to maximize the values for $q$ and $p$.
For $a$ in the range, $(\frac{2}{3}, 2).$
The larger root and the smaller root must be separately maximized. What needs to be maximized are the two values of
$g(a) = [-(a +2) \pm \sqrt{(-3)a^2 + 8a - 4)}]$.
Unfortunately, I was never taught any pre-calculus method for maximizing the two roots of $g(a)$. In terms of calculus, we have that
$\displaystyle g'(a) = -1 \pm \left[\frac{1}{2} \times \frac{-6a + 8}{\sqrt{(-3)a^2 + 8a - 4)}}\right].$
I must find all values of $a$ such that $g'(a) = 0.$
In order to do this, I must solve
$(-1) \times \sqrt{(-3)a^2 + 8a - 4} \pm \left[\frac{1}{2} \times (-6a + 8)\right] = 0.$
This means that $(4) \times [(-3)a^2 + 8a - 4)]$ must = $(-6a + 8)^2.$
This means that $(-12a^2 + 32a - 16)]$ must = $(36a^2 -96a + 64).$
This means that $0 = (48a^2 -128a + 80).$
This means that $0 = (3a^2 -8a + 5).$
This means that $a = \frac{1}{6} \times \left[ 8 \pm \sqrt{64 - 60}\right].$
This means that $a = \frac{1}{6} \times \left[ 8 \pm 2\right].$
This means that the only values for $a$ that might yield $g'(a) = 0$ are
$a = \frac{10}{6}$ or $a = 1.$
Technically, Calculus would require that I now take the 2nd derivative of $g(a).$
However, that is very messy and fortunately, there is a shortcut.
In addition to the possible critical points of
$a = \frac{10}{6}$ or $a = 1$
the boundary points of $a = \frac{2}{3}$ and $a = 2$
can also be considered.
However, when considering the boundary points of $a = \frac{2}{3}$ and $a = 2$, although $a$ may approach one of the boundary points, it can never equal either of the boundary points.
This means that I have to calculate the two roots, $p$ and $q$ for each of the 4 values of $a$ above. Then, I must select the maximum value for the larger root $q$ and the maximum value for the smaller root $p$, when $a$ is restricted to the open interval $(2/3, 2).$
Setting $a = \frac{2}{3}$ yields $\{q,p\}$ of
$ = \frac{1}{2} \times \left[-\frac{8}{3} \pm \sqrt{\frac{-12}{9} + \frac{16}{3} - 4}\right]$
$ = \frac{1}{2} \times \left[-\frac{8}{3} \pm \sqrt{\frac{-12 + 48 - 36}{9}}\right]$
$ = [-\frac{4}{3} \pm 0].$
In fact, this means that as $a$ approaches 2/3, the smaller root will approach (-4/3) from below and the larger root will approach (-4/3) from above.
.....
Setting $a = 1$ yields $\{q,p\}$ of
$ = \frac{1}{2} \times \left[-3 \pm \sqrt{-3 + 8 - 4}\right]$
$ = \frac{1}{2} \times \left[-3 \pm 1\right]$
$ = \{-1, -2\}.$
.....
Setting $a = \frac{5}{3}$ yields $\{q,p\}$ of
$ = \frac{1}{2} \times \left[-\frac{11}{3} \pm \sqrt{\frac{-75}{9} + \frac{40}{3} - 4}\right]$
$ = \frac{1}{2} \times \left[-\frac{11}{3} \pm \sqrt{\frac{-75 + 120 - 36}{9}}\right]$
$ = \frac{1}{2} \times \left[-\frac{11}{3} \pm \sqrt{\frac{9}{9}}\right]$
$ = \frac{1}{2} \times \left[-\frac{11}{3} \pm 1\right]$
$ = \{\frac{-4}{3}, \frac{-7}{3}\}.$
.....
Setting $a = 2$ yields $\{q,p\}$ of
$ = \frac{1}{2} \times \left[-4 \pm \sqrt{-12 + 16 - 4}\right]$
$ = \frac{1}{2} \times \left[-4 \pm 0\right]$
$ = \left[-2 \pm 0\right]$
In fact, this means that as $a$ approaches 2, the smaller root will approach (-2) from below and the larger root will approach (-2) from above.
The largest root, $q$ attains the maximum value of $-1$, when $a = 1$. The smaller root $p$ approaches $-4/3$ from below, as $a$ approaches 2/3.
Addendum
As mathlove indicated in a comment to the original query, the smaller root $p$ never attains a maximum value in the open interval for $a$ of (2/3, 2). I explain this as follows:
First of all, although the boundary points of $a = 2/3$ and $a = 2$ seem to be permissible, the original problem specifies the maximum value for $p$, when it is required that $p < q$. This requirement means that the only permissible values of $a$ are the open interval $(2/3, 2)$ rather than the closed interval $[2/3,2].$
With respect to the value of $a$, if you examine the 4 pertinent points in my answer, (2/3), 1, (5/3), 2, keeping in mind that the only possible values of $a$ that might cause $g'(a) = 0$ are $a=1$ and $a = (5/3)$, you see that :
$E_1:$
as $a$ approaches $2/3$ from above, the smaller root, $p$, approaches -4/3 from below.
$E_2:$
In fact, for no value of $a$ in the open interval $(2/3, 2)$ does $p$ actually $= -4/3.$