Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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!

share|cite|improve this question
Thanks, but how exactly do I proceed from here? – Better World Mar 15 at 10:54
@Banach why did you delete comment – DeNiSkA Mar 15 at 11:13
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. – LutzL Mar 15 at 12:39
up vote 11 down vote accepted

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$

share|cite|improve this answer

Completing the square,


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



share|cite|improve this answer
What is completing the square? Is my solution incorrect? – Banach Tarski Mar 15 at 12:28
@BanachTarski: you didn't provide a complete solution. – Yves Daoust Mar 15 at 12:33
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? – Simple Art Mar 20 at 15:08
@SimpleArt wrong about the RHS. – Yves Daoust Mar 20 at 16:13
I don't thank the downvoter. – Yves Daoust Mar 20 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!!

share|cite|improve this answer
What is completing the square? I don't see what I have missed – Banach Tarski Mar 15 at 12:28
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. – LutzL Mar 15 at 12:34
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 – Banach Tarski Mar 15 at 12:38
Seems odd to me that you use \arccos but not \cos. – Kyle Kanos Mar 15 at 12:54
@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. – Mark S. Mar 15 at 17:56

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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