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

It is

$3\sin x+4\cos x=2 $

What I did is

$(3\sin x)^2=((2-4\cos x)^2$ to get

$9-9\cos^2x=4-16\cos x+16\cos^2 x$ then I got

$25\cos^2 x-16\cos x-5=0$

However I am having trouble finding the root I tried using the quadratic formula and got x=.866 I am not sure what I do wrong.

share|cite|improve this question
$\color{maroon}{\cos}( x)=.866$ (approximately; which is a bit off)... The variable in your quadratic is $\cos x$, not $x$. – David Mitra Dec 15 '12 at 17:36
You are correct x is closer to .869909 – Fernando Martinez Dec 15 '12 at 17:40
But I cannot seem to get the right answer. – Fernando Martinez Dec 15 '12 at 17:40
$x$ has two values $0.86990908339, -0.22990908339$ – lab bhattacharjee Dec 15 '12 at 17:41
yes because it plus and minus in the quadratic formula. – Fernando Martinez Dec 15 '12 at 17:42

There is a fact I could find through my old texts that:

If $a,b$ be real numbers which $a^2+b^2\neq 0$ then $$\exists\alpha\in\mathbb R, \;\; a\sin(x)+b\cos(x)=\sqrt{a^2+b^2}\sin(x+\alpha)$$ I added this, maybe be helpful as a hint.

share|cite|improve this answer
I miss you Babak! +1 ;-) – amWhy Apr 13 '13 at 0:29
@amWhy: Me too Amy................ – Babak S. Apr 13 '13 at 5:00

This works out nicely almost-automatically with groebner basis. Your single equation is equivalent to the two equations

$$s^2+c^2=1$$ $$3s+4c=2$$

The groebner basis in lexicographical order is

$$4c+3s-2 ~~\textrm{and}~~ 25s^2-12s-12$$

So solving the quadratic equation $25s^2-12s-12=0$ gives us the solutions! $$s_{1,2}=\frac{6}{25}\frac{+}{-}\frac{4}{25}\sqrt{21}$$ and $c_{1,2}=(2-3s_{1,2})/4$. Then $x_{1,2}=\arcsin(s_{1,2})=\arccos(c_{1,2})$. However, if you have some software to do groebner basis for you, then it probably already has a solve method to use directly on your first equation.

share|cite|improve this answer
+1 I like your answers based on groebner basis – miracle173 Jan 11 '14 at 23:41

What you need is:

$$a\sin x+b\cos x=\sqrt{a^2+b^2}\sin(x+\varphi),$$ where the phase shift $\varphi=\arcsin\left({b\over \sqrt{a^2+b^2}}\right)$ when $a>0$.

So, in your situation, you get $$5\sin(x+\varphi)=2\implies x+\varphi=\arcsin(2/5) \implies x=\arcsin(2/5)-\arcsin(4/5)\approx-0.51.$$

Mathematica graphics

I'm not sure if you want a solution or all solutions, but this does the bulk of the work.

share|cite|improve this answer

I assume that you are just looking for solutions in the interval $[0,2\pi]$. And then what you have done is pretty much correct. So you start with

$$3\sin x+4\cos x=2.$$

And this implies $25\cos^2 x-16\cos x-5=0$.

Let $t = cos(x)$. Then the equation just says $25t^2 - 16t - 5 = 0$. The two solutions are $$\begin{align} t &= \frac{16 \pm\sqrt{16^2 + 500}}{50} \\ &= \frac{16 \pm \sqrt{756}}{50} \\ &= \frac{16 \pm 6\sqrt{21}}{50} \\ &= \frac{8\pm 3\sqrt{21}}{25}\\ &= \begin{cases}0.86990908 \\ -0.229900908\end{cases} \end{align} $$ That is you want to find the solutions to $$ \cos(x) = \begin{cases}0.86990908 \\ -0.229900908\end{cases} $$ By taking $\cos^{-1}$ you can get possible solutions, but when you do that you have to remember that $2\pi$ minus each possible solution is also a solution (to the cosine equation. So you get: $$ x = \begin{cases} 0.51558\quad\text{or}\quad 5.76741 \\ 1.80278\quad\text{or}\quad 4.84952 \end{cases}. $$ In getting your quadratic, you squared both sides, so you have to be careful. We should always go back and check that we got valid solutions. When you do that you realize that only $$ x= 1.80278\quad\text{and}\quad x= 5.76741 $$ are valid solutions.

(All this was of course essentially contained in the comments to the question)

share|cite|improve this answer

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.