# Solve the trig equation $\cos\theta − \sin\theta = 1$ [duplicate]

Solve the given equation. Let k be any integer.

$$\cos θ − \sin θ = 1$$

What do I do? Am I allowed to square everything? I was thinking about squaring everything and then substituting in $1-\sin^2θ$ for $\cos^2θ$ and then factoring out a $\sinθ$, then setting both equations $=0$ but I'm not sure if I am allowed to square everything.

## marked as duplicate by lab bhattacharjee trigonometry StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Aug 5 '15 at 10:23

• If you square everything you may potentially get some extra solutions (solutions of $\cos \theta - \sin \theta = -1$) but can get rid of it after if that happens. – Joel Cohen Aug 4 '15 at 19:19
• Do I get rid of them by plugging them in and testing which values are true? – TheNewGuy Aug 4 '15 at 19:20
• What is the integer $k$? – Umberto P. Aug 4 '15 at 19:21
• @TheNewGuy : Yes, exactly ! – Joel Cohen Aug 4 '15 at 19:21
• Squaring everything is fine, as long as you are aware this can introduce extraneous roots, which you discard at the end. I suggest squaring both sides immediately, so $(\cos\theta-\sin\theta)^2=1$. Nice stuff will happen. – André Nicolas Aug 4 '15 at 19:21

You don't lose any solutions by squaring both sides, but you may introduce some that don't belong.

So, square both sides and simplify to get $\cos \theta \sin \theta = 0$ and solve for $\theta$. Then, check every solution for whether or not it satisfies the original equation.

HINT: use that $\cos(\theta)-\sin(\theta)=\sqrt{2}\sin(\frac{\pi}{4}-x)$

• Perhaps you could explain how you got there so that OP doesn't think you had some divine inspiration and plucked that identity out of the sky. – Kari Aug 4 '15 at 19:20
• i have teached this formula and it is $\cos(x)-\sin(x)=\sqrt{2}(\sin(\pi/4)\cos(x)-\cos(\pi/4)\sin(x))$ since $\sin(\pi/4)=\cos(\pi/4)=1/\sqrt{2}$ – Dr. Sonnhard Graubner Aug 4 '15 at 19:31
• here you don't need to check you solutions – Dr. Sonnhard Graubner Aug 4 '15 at 19:35

hint: Rewrite the equation: $\sin \theta - \cos \theta = 1 \to \sin\left(\theta -\dfrac{\pi}{4}\right) = \dfrac{\sqrt{2}}{2}$. This comes from multiply both sides of the equation by $\dfrac{\sqrt{2}}{2}$ and note that $\dfrac{\sqrt{2}}{2} = \sin \dfrac{\pi}{4} = \cos \dfrac{\pi}{4}$, so: $\sin \theta \cos \dfrac{\pi}{4} - \cos \theta\sin \dfrac{\pi}{4} = \dfrac{\sqrt{2}}{2}...$

In general, you can transform $$A \cos \theta + B \sin \theta = \sqrt{A^2 + B^2} \sin (\theta + \delta)$$ for some $\delta$ such that $\tan \delta = \frac AB$.

You can easily solve for $\delta$ by writing out $\sin(x+y) = \sin(x) \cos (y) + \sin(y) \cos (x)$. In our case, this gives:

$$\cos \theta - \sin \theta = \sqrt{2} \sin(\theta + \frac{3\pi}{4})$$

Then $$\theta + \frac{3\pi}{4} = \sin^{-1}\frac{1}{\sqrt{2}} = \frac\pi{4} \mbox{ or } \frac{3\pi}{4}$$

So the only solutions are $$\theta = -\frac\pi 2 \\ \theta = 0$$

• You are missing some $+2k\pi$s right there, as well as some other solutions. – wythagoras Aug 4 '15 at 19:29
• note :$$a sinx+ b cos x= \frac{|a|}{a} \sqrt{a^2+b^2}sin (x+\alpha)\\tan \alpha=\frac{b}{a}$$ – Khosrotash Aug 4 '15 at 19:46

Squaring is allowed, of course, but be aware that you will get another equation with a larger set of solutions (note that $\cos\theta-\sin\theta=\color{red}{-1}$ after squaring will be exactly the same). It is better to use the method that rewrites the linear combinations of sine and cosine to a single sine.

note :$${\color{Red}{a sinx+ b cos x= \frac{|a|}{a} \sqrt{a^2+b^2}sin (x+\alpha)\\tan \alpha=\frac{b}{a}} }$$ $$cos \theta - sin \theta =1\\- sin \theta +cos\theta=1\\- sin \theta +cos\theta=\frac{|-1|}{-1}\sqrt{2} sin(x-\frac{\pi}{4})=-\sqrt{2}sin(x-\frac{\pi}{4}) \\ \to \\=-\sqrt{2}sin(x-\frac{\pi}{4})\\sin(x-\frac{\pi}{4})=-\frac{\sqrt{2}}{2} =sin(-\frac{\pi}{4})$$ so $$\left\{\begin{matrix} x-\frac{\pi}{4}=-\frac{\pi}{4}+2k\pi)\\ x-\frac{\pi}{4})=\pi-(-\frac{\pi}{4})+2k\pi \end{matrix}\right.$$

I'm a little late to this party, but here is the illustration of the method so many seem to suggest:

$$\cos(\theta) -\sin(\theta) = 1 \\ (\cos(\theta)-\sin(\theta))^2 = 1^2 \\ \cos^2(\theta) - 2\sin(\theta)\cos(\theta) + \sin^2(\theta) = 1 \\ -2\sin(\theta)\cos(\theta) + [\cos^2(\theta) + \sin^2(\theta)] = 1 \\ -2\sin(\theta)\cos(\theta) + 1 = 1 \\ -2\sin(\theta)\cos(\theta) = 0 \\ 2\sin(\theta)\cos(\theta) = 0.$$

Now we use the double-angle formula $\sin(2\theta) = 2\sin(\theta)\cos(\theta)$ to get

$$2\sin(\theta)\cos(\theta)=0 \\ \sin(2\theta) = 0 \\ 2\theta = \arcsin(0) \\ 2\theta = k\pi \qquad \text{where k is an integer.} \\ \theta = \frac{k\pi}{2}.$$

Now to check for extraneous solutions. Since the least common multiple of the periods of the trig functions in the original equation is $2\pi$, we only need to check the values of $k$ that will cause $\theta$ to be in between $0$ and $2\pi$:

$k = 0 \implies \theta = 0.$ Then we check: $\cos(0)-\sin(0) = 1-0 =1$. It works!

$k=1\implies \theta = \pi/2$. Then we check: $\cos(\pi/2)-\sin(\pi/2) = 0-1 \neq 1$. Doesn't work!

$k=2\implies \theta = \pi$. Then we check: $\cos(\pi)-\sin(\pi) = -1-0 \neq 1$. Doesn't work!

$k = 3 \implies \theta = 3\pi/2.$ Then we check: $\cos(3\pi/2)-\sin(3\pi/2) = 0-(-1) =1$. It works!

When $k=4$, we get $\theta = 2\pi$ which is effectively the sign to stop because the values of $k$ cause their own period as mentioned before.

So altogether we see that $k=0$ and $k=3$ both work. By extending the period of 4 to these values, we get $k=0,\pm4,\pm8,\pm12\ldots$ and also $k = \pm3,\pm7,\pm11, \pm 15, \ldots$ as valid values of $k$ when $\theta = \frac{k\pi}{2}$.

So altogether and more eleganlty, as mentioned in other posts and comments, we have $\theta \in \{ 0+2\pi k$; $\frac{3\pi}{2} + 2\pi k$ | $k\in \mathbb{Z}\}$.