1

I am trying to find the number of solutions of the equation $$\sin\theta +\cos\theta=\sin2\theta $$ in the interval $[-\pi,\pi]$.

Here's what I did, $$\sin\theta +\cos\theta=\sin2\theta \\ \Rightarrow (\sin\theta +\cos\theta)^2=(\sin2\theta)^2 \\ \Rightarrow1+\sin2\theta=(\sin2\theta)^2$$

Hence we get $\sin2\theta=\frac{1\pm\sqrt{5}}{2}$, with $\sin2\theta=\frac{1 -\sqrt{5}}{2}$ bein the only valid solution.

Since $2\theta$ is present inside $\sin()$, I assumed that there would be four solutions of the equation. But on plotting the graph I find that there are only two solutions.

Why are there only two solution instead of four, and how could I prevent this mistake in future?

Blue
  • 75,673
  • Your roots are incorrect (sign). Correct roots are $(1\pm \sqrt{5})/2$ which give two solutions only. – MyMolecules Dec 11 '21 at 15:18
  • @MyMolecules Sorry typing error. I think I have fixed it. – Alpha Delta Dec 11 '21 at 15:21
  • In fact, the equation after the squaring has $4$ solutions in the given interval. See my answer below why. – Peter Dec 11 '21 at 15:24
  • @Peter Yes, I am aware of that. I mentioned in the question post. The question is how could I figure out the correct number of solutions without plotting a graph? – Alpha Delta Dec 11 '21 at 15:26

5 Answers5

2

By only considering $\sin 2\theta=\dfrac{1-\sqrt{5}}{2}$, one gets four roots since $\sin 2\theta$ has a period of $\pi$ and the interval $[-\pi,\pi]$ is twice that length.

But one also has to consider the equality of $\sin \theta + \cos \theta =\dfrac{1-\sqrt{5}}{2}$. Since $$\sin \theta + \cos \theta = \sqrt{2}\sin \left( \frac{\pi}{4} + \theta \right)$$

has a period of $2\pi$, actual number of roots is only $2$.

MyMolecules
  • 3,823
2

OP: how can I figure out the correct number of solutions without plotting a graph?

How can I prevent or atleast sieve though the extra solutions? The solutions of this equation itself are too complicated to check manually.

  1. Short of plugging the candidate solutions into the original equation, there is no general method for directly sifting out extraneous ones or determining how many there are.

    (If a calculator is allowed, it is typically a good-enough check to just plug in the approximated candidate solutions.)

  2. However, it is possible to catch potential extraneous solutions: carefully watch every line for any step that is not obviously “reversible”, noting that every extraneous solution arises from such a step (which is not to say that every such step creates an extraneous solution):

    • neglecting domain restrictions typically of trigonometric and logarithmic functions

    • squaring an equation whose two sides don't identically have the same sign

    • converting absolute value to $\pm$

      $\lvert x+6\rvert=2x\\\pm(x+6)=2x\\x=-2 \;\text{ or }\; 6 \text{ (the negative solution is extraneous)}$

    • inadvertently multiplying an equation by $0$

      $x=1\\x^2=x\\x=0 \;\text{ or }\; 1$

    • performing some other non-injective operation on an equation.

Method 1 above is easier and safer than Method 2.

ryang
  • 38,879
  • 14
  • 81
  • 179
1

If you use the multiple angle formula $\theta=2 \tan^{-1}(x)$ $$\sin(\theta )+\cos(\theta)-\sin(2\theta)=0 \implies x^4-6 x^3+2 x-1=0$$ which has only two real solutions $$x_1=\frac{3+\sqrt{5}}{2}+\sqrt{\frac{1}{2} \left(11+5 \sqrt{5}\right)}$$ $$x_2=\frac{3+\sqrt{5}}{2}-\sqrt{\frac{1}{2} \left(11+5 \sqrt{5}\right)}$$

Then $\theta_1 \sim 2.80847$ and $\theta_2 \sim -1.23768$ that you observed plotting.

Be always careful when you square.

1

Avoid squaring whenever practicable as it often introduces

. When do we get extraneous roots?

. Extraneous Roots

et $\sin\theta+\cos\theta=t,t^2=?\le1+1$

$t=t^2-1, 2t=\pm\sqrt5+1$

Now clearly $(\sqrt5+1)^2>2$

$\implies\cos\left(\theta-\dfrac\pi4\right)=\dfrac t{\sqrt2}=?$

As $\cos(2\pi-y)=\cos y$ and cosine has a period $=2\pi,$ we shall have two incongruent solutions

0

The squaring generated extra solutions. To see this , consider this simple example : $x=3$ has trivially a unique solution, but $x^2=9$ has $-3$ and $3$.

Peter
  • 84,454
  • How can I prevent or atleast sieve though the extra solutions? – Alpha Delta Dec 11 '21 at 15:24
  • If you check all the solutions whether they satisfy the original equation, this is no problem. No idea whether there is an alternative approach working here avoiding this issue. – Peter Dec 11 '21 at 15:26
  • 1
    I don't think that's possible. The solutions of this equation itself are too complicated to check manually. – Alpha Delta Dec 11 '21 at 15:28