Dear Uncle Colin,

I have to solve $5\sin(x) - 5\cos(x)=2$ for $0 \le x \lt 360º$ – I get four answers, but apparently only two are correct. Any suggestions?

Blooming Impeded: Rudimentary Knowledge And Reasoning

Hi, BIRKAR, and thanks for your message!

This looks tasty! Let’s work through it.

Your approach was to set $\cos(x) = \sqrt{1 - \sin^2(x)}$, which is interesting – although a bit dicey. I think it should be $\pm$ the square root, and you need to take inordinate care with the quadrants. I would counsel against doing it that way.

If you wanted to use the $\sin^2(x) + \cos^2(x) \equiv 1$ identity, I would suggest a “rearrange and square” approach.

  • $5\sin(x) - 2 = 5\cos(x)$ (You got here by a circuitous route)
  • $25\sin^2(x) - 20\sin(x) + 4 = 25 - 25\sin^2(x)$
  • $50\sin^2(x) - 20\sin(x) - 21 = 0$

It’s absolutely fine to wallop this with the formula, but I’m going to take a different approach: let $s = 10\sin(x)$ and double everything:

  • $100\sin^2(x) - 40\sin(x) - 42 = 0$
  • $s^2 - 4s - 42 = 0$

That doesn’t factorise, but the square completes easily: $(s-2)^2 - 46 = 0$

So $s = 2 \pm \sqrt{46}$. We made $s$ up, so going backwards:

$\sin(x) = \frac{2 \pm \sqrt{46}}{10}$

This gives (as you got) four answers for $x$: about 61º and 119º for the positive root and 209º and 331º for the negative one.

However, two of these don’t work: it’s always important to check that your answers satisfy the original equation. It turns out that 119º and 331º are spurious solutions.

Where did they come from?

When you squared the equation, you turned negatives positive – and that’s introduced places where $5\sin(x) - 2 = -5\cos(x)$ as solutions.

How else could you do it?

I think the most reliable approach here is the harmonic transformation:

$5 \sin(x) - 5 \cos(x) \equiv R \sin(x-\alpha)$, for some $R$ and $\alpha$.

Now, $R\sin(x-\alpha) \equiv R\sin(x)\cos(\alpha) - R\cos(x)\sin(\alpha)$

This means $5 = R\cos(\alpha)$ and $5 = R\sin(\alpha)$.

A bit of trigonometry gives $\alpha = 45º$ and $R = 5\sqrt{2}$.

So: $5\sqrt{2} \sin(x - 45º) = 2$

$\sin(x-45º) = \frac{\sqrt{2}}{5}$

When we un-sine this, we get a principal solution of about 16º. We expect a second solution as well: if $0 \le x \lt 360º$, then $-45º \le x-45º \lt 315º$, so $x-45º$ could also be 164º.

Adding the 45º back gives 61º and 209º, the two correct solutions.

Hope that helps!

- Uncle Colin

  • Edited to correct LateX, 2021-12-08.