Solve the following equation:

#### Solution

Given:

\[\sin x + \cos x = 1\] ...(i)

Now,

\[\tan\alpha = \frac{b}{a} = 1 \Rightarrow \alpha = \frac{\pi}{4}\]

On putting

\[r \sin \alpha \sin x + r \cos \alpha \cos x = 1\]

\[\Rightarrow r \cos ( x - \alpha) = 1\]

\[ \Rightarrow \sqrt{2} \cos \left( x - \frac{\pi}{4} \right) = 1\]

\[ \Rightarrow \cos \left( x - \frac{\pi}{4} \right) = \frac{1}{\sqrt{2}}\]

\[ \Rightarrow \cos \left( x - \frac{\pi}{4} \right) = \cos \frac{\pi}{4}\]

\[ \Rightarrow x - \frac{\pi}{4} = 2n\pi \pm \frac{\pi}{4}, n \in Z\]

On taking positive sign, we get:

\[x - \frac{\pi}{4} = 2n\pi + \frac{\pi}{4}\]

\[ \Rightarrow x = 2n\pi + \frac{\pi}{4} + \frac{\pi}{4}\]

\[ \Rightarrow x = 2n\pi + \frac{\pi}{2}, n \in Z\]

On taking negative sign, we get:

\[x - \frac{\pi}{4} = 2m\pi - \frac{\pi}{4}\]

\[ \Rightarrow x = 2m\pi, m \in Z\]