0

General solution to the equation $\sin x+\cos x$=$1$ is found to be $x=2n\pi$ and $x=2n\pi+\pi/2$, Pls refer Solving cosx+sinx−1=0

My Approach: $$ \sin x+\cos x=1\implies \sin x\frac{1}{\sqrt{2}}+\cos x\frac{1}{\sqrt{2}}=\frac{1}{\sqrt{2}}\\\implies\sin x\cos(\pi/4)+\cos x\sin(\pi/4)=\sin(\pi/4)\implies \sin(x+\pi/4)=\sin(\pi/4)\implies x+\pi/4=n\pi+(-1)^n [\pi/4]\implies x=n\pi+(-1)^n\frac{\pi}{4}-\frac{\pi}{4} $$ How do I check both the results are the same, without inputting the values for $n$ ?

Sooraj S
  • 7,573
  • 1
    What happened to the second solution to the quadratic? Have you potentially divided by zero? – Mark Bennet Nov 28 '16 at 21:55
  • 2
    By the way, this isn't a duplicate, because it is asking about a potential error in a method not exemplified in the linked question or its answers. – Mark Bennet Nov 28 '16 at 21:57
  • 1
    your second approach doesn't seem to have $x = 0$ as a solution. So, something must have dropped. – Doug M Nov 28 '16 at 22:04
  • $$\sin x+\cos x=\sqrt 2(\sin x\cos 45^{\circ}+\cos x\sin 45^{\circ}=\sqrt 2\sin(45^{\circ}+x)=1$$ – Piquito Nov 28 '16 at 22:13

3 Answers3

2

You can use the formulas with $\tan(x/2)$ only for the values where it is defined, which excludes $x=\pi+2k\pi$. If the equation has this value as a solution, you'll lose it (but of course you can check for it at the outset).

This is not the case for your equation. Instead you pass from $$ 2\tan\frac{x}{2}+1-\tan^2\frac{x}{2}=1+\tan^2\frac{x}{2} $$ to $$ 2\tan\frac{x}{2}\left(\tan\frac{x}{2}-1\right)=0 $$ to $$ \tan\frac{x}{2}-1=0 $$ forgetting the possibility that $\tan\frac{x}{2}=0$.

This would be like saying that the equation $2x^2-2x=0$ has only the solution $x=1$, forgetting $x=0$.

egreg
  • 238,574
  • thnx. if I substitute in terms of $\tan(x/2)$ for $\sin x$ and $\cos x$, which gives $x=2k\pi$ and $2k\pi+\pi/2$ as general solutions of the equation. My doubt is how do we properly compare with the form $x=k\pi+(-1)^n\frac{\pi}{4}-\frac{\pi}{4}$ ? – Sooraj S Dec 10 '16 at 19:35
  • 1
    @ss1729 If $k=2n$ is even, then $k\pi+(-1)^k\frac{\pi}{4}-\frac{\pi}{4}=2n\pi$; if $k=2n+1$ is odd, then $k\pi+(-1)^k\frac{\pi}{4}-\frac{\pi}{4}=2n\pi+\frac{\pi}{2}$. That way of expressing solutions is tricky and useless. – egreg Dec 10 '16 at 20:25
  • thanks...that solves my confusion. – Sooraj S Dec 10 '16 at 21:39
2

$${\color{Red}{a \sin x+ b \cos x=c \\ \frac{|a|}{a} \sqrt{a^2+b^2} \sin (x+\alpha)=c\\ \tan \alpha=\frac{b}{a}} }$$ $$ \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}) \\\sqrt{2} \sin(x+\frac{\pi}{4})=1$$ 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.$$

Khosrotash
  • 24,922
0

Summary: The solutions are $x=2j\pi$ and $x=2j\pi+\pi/2$ for any integer $j$. The first of each set is $x=0$ and $x=\pi/2$.

Note: In what follows, $k$ and $j$ are integers.

Squaring $\sin x+\cos x=1$, $1 =\sin^2 x + 2\sin x \cos x+\cos^2 x =1+ 2\sin x \cos x $ so $0 =2\sin x \cos x =\sin(2x) $ so that $2x = k\pi$ or $x = k\pi/2 $.

To see which extra solutions were introduced by squaring, if $x = k\pi/2 $ then $\sin x =0 $ if $k$ is even and $(-1)^{(k-1)/2} $ if $k$ is odd; $\cos x =0 $ if $k$ is odd and $(-1)^{k/2} $ if $k$ is even.

For even $k$, we want $(-1)^{k/2} = 1$, so $k/2$ is even so $k = 4j$ and $x = 2j \pi$.

For odd $k$, we want $(-1)^{(k-1)/2} = 1$ so $(k-1)/2 = 2j$ so $k = 4j+1$ and $x = (4j+1)\pi/2 =(2j+1/2)\pi =2 j \pi+\pi/2 $.

marty cohen
  • 107,799