Quadratics – How to Solve Quadratic Equation with Parameter for Solutions in a Range

parametricquadratics

Given an equation:
$2x^2 – (p+3)x + p + 1 = 0$ and I have to find two real solutions and these solutions both have to be in range $(-1,3)$.

So assumptions are:
$a \neq 0 \land \Delta > 0 \land x_1 \in (-1, 3) \land x_2 \in(-1,3) $

Firstly, $a=2\neq 0$, so $p \in R$

Secondly, $ \Delta = (p+3)^2 – 4*2*(p+1) = p^2+6p+9-8p-8=p^2-2p+1=(p-1)^2$

So we calcuate when the $\Delta > 0$

$(p-1)^2 > 0$

So $p \in (-\infty, 1) \cup (1, +\infty)$

Now, we need to calculate when the solutions are in range I mentioned. And that's where the problem occurs. I tried to just do it by solving $-1<x_1<3 \land -1<x_2<3$. But see it:

$x_1=(p+3-(p-1))/4 = 4/4=1$

$x_2=(p+3+p+1)/4=(2p+4)/4 = (1/2)p + 1$

The first double inequality is valid for all real $p$. So solve the second:

$-1 < (1/2)p+1 \land (1/2)p+1<3$

$p>-4 \land p<4$

And here I know I did something bad, because the valid answer (for whole problem) is $p\in(-3,1) \cup (1,5)$, while the inequality I solved above restricts the result to $4$ at max.

I heard that I shall use Vieta's formulas. But imagine a example where we search for solutions greater than two. The one man said me in that case I should do $x_1+x_2>4$ and $x_1*x_2 > 4$. Even I did one task using it and it worked, but I completely don't understand why. Because it doesn't exclude case like $x_1 = 5 \land x_2=1$, which of course should not be valid solutions.

So how can I solve these these types of equations?

Best Answer

I'm going to first point out an error in the method mentioned in question, and then show how to solve it using Vieta's formulas.


There is an error in $x_2=(p+3+p\color{red}+1)/4$.

It should be $x_2=(p+3+p\color{red}-1)/4$.


To solve it using Vieta's formulas, we use the following claim :

Claim : $a\gt 0$ and $b\gt 0$ if and only if $a+b\gt 0$ and $ab\gt 0$.

Proof of the claim :

  • If $a\gt 0$ and $b\gt 0$, then $a+b\gt 0$ and $ab\gt 0$.

  • If $a+b\gt 0$ and $ab\gt 0$, then it follows that $a,b$ have the same sign. Suppose that $a\lt 0$ and $b\lt 0$. Then, $a+b\lt 0$ which contradicts $a+b\gt 0$. So, $a\gt 0$ and $b\gt 0$.$\ \square$

I heard that I shall use Vieta's formulas. But imagine a example where we search for solutions greater than two. The one man said me in that case I should do $x_1+x_2>4$ and $x_1∗x_2>4$.

It is not correct that $x_1+x_2>4$ and $x_1∗x_2>4$.

Using the claim, we have $$\begin{align}&x_1>2,x_2>2 \\\\&\iff x_1-2>0,x_2-2>0 \\\\&\iff (x_1-2)+(x_2-2)\gt 0,(x_1-2)(x_2-2)>0 \\\\&\iff (x_1+x_2)-4\gt 0, x_1x_2-2(x_1+x_2)+4\gt 0\end{align}$$

Our question can be solved simlarly.

Using the claim, we have $$\begin{align}&-1\lt x_1\lt 3,-1\lt x_2\lt 3 \\\\&\iff 3-x_1\gt 0,3-x_2\gt 0,x_1+1\gt 0,x_2+1\gt 0 \\\\&\iff (3-x_1)+(3-x_2)\gt 0,(3-x_1)(3-x_2)\gt 0, \\&\qquad (x_1+1)+(x_2+1)\gt 0, (x_1+1)(x_2+1)\gt 0 \\\\&\iff 6-(x_1+x_2)\gt 0,9-3(x_1+x_2)+x_1x_2\gt 0, \\&\qquad (x_1+x_2)+2\gt 0, x_1x_2+(x_1+x_2)+1\gt 0 \\\\&\iff 6-\frac{p+3}{2}\gt 0, 9-3\times\frac{p+3}{2}+\frac{p+1}{2}\gt 0, \\&\qquad \frac{p+3}{2}+2\gt 0,\frac{p+1}{2}+\frac{p+3}{2}+1\gt 0 \\\\&\iff p\lt 9,p\lt 5,p\gt -7, p\gt -3 \\\\&\iff -3\lt p\lt 5\end{align}$$

You already got $p\not=1$, so the answer is $$\color{red}{p\in (-3,1)\cup (1,5)}$$

Related Question