We are asked to find the number of solutions, $n(S)$, for the equation $\sin x (\sin x + \cos x) = a$, where $x \in [-\pi, \pi]$ and $a \in \mathbf{Z}$.
Expand the given equation:
$ \sin^2 x + \sin x \cos x = a $
Use trigonometric identities $\sin^2 x = \frac{1 - \cos(2x)}{2}$ and $\sin x \cos x = \frac{\sin(2x)}{2}$:
$ \frac{1 - \cos(2x)}{2} + \frac{\sin(2x)}{2} = a $
Multiply by 2:
$ 1 - \cos(2x) + \sin(2x) = 2a $
Rearrange the terms:
$ \sin(2x) - \cos(2x) = 2a - 1 $
The expression $\sin(2x) - \cos(2x)$ can be written as $R\sin(2x - \alpha)$, where $R = \sqrt{1^2 + (-1)^2} = \sqrt{2}$ and $\alpha$ is such that $\cos \alpha = \frac{1}{\sqrt{2}}$ and $\sin \alpha = \frac{1}{\sqrt{2}}$. Thus, $\alpha = \frac{\pi}{4}$.
So the equation becomes:
$ \sqrt{2} \sin\left(2x - \frac{\pi}{4}\right) = 2a - 1 $
Isolate the sine term:
$ \sin\left(2x - \frac{\pi}{4}\right) = \frac{2a - 1}{\sqrt{2}} $
The range of the sine function is $[-1, 1]$. Therefore:
$ -1 \le \frac{2a - 1}{\sqrt{2}} \le 1 $
Multiply by $\sqrt{2}$:
$ -\sqrt{2} \le 2a - 1 \le \sqrt{2} $
Add 1:
$ 1 - \sqrt{2} \le 2a \le 1 + \sqrt{2} $
Divide by 2:
$ \frac{1 - \sqrt{2}}{2} \le a \le \frac{1 + \sqrt{2}}{2} $
Using $\sqrt{2} \approx 1.414$:
$ \frac{1 - 1.414}{2} \le a \le \frac{1 + 1.414}{2} $
$ \frac{-0.414}{2} \le a \le \frac{2.414}{2} $
$ -0.207 \le a \le 1.207 $
Since $a$ must be an integer ($a \in \mathbf{Z}$), the possible values for $a$ are $0$ and $1$.
Substitute $a=0$ into the equation:
$ \sin\left(2x - \frac{\pi}{4}\right) = \frac{2(0) - 1}{\sqrt{2}} = -\frac{1}{\sqrt{2}} $
Let $y = 2x - \frac{\pi}{4}$. Since $x \in [-\pi, \pi]$, the range for $2x$ is $[-2\pi, 2\pi]$, and the range for $y$ is $[-2\pi - \frac{\pi}{4}, 2\pi - \frac{\pi}{4}] = [-\frac{9\pi}{4}, \frac{7\pi}{4}]$.
The values of $y$ in the range $[-\frac{9\pi}{4}, \frac{7\pi}{4}]$ for which $\sin y = -\frac{1}{\sqrt{2}}$ are:
$y = -\frac{9\pi}{4}, -\frac{3\pi}{4}, -\frac{\pi}{4}, \frac{5\pi}{4}, \frac{7\pi}{4}$
Now, find $x$ using $x = \frac{y + \pi/4}{2}$:
There are 5 solutions for $a=0$. These are $x = -\pi, -\frac{\pi}{4}, 0, \frac{3\pi}{4}, \pi$. All are within $[-\pi, \pi]$.
Substitute $a=1$ into the equation:
$ \sin\left(2x - \frac{\pi}{4}\right) = \frac{2(1) - 1}{\sqrt{2}} = \frac{1}{\sqrt{2}} $
Let $y = 2x - \frac{\pi}{4}$. The range for $y$ is $[-\frac{9\pi}{4}, \frac{7\pi}{4}]$.
The values of $y$ in the range $[-\frac{9\pi}{4}, \frac{7\pi}{4}]$ for which $\sin y = \frac{1}{\sqrt{2}}$ are:
$y = -\frac{7\pi}{4}, -\frac{5\pi}{4}, \frac{\pi}{4}, \frac{3\pi}{4}$
Now, find $x$ using $x = \frac{y + \pi/4}{2}$:
There are 4 solutions for $a=1$. These are $x = -\frac{3\pi}{4}, -\frac{\pi}{2}, \frac{\pi}{4}, \frac{\pi}{2}$. All are within $[-\pi, \pi]$.
Total solutions = (Solutions for $a=0$) + (Solutions for $a=1$)
$ n(S) = 5 + 4 = 9 $
Therefore, the number of solutions $n(S)$ is 9.
Let $\cos(\alpha + \beta) = -\frac{1}{10}$ and $\sin(\alpha - \beta) = \frac{3}{8}$, where $0 < \alpha < \frac{\pi}{3}$ and $0 < \beta < \frac{\pi}{4}$. If $\tan 2\alpha = \frac{3(1 - r\sqrt{5})}{\sqrt{11}(s + \sqrt{5})}, r, s \in \mathbb{N}$, then $r+s$ is equal to ________.
Considering the principal values of inverse trigonometric functions, the value of the expression $\tan\left(2\sin^{-1}\left(\frac{2}{\sqrt{13}}\right) - 2\cos^{-1}\left(\frac{3}{\sqrt{10}}\right)\right)$ is equal to :
Let $\cos(\alpha + \beta) = -\frac{1}{10}$ and $\sin(\alpha - \beta) = \frac{3}{8}$, where $0 < \alpha < \frac{\pi}{3}$ and $0 < \beta < \frac{\pi}{4}$. If $\tan 2\alpha = \frac{3(1 - r\sqrt{5})}{\sqrt{11}(s + \sqrt{5})}, r, s \in \mathbb{N}$, then $r+s$ is equal to ________.
Considering the principal values of inverse trigonometric functions, the value of the expression $\tan\left(2\sin^{-1}\left(\frac{2}{\sqrt{13}}\right) - 2\cos^{-1}\left(\frac{3}{\sqrt{10}}\right)\right)$ is equal to :