How to solve quadratic equation with parameter for solutions in some range

149 Views Asked by At

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?

4

There are 4 best solutions below

0
On 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)}$$

2
On

I have reached that if a, b and c are functions in terms of p, and we need to make the solutions of the equation $a(p)x^2+b(p)+c(p)=0$ in the interval $(n,m)$, so we need to solve for p the below inequality: $$a(p)n^2+b(p)n<-c<a(p)m^2+b(p)m$$.

First, consider $a(p)>0$, and $\Delta>0$. So we have that $b^2(p)>4a(p)c(p)$. With the quadratic formula, we have that $$x=\frac{-b(p)\pm \sqrt{b^2(p)-4a(p)c(p)}}{2a(p)}$$ So if we need to this solutions be on the interval $(n,m)$, we have that: $$n<\frac{-b(p)\pm \sqrt{b^2(p)-4a(p)c(p)}}{2a(p)}<m$$ $$2a(p)n+b(p)<\pm \sqrt{\Delta} < 2a(p)m+b(p)$$ $$4a^2(p)n^2+4a(p)b(p)n+b^2(p)<b^2(p)-4a(p)c(p)<4a^2(p)m^2+4a(p)b(p)m+b(p)^2$$ $$an^2+bn<-c<am^2+bm$$


0
On

The question and the existing answer are too long, so I decided to write an answer after I read the first paragraph.

The discriminant $D$ of the equation equals $$(p+3)^2-4\cdot 2(p+1)=p^2-2p+1=(p-1)^2,$$ so both roots of the equation are real (but can coincide). The roots of the equation are $\frac14 \left(p+3\pm \sqrt{D}\right)= \frac14 \left(p+3\pm (p-1)\right)$. That is the roots are $\frac {p+1}2$ and $1$. Thus we need to have $\frac {p+1}2\in (-1,3)$, that is $p\in (-3,5)$. The roots coincide when $\frac {p+1}2=1$, that is when $p=1$.

2
On

A vigilant student would have immediately noticed that $x_1=1$ is a root of the equation $$2x^2-(p+3)x+p+1=0$$ and by polynomial division factorize the equation like $$(x-1)(2x-p-1)=0.$$ Then the other root is $x_2=\frac{p+1}2$. With the given conditions: $-1<x_2<3$ and $x_2\neq x_1$ (If "Two real solutions" mean they are different. The valid answer in OP suggests so.) he would have $$p\in(-3,1)\cup(1,5).$$ But İ followed the long way, I completed the square like $$2\left(x-\frac{p+3}4\right)^2=\frac{(p+3)^2}8-p-1$$ $$\left(x-\frac{p+3}4\right)^2=\left(\frac{p-1}4\right)^2$$ $$\left|x-\frac{p+3}4\right|=\frac{p-1}4$$ and hence the roots are $$x_1=-\frac{p-1}4+\frac{p+3}4=1,$$ $$x_2=\frac{p-1}4+\frac{p+3}4=\frac{p+1}2.$$ Then $$-1<\frac{p+1}2<3\iff$$ $$-2<p+1<6\iff$$ $$\bbox[yellow,5px,border:2px solid blue]{-3<p<5}$$ and $$\frac{p+1}2\neq1\iff\bbox[yellow,5px,border:2px solid blue]{p\neq1}.$$