# Both roots of a quadratic equation lying within limits

Homework Statement:
Suppose ##x_1## and ##x_2## are roots of the quadratic equation ##x^2+2(k-3)x+9=0## ##\left( x_1 \neq x_2 \right)##. For what values of ##k## do the inequalities ##-6<x_1<1## and ##-6<x_2<1## hold true?
Relevant Equations:
(1) For real roots of a quadratic equation ##ax^2+bx+c=0##, its discriminant ##\mathscr{D} = b^2-4ac \geq 0##.
(2) The two roots ##[x_1, x_2]## of the quadratic equation above are equal to ##x_{1,2}= \frac{-b\pm \sqrt{b^2-4ac}}{2a}##. We can have ##x_1## as the larger of the two roots : ##x_1>x_2##. This would imply ##x_1## takes the plus sign ##+## and ##x_2## the minus sign ##-## in the expression for the roots.
Given equation and conditions: ##\boldsymbol{x^2+2(k-3)x+9=0}##, with roots ##\boldsymbol{(x_1,x_2)}##. These roots satisfy the condition ##\boldsymbol{-6<x_1,x_2<1}##.

Question : ##\text{What are the allowable values for}\; \boldsymbol{k}?##

(0) Let me take care of the determinant first, for real roots. The determinant ##\mathscr {D} = 4(k-3)^2-4\times 9 \geq 0\Rightarrow (k-3)^2>9## which would imply that either ##k-3 \geq 3## or ##k-3 \leq -3##. These lead to ##\boxed{k \geq 6\; \text {OR}\; k \leq 0}##.

(1) Let us have the equation again : ##x^2+2(k-3)x+9=0##. Bigger root, as per the given condition, ##x_1 = \frac{-2(k-3)+\sqrt{\mathscr{D}}}{2}<1##. Now since the discriminant ##\mathscr{D} \geq 0##, this implies ##-(k-3)<1\Rightarrow k-3 >1 \Rightarrow k >4##. But from point (0) above, we must have ##k \geq 6##. Hence, taking the stronger of the two requirements, this condition yields ##\boxed{k\geq 6}##.

Now here's the interesting bit. The bigger root ##x_1## also has a lower desired limit as per the problem, ##-6##. However, so does the smaller root ##x_2##. If I can show the cases of ##k## for which the smaller root ##x_2 > -6##, clearly for those values, the larger root will also be ##> -6##. I hope my reasoning is sound, but it most likely isn't, for it gives me the wrong answer as I will quote below.

(2) Now the smaller root ##x_2 = \frac{-2(k-3)-\sqrt{\mathscr{D}}}{2}>-6##. Since the discriminant ##\mathscr{D} \geq 0##, it implies that ##-(k-3)> -6\Rightarrow k-3 < -6 \Rightarrow \boxed{k<-3}##. We find that this result is stronger than the one in point (0) earlier, so we stick with it.

Hence, my answers are, putting the results of (0), (1) and (2) : ##\boxed{k \geq 6\; \text{OR} \; k<-3}##.

Answer from the book : ##\boxed{x \in (6;6.75)}## ##\Rightarrow 6 \le x \le 6.75##.

A help would be welcome.

besi

PeroK
Homework Helper
Gold Member
2020 Award
Hence, my answers are, putting the results of (0), (1) and (2) : ##\boxed{k \geq 6\; \text{OR} \; k<-3}##.

Answer from the book : ##\boxed{x \in (6;6.75)}## ##\Rightarrow 6 \le x \le 6.75##.

A help would be welcome.
Let's try ##k = -4##, which is one of your solutions. This gives us: $$x^2 -14x + 9 = 0$$ and $$x = 7 \pm \frac 1 2 \sqrt{160}$$ And we see that the larger root is ##> 1##. So, your solution is not right.

Now, let's look at the larger root. We have: $$x_2 = 3 -k + \sqrt{k^2 - 6k}$$ We can see that ##k## must be positive (it can't be negative as then ##x_2 > 3##) and we must have ##k > 6## to have two real roots. And, in fact, if we check ##k = 6## we get ##x_2 = -3##, which is okay.

Is ##x_2 < 1## whenever ##k > 6##?

Then, look at the smaller root and follow the same process to check for ##x_1 > -6##.

besi
epenguin
Homework Helper
Gold Member
bb are you sure you are not getting your ##x## and your ##k## mixed up there at the end.
Again I seem to be getting the same numbers as the book from a combination of discriminant and the quadratic having to be ≥0 at the extremes of the range of the roots.

Last edited:
epenguin
Homework Helper
Gold Member
That is, if we call the quadratic P(x) then the problem requires P(-6) and P(1) to be positive, necessarily. It is also necessary that the discriminant be positive. But altogether these conditions are necessary but not sufficient for a root between -6 and 1, and I never much liked this discriminant anyway.

So in amendment of what I wrote yesterday evening, for a root between -6 and 1 what further condition additional to the first two makes all three together necessary and sufficient?

By the way I think it is, though not fundamental to the problem, a small convenience for calculation to note that your quadratic without the k term is a perfect square.

PeroK
Homework Helper
Gold Member
2020 Award
That is, if we call the quadratic P(x) then the problem requires P(-6) and P(1) to be positive, necessarily. It is also necessary that the discriminant be positive. But altogether these conditions are necessary but not sufficient for a root between -6 and 1, and I never much liked this discriminant anyway.

So in amendment of what I wrote yesterday evening, for a root between -6 and 1 what further condition additional to the first two makes all three together necessary and sufficient?

By the way I think it is, though not fundamental to the problem, a small convenience for calculation to note that your quadratic without the k term is a perfect square.
I'm not sure how much this helps. A simple approach is to look at the two roots from the quadratic formula, as in post #2. Looking at the larger root we already have the condition ##k > 6##.

Looking at the smaller root should lead quickly to ##k < 6.75##, as per the book answer.

That is, if we call the quadratic P(x) then the problem requires P(-6) and P(1) to be positive, necessarily.

Without going into the solution of the problem, can you explain to me why the above should be so?

PeroK
Homework Helper
Gold Member
2020 Award
Without going into the solution of the problem, can you explain to me why the above should be so?
The coefficient of ##x^2## is ##1##. So, the graph is a U shape. If the roots lie between ##-6## and ##1##, then (draw a graph to see this) ##P(-6) > 0 ## and ##P(1) > 0##.

Also, if it has two real roots and either is outside that range, then either ##P(-6) < 0## or ##P(1) < 0##.

That's another way to do the problem.

epenguin
Homework Helper
Gold Member
PeroK has given the answer I would have.

i'd say good students get encouraged to throw around expressions like discriminants like you have, but maybe it is sometimes too clever. Anyway discriminants are important and useful but take your only so far and are not the only thing. You do need a positive discriminant here, but in general this is necessary but not sufficient for this problem. Rather you need some third condition that is guaranteed beforehand to give you a third condition such that taken together with the first two are sufficient and necessary. It seems to me that such a condition is found in the "relevant equations" of your previous problem, and will give you a condition not mentioned so far (and more restrictive as must be expected).

If I am right I am sure PeroK will come round.

Last edited:
PeroK
PeroK
Homework Helper
Gold Member
2020 Award
If I am right I am sure PeroK will come round.
The graphical method is fine but I recall this from a previous homework thread:

This is straightforward: if both roots of $ax^2 + bx + c = 0$ are to be less than or equal to $C$ then (1) the roots must be real, and (2) the larger root $$\frac{-b + \sqrt{b^2 - 4ac}}{2a} \leq C.$$. On the other hand, if both roots are to be greater than or equal to $C$ then (1) the roots must be real, and (2) the smaller root
$$\frac{-b - \sqrt{b^2 - 4ac}}{2a} \geq C.$$.

I was trying to guide the OP back to the simplicity of this method.

epenguin
Homework Helper
Gold Member
I withdraw previous disagreements and now agree that 6 < k < 6.75 is the only necessary and sufficient condition for two roots in the interval -6 < x < 1.

(In fact I think the superior root of the two can never be greater than -3/2 .)

epenguin
Homework Helper
Gold Member
I did not previously really follow bb's argument very closely as I worked the thing out my own way which is somewhat different. Going through it now it looks to me OK. Just those scruples at (2) and end of (1) in #1 are misplaced as he has overlooked in the argument that when k = 3, Δ < 0. He has not stated a maximum value of k yet but this corresponds to P(-6) = 0.

Without restrictipn, i.e. whatever the lower root, the upper root can never be less than -3.

Maybe we could take this problem as solved, if perhaps not exhausted?

Last edited:
I withdraw previous disagreements and now agree that 6 < k < 6.75 is the only necessary and sufficient condition for two roots in the interval -6 < x < 1.
I did not previously really follow bb's argument very closely as I worked the thing out my own way which is somewhat different. Going through it now it looks to me OK.

Sorry for coming in late but for me the problem is far from solved. My answers are wrong and yet I don't see where have I gone wrong in my procedure in post#1 above.

What I find intriguing but hard to follow is the strategy that both you @epenguin and @PeroK is following, namely that when the root has an upper value, the value of the polynomial must lie either above or below it. The book says it too, but I fail to get it. I type from the book (in red below) and ask you to explain when you find the time. Thanks a lot. I will return to the details of the problem above wehn I have followed this line if reasoning.

[From the book : Problem Book in High School Mathematics - Prilepko (1985) ]

The function ##f(x)= ax^2+bx+c\; a>0##, has roots ##x_1, x_2## confined between the numbers ##p, q## if and only if the following conditions are fulfilled :

1. The discriminant ##\mathscr {D} = b^2-4ac >0##.
I get this, though I put ##b^2-4ac \geq 0##. The roots have been given to be distinct, so the discriminant must be greater than zero.

2. ##f(p)>0, f(q)>0##.
This is what the two of you have been telling me, but am stuck. Let me see. I plot a certain quadratic function on the right with ##a>0## and call its roots ##x_1, x_2##. Clearly, ##f(x_1)=f(x_2)=0##. If both ##q<x_1,x_2<p##, then we have ##f(p)>0## and ##f(q)>0## as I can from the graph. Ok so I get this point too.

3. ##p < -\frac{b}{2a} < q##. I get these too, but on using them above in my solution in post#1, they didn't lead me to the right answer. As for the justification of this point, we have the lower limit ##p = \frac{-b-\sqrt{\mathscr{D}}}{2a}##. Now since the discriminant ##\mathscr{D} >0##, we are removing something positive from ##-\cfrac{b}{2a}##, hence what remains ##p < -\cfrac{b}{2a}##.
Likewise the upper limit ##q = \frac{-b+\sqrt{\mathscr{D}}}{2a}##. Since we have ##\mathscr{D} >0##, taking that away will mean what remains, ##-b/2a## less than ##p## : ##-\cfrac{b}{2a} < p##. Hence, putting the two together, we have ##p < -\frac{b}{2a} < q##.

If my understanding and reasoning above is correct, I would proceed with the given problem above and see whether I get the right answers. Still, just to tell you for now, I find that one can use either point 2 or 3 above. 1 is essential. Do points 2 and 3 both need to be used? I used point 3 and went astray. Thank you for your time.

PeroK
Homework Helper
Gold Member
2020 Award
Yes, you need all three conditions. If we assume condition 1 holds, then we have two real roots (##x_1, x_2##) on your graph. We need ##p < x_1##, which is equivalent to ##p < -\frac b {2a}## and ##f(p) > 0##. And, we need ##q > x_2##, which is equivalent to ##q > -\frac b {2a}## and ##f(q) > 0##

In my view, you are diving into too much algebra if you are looking for a graphical solution.

Problem statement : Let me copy and paste from the book directly, than type.

Solution :

(0)
The discriminant of the quadratic ##\mathscr{D} = 4(k-3)^2-36 > 0\Rightarrow (k-3)^2>9\Rightarrow k-3>3\; \text{or}\; k-3<-3##. These lead to the solutions : ##\underline{k<0\;\; \text{or} \;\; k>6}##.

(1) The smaller of the two roots ##x_1 > -6##. Hence we have, from conditions shown above, ##\frac{-b}{2a}>-6\Rightarrow -\frac{2(k-3)}{2}>-6\Rightarrow \frac{k-3}{2}<3\Rightarrow k-3<6\Rightarrow k<9##. But also, from condtions shown above, for this case ##f(-6) >0## where ##f(x)## is the given quadratic equation. This implies, on plugging the value of ##x=6## in the equation, ##36-12(k-3)+9>0\Rightarrow 12k<81 \Rightarrow k < 6.75##. Since this condition is more restrictive than the one just found (##k<9##), we take this and combine this with the condition(s) ontained in case (0) above to obtain, for the lower limit, ##\boxed{6<k<6.75}##.

(2) The larger of the two roots ##x_2<1##. Thus, from conditions above, ##-\frac{b}{2a}<1 \Rightarrow \frac{-2(k-3)}{2}<1\Rightarrow k-3>1 \Rightarrow k>4##. Also, for this case, we must have ##f(1) > 0\Rightarrow 1+2k-6+9>0 \Rightarrow 2k+4>0 \Rightarrow k>-2##.
The first solution (k>4) actually leads to ##k>6## owing to positive discriminant. The second solution can be grouped with the case (0) to give : ##\boxed{-2<k<0}##.

I find that I have two solutions, given in the boxes above. The first box agrees with the answer in the book. What is wrong about the second box?

PeroK
Homework Helper
Gold Member
2020 Award
Problem statement : Let me copy and paste from the book directly, than type.

View attachment 279457

Solution :

(0)
The discriminant of the quadratic ##\mathscr{D} = 4(k-3)^2-36 > 0\Rightarrow (k-3)^2>9\Rightarrow k-3>3\; \text{or}\; k-3<-3##. These lead to the solutions : ##\underline{k<0\;\; \text{or} \;\; k>6}##.

(1) The smaller of the two roots ##x_1 > -6##. Hence we have, from conditions shown above, ##\frac{-b}{2a}>-6\Rightarrow -\frac{2(k-3)}{2}>-6\Rightarrow \frac{k-3}{2}<3\Rightarrow k-3<6\Rightarrow k<9##. But also, from condtions shown above, for this case ##f(-6) >0## where ##f(x)## is the given quadratic equation. This implies, on plugging the value of ##x=6## in the equation, ##36-12(k-3)+9>0\Rightarrow 12k<81 \Rightarrow k < 6.75##. Since this condition is more restrictive than the one just found (##k<9##), we take this and combine this with the condition(s) ontained in case (0) above to obtain, for the lower limit, ##\boxed{6<k<6.75}##.

(2) The larger of the two roots ##x_2<1##. Thus, from conditions above, ##-\frac{b}{2a}<1 \Rightarrow \frac{-2(k-3)}{2}<1\Rightarrow k-3>1 \Rightarrow k>4##. Also, for this case, we must have ##f(1) > 0\Rightarrow 1+2k-6+9>0 \Rightarrow 2k+4>0 \Rightarrow k>-2##.
The first solution (k>4) actually leads to ##k>6## owing to positive discriminant. The second solution can be grouped with the case (0) to give : ##\boxed{-2<k<0}##.

I find that I have two solutions, given in the boxes above. The first box agrees with the answer in the book. What is wrong about the second box?

You've found three conditions that must all hold: ##\boxed{6<k<6.75}##, ##k > 4 ## and ##k > -2##.

If all three hold, then that reduces to the first condition, as it's a subset of the other two.

Thank you. In response to your earlier post (#9), I agree that the same problem can be done using the idea that was given in the earlier thread : viz. that ##\frac{-b + \sqrt{b^2 - 4ac}}{2a} \leq C_1## where C1 is the upper limit for the roots and that ##\frac{-b - \sqrt{b^2 - 4ac}}{2a} \geq C_2## where C2 is the lower limit.

I think it is better to use this method than the one I did. I'd like to give this a try and see whether I arrive at the same answers.

P.S. : Of course both those conditions are only additional to the (separate) one for real roots that demand a positive-definite discriminant.

epenguin
Homework Helper
Gold Member
This was my way: in part it is "back to basics" and I like the way the factors of the discriminant emerge separately.

Call this quadratic ##P(k, x)## ; it can be written
$$P\left( k,x\right) =\left( x-3\right) ^{2}+2kx$$
We easily see that there is a double root (##x=3##) when ##k=0## (red curve below) and two (positive) real roots when ##k<0##.
The quadratic can also be written
$$P\left( k,x\right) =\left( x+3\right) ^{2}+2\left( k-6\right) x$$
We also see that it has a double root (##x=-3##) when ##k=6## (blue curve) and two real roots when ##k>6## . Both of the algebraic factors of the discriminant, ##k## and ##(k-6)## have now emerged.

Note every curve ##P(k, x)## of the system has a mirror image ##P(k', -x)## also in the system for which ##k'=-(k+6)##. Several of them illustrated below.

Curves occupying most of positive side are for ##k=0 (red), -0.25, -0.5, -0.75##; those mostly on negative side ##k=6 (blue), 6.25, 6.5, 6.75(green).

Real roots of ##P## are either both positive or both negative. You can see this from the fact that all the parabolas pass through the fixed point ##(0, 9)## or otherwise. So we don't have to worry about the interval ##-6≤x≤1## but only ##-6≤x<0##. It is very easy to show that no curve of the family intersects any other except at the point ##x=0##. You can maybe see that hence that one negative root must be less than and one greater than ##-3##. The limit x1=-6 set for the lower root gave us ##k=\dfrac {27}{4}##
$$P\left( \dfrac {27}{4},x\right) =x^{2}+\dfrac {15x}{2}+9$$
Already knowing ##(x+6)## is a factor of this we easily factor it into
$$\left( x+6\right) \left( x+\dfrac {3}{2}\right)$$
and conclude that the greater root is ##-3≤x≤-3/2##

As for the interval ##0<x≤1##, the quadratic can have one root in this interval but the second one would be >3, so the set conditions are not satisfied in this interval.

Hope this helps.

Last edited:
PeroK
I must apologise to @epenguin for I did not follow your method above. I have never seen a quadratic equation problem solved in this way. I need to go over it again to make sense, in particular where you say how factors of the discriminant emerge as you change the value of the constant ##k##.

I return here for something more modest - solve the problem in a way that I hope is easier than the method I have tried in post #14 above. I find that I have obtained the same answer(s) but there is a doubt that remains of which I'd like to ask you when am done.

Problem statement :

Attempt :

(0)
The discriminant of the quadratic ##\mathscr{D} = 4(k-3)^2-36 > 0\Rightarrow (k-3)^2>9\Rightarrow k-3>3\; \text{or}\; k-3<-3##. These lead to the solutions : ##\underline{k<0\;\; \text{or} \;\; k>6}##.

(1) The quadratic equation ##x^2+2(k-3)x+9=0## has two roots ##[x_1,x_2]##. Let us assume the root ##x_2>x_1##. The smaller root ##x_1 = \frac{-2(k-3)-\sqrt{4(k-3)^2-36}}{2}>-6## by the lower limit that both roots must satisfy. I am assuming that if the smaller root is "above" this lower limit, clearly the bigger root will be also. Continuing, we have ##-k+3-\sqrt{k^2-6k}>-6\Rightarrow -k+9>\sqrt{k^2-6k}\Rightarrow 81-18k+\cancel{k^2}>\cancel{k^2}-6k\Rightarrow 12k < 81 \Rightarrow \underline{k < 6.75}##.

(2) Likewise, the upper root ##x_2 < 1 \Rightarrow 3-k+\sqrt{(k-3)^2-9}<1## on factoring out "2" from both above and below the fraction. Continuing ##3-k+\sqrt{k^2-6k}<1\Rightarrow \sqrt{k^2-6k}<k-2\Rightarrow \cancel{k^2} - 6k < \cancel{k^2} -4k+4\Rightarrow 2k>-4\Rightarrow \underline{k>-2}##.

Looking at cases (0), (1) and (2), we find that the allowed values of ##k## are : ##\boxed{-2<k<0\; \text{and}\; 6<k<6.75}##.

The second solution is fine.

But this is where my confusion exists. Why are we not considering the values from ##-2<k<0##?
I understand from @PeroK 's post #15 above that the first condition (##6<k<6.75##)is a subset of the second(##-2<k<0##). But the second solution gets "cut off" at 0, owing to the requirement of real roots (
see point 0 above). This makes both intervals exclusive. How is the first then a subset of the latter?

PeroK
Homework Helper
Gold Member
2020 Award
(2) Likewise, the upper root ##x_2 < 1 \Rightarrow 3-k+\sqrt{(k-3)^2-9}<1## on factoring out "2" from both above and below the fraction. Continuing ##3-k+\sqrt{k^2-6k}<1\Rightarrow \sqrt{k^2-6k}<k-2\Rightarrow \cancel{k^2} - 6k < \cancel{k^2} -4k+4\Rightarrow 2k>-4\Rightarrow \underline{k>-2}##.
If ##k < 0## then ##x_2 > 3##, which I pointed out in post #2. Therefore, condition (2) rules out any solutions for ##k < 0##.

PeroK
Homework Helper
Gold Member
2020 Award
Looking at cases (0), (1) and (2), we find that the allowed values of ##k## are : ##\boxed{-2<k<0\; \text{and}\; 6<k<6.75}##.
Also, as you have an "and" there, that implies there are no solutions. Since ##k## cannot satisfy both of those inequalities. It should be an "or". In which case, you are simply missing the calculation that excludes the first interval. In other words, you are still only half way to the solution. You're missing the calculation that ##k < 0## is impossible.

If ##k < 0## then ##x_2 > 3##, which I pointed out in post #2. Therefore, condition (2) rules out any solutions for ##k < 0##.

Yes I understand this from your post #2. However, this makes problems like these quite difficult. I say this because it means that even after solutions are got, we need to plug them back for various cases to check whether they violate (earlier) requirements or not. What goes well for a root ##x_1## may not go for root ##x_2##.

I suppose this is how it is. We have to check our solutions, not just for how plausible or sensible they are (which is what we do in physics), but actually for whether they are even valid or not.

PeroK
Homework Helper
Gold Member
2020 Award
Yes I understand this from your post #2. However, this makes problems like these quite difficult. I say this because it means that even after solutions are got, we need to plug them back for various cases to check whether they violate (earlier) requirements or not. What goes well for a root ##x_1## may not go for root ##x_2##.

I suppose this is how it is. We have to check our solutions, not just for how plausible or sensible they are (which is what we do in physics), but actually for whether they are even valid or not.

That's true to some extent. In the sense that you have to be careful to check when you have reached a necessary and sufficient condition (in this case the minimum range for ##k##).

We have ruled out everything except ##6 < k < 6.75##. You could then check for any ##k## in ##(6, 6.75)## and make sure all the k's in that range satisfy the requirement.

But, if you follow the logic more closely you can see where we have if and only if conditions. In other words, we can see directly that:

##-6 < x_1, x_2 < 1 \ \Leftrightarrow 6 < k < 6.75##

epenguin
Homework Helper
Gold Member
I have never seen a quadratic equation problem solved in this way.

I didn't actually solve an equation did I, except a special one near the end? (I am nagged by the thought that that can be done better somehow.) OK and two others, very easy because they were perfect squares.

I was led by the fact that the quadratic without the k term is a perfect square, but although I noted this in #4 I did not immediately see its useful consequences. You have surely seen the quadratic solved by expressing it as difference of two squares. The standard formula for solution is consequence of that but the formula tends to get learned by heart and where it came from lost to view. My argument was not exactly an application of that but I thought close in spirit, that's why I called it 'back to basics' and seems to me it gives insights that you miss when you do everything by application of the standard formula.