# How to solve asinx+bcosx

1. Oct 15, 2014

### physior

hello

Let's solve:

(square root of 3)sin(x)-cos(x)=2

We know that R=square root of 3 + 1 = 2

We also know that tanφ=b/a= -1/sqrt3

The solution to tanφ=-1/sqrt3 has many solutions, for example, -30, 150, 330 degrees etc.

Which of these solutions do we accept? Or is it irrelevant which we will accept?

I mean, our equation will be this or that?
this: 2sin(x-30)=2 => sin(x-30)=1 => x-30 = 2kπ + 90 or x-30 = 2kπ + π - 90 => x=2kπ+120 or x=2kπ+π-60
that: 2sin(x+330)=2 => sin(x+330)=1 => x+330 = 2kπ + 90 or x+330 = 2kπ + π - 90 => x=2kπ-240 or x=2kπ+π-420

which of these solutions are acceptable?

thanks!

2. Oct 15, 2014

### Staff: Mentor

All that satisfy the original equation (check the signs!).
If the equation has some non-mathematical background, x is often restricted to some range, like 0 to 360 degrees, this can narrow down the number of solutions.

3. Oct 16, 2014

### physior

4. Oct 16, 2014

### vela

Staff Emeritus
The idea behind this method is to express $\sqrt{3}\sin x + \cos x$ in the form $(R\cos\phi)\sin x + (R\sin\phi)\cos x$. This requires that you choose R and $\phi$ so that
\begin{eqnarray*}
R \cos\phi &= \sqrt{3} \\
R \sin\phi &= -1.
\end{eqnarray*} If you require R>0, this fixes which quadrant $\phi$ can be in, which in this case is the fourth quadrant. There's only one angle in the range from 0 to 360 degrees which will work. You can then add multiples of 360 to generate additional solutions for $\phi$ (though it's pointless to do so as you will see below).

When you divide the second equation by the first to get $\tan \phi = -1/\sqrt{3}$, you introduce spurious solutions which satisfy
\begin{eqnarray*}
R \cos\phi &= -\sqrt{3} \\
R \sin\phi &= 1.
\end{eqnarray*} If you use this approach, you need to verify that you've got the right solution and not a spurious one.

The way you wrote them, none of these solutions is acceptable. You need to stick with either radians or degrees. Don't mix the two in the same expression.

In both 'this' and 'that', you had to solve an equation of the form $\sin (x+\phi) = 1$, which implies $x+\phi = 90 + 360n$. Solving for x, you get $x = 90 - \phi + 360n$. Now suppose you add 360 to $\phi$ to generate another solution for $\phi$ above. You now have $x = 90 - (\phi+360) + 360 n = 90 - \phi + 360(n-1)$. It's the same set of solutions as before since n can be any integer. Any multiple of 360 you added to $\phi$ can be absorbed into the multiples of 360 needed to find all possible solutions for x, so finding additional values for $\phi$ doesn't really make a difference to the solution in the end.

Last edited: Oct 16, 2014
5. Oct 16, 2014

### physior

How can I know if I require R>0 ? There is nothing in the question implying what the R can be.

6. Oct 16, 2014

### physior

can you tell me the steps to solve it?
for example:
1) first I calculate phi by tan(phi)=b/a ? I know that based on the value the calculator will return (let's say theta), I will have the following solutions: phi=k*360 + theta or k*360 - theta, right? how do I choose which of these I want to use? Or I can use ANY of these solutions in general, so I can take the first positive angle for simplicity?
2) now I need to calculate R. how can I do it? Apparently I cannot simply R=square root of a^2 + b^2, because I don't know if R is the positive or negative value of this root. Do I calculate the R otherwise? Or somehow determine its sign?
3) what's next?

thanks!

7. Oct 16, 2014

### RUber

What if you made substitution, say:
$u = \cos x, \, v=\sin x$ ?
Then you would have $\sqrt{3} v - u = 2$ which would plot a line.
Then enforce a second condition that $u^2+v^2=1$ (unit circle) and see where the two intersect.

As for the angle, you would generally want to express all possible angles that satisfy the requirements. $x = \theta +2\pi n$. If you think others would work, check them against the original equation.

8. Oct 16, 2014

### vela

Staff Emeritus
You can try using a negative value for R and see how that affects the procedure.

I already explained this above.