The original problem:

If $0\le a,b\le 3$ and the equation $$x^2+4+3\cos(ax+b)=2x$$ has at least one real solution, then find the value of $a+b$


At first, on rearranging, I got the following expression: $$x^2-2x+(4+3\cos(ax+b))=0$$ I thought this was a quadratic in $x$, and thus from the quadratic formula(and that at least one real root exists), $D\ge 0$ ie $$4-4(4+\cos(ax+b))\ge 0$$ $$$$

However I'm not really sure about this. I've treated $\cos(ax+b)$ as a constant term even though the argument of the cosine includes $x$: the variable in which the quadratic expression is. $$$$Under these circumstances, is it correct to use $3\cos(ax+b)$ as a constant? If not, how could I use the quadratic formula to find values of $x$ satisfying $$x^2-2x+(4+3\cos(ax+b))=0$$

Many thanks in anticipation!

  • $\begingroup$ Thanks, but how exactly do I proceed from here? $\endgroup$ – Better World Mar 15 '16 at 10:54
  • $\begingroup$ @Banach why did you delete comment $\endgroup$ – user5954246 Mar 15 '16 at 11:13
  • $\begingroup$ You missed to copy a $3$ and follow through to the conclusion $-12(1+\cos(ax+b))\ge0$. After that the result follows as in the answers. $\endgroup$ – LutzL Mar 15 '16 at 12:39

Wih a little bit of manipulation we can rewrite your given equation as $$x^2 - 2x + 4 = -3\cos{\left( ax + b \right)}$$

Let $f(x) = x^2 - 2x + 4$. Differentiating to find the minimum, we get

$$f'(x) = 2x - 2 = 0 \implies x = 1$$ $$f''(x) = 2 > 0 \implies \text{minimum at } x = 1$$

The minimum value of LHS is thus $f(1) = 3$.

The RHS is a cosine whose value oscillates in the range $[-3,3]$. The maximum value of the RHS is thus $3$. So we can see that equality holds if and only if the LHS is minimum and RHS is maximum. We just saw that the LHS, $f(x)$, is minimal only at $x = 1$. Now the value of $x$ is fixed, so the value of the RHS depends only on $a$ and $b$.

Hence, we have that

$$f(1) = 3 = -3\cos(a\times 1 + b) \implies \cos(a+b) = -1$$

I leave it to you to complete the problem from here :)

On a side note: No you can't take $\cos(ax + b)$ as a constant since $x$ is not a constant :)

$a + b = (2n+1)\pi$ but $0 \le a+b \le 6$. So $n = 0$ and $a + b = \pi$


Completing the square,


The two expressions can only be equal if they are zero, i.e. $x=1$ and $\cos(ax+b)=-1$.



  • $\begingroup$ What is completing the square? Is my solution incorrect? $\endgroup$ – Banach Tarski Mar 15 '16 at 12:28
  • $\begingroup$ @BanachTarski: you didn't provide a complete solution. $\endgroup$ – Yves Daoust Mar 15 '16 at 12:33
  • $\begingroup$ Why must they both be equal to $0$? The RHS can be anything from $-6$ to $6$, and the LHS covers values between $0$ and $6$, so all solutions may very well result in not equaling $0$, right? $\endgroup$ – Simply Beautiful Art Mar 20 '16 at 15:08
  • $\begingroup$ @SimpleArt wrong about the RHS. $\endgroup$ – Yves Daoust Mar 20 '16 at 16:13
  • $\begingroup$ I don't thank the downvoter. $\endgroup$ – Yves Daoust Mar 20 '16 at 16:15

since the $3cos(ax+b)$ lies between $[-3,3]$

because $cos x$ has a max and min value as $1,-1$ (respectively) then $3cos x$ will have $3,-3$

i can write $$-3=<x^2-2x+4<=3$$

i am completing the square !

$$\implies -3=<(x-1)^2+3<=3$$

as you see that the term inside the square has a least value 0 and this equation is always greater than or equal to 3 then $(x-1)$ must be zero !! and $x=1$

and then substituting the value of x we get $cos(a+b)=-1$ $$\implies a+b=\arccos (-1)$$ $$a+b=\pi$$and that solved the problem!!

  • $\begingroup$ What is completing the square? I don't see what I have missed $\endgroup$ – Banach Tarski Mar 15 '16 at 12:28
  • $\begingroup$ Completing the square means transforming $ax^2+bx+c=a(x+\frac{b}2a)^2+c-\frac{b^2}{4a}$ so that all $x$ terms are assembled in one complete square. $\endgroup$ – LutzL Mar 15 '16 at 12:34
  • $\begingroup$ Why is that necessary. I just used the quadratic as a function and found out that solution can only exist when the quadratuc function is minimum $\endgroup$ – Banach Tarski Mar 15 '16 at 12:38
  • 2
    $\begingroup$ Seems odd to me that you use \arccos but not \cos. $\endgroup$ – Kyle Kanos Mar 15 '16 at 12:54
  • 1
    $\begingroup$ @Banach Tarski, this problem can be solved both with and without calcilus. Completing the square is the main way you find the minimum of a quadratic without calculus. $\endgroup$ – Mark S. Mar 15 '16 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.