Find the number of solutions to the equation $\sin\left(\frac{\pi\sqrt x}4\right)+\cos\left(\frac{\pi\sqrt {2-x}}4\right)=\sqrt 2$ The following question appeared in a JEE Mock exam, held two days ago.
Question:
Find the number of solutions to the equation $\sin\left(\frac{\pi\sqrt x}4\right)+\cos\left(\frac{\pi\sqrt {2-x}}4\right)=\sqrt 2$
My Attempt:
I think if each term is $\frac1{\sqrt 2}$ then it would add upto $\sqrt 2$. So, $x=1$ is a solution.
How can we tell about other solutions, if any?
 A: From the comments, the domain is $[0,2]$.
Let $f(x)=\sin\left(\frac{\pi\sqrt x}4\right)+\cos\left(\frac{\pi\sqrt {2-x}}4\right)-\sqrt 2$
$f'(x)=\frac1{2\sqrt x}\frac\pi4\cos\left(\frac{\pi\sqrt x}4\right)+\frac1{2\sqrt{2-x}}\frac\pi4\sin\left(\frac\pi4\sqrt{2-x}\right)$
Angles of sine and cosine are varying from $0$ to $\frac\pi{2\sqrt2}$. That means $f'(x)\gt0$. Thus it crosses x-axis either once or never.
Also, since $f(x)$ is increasing, we only need to check values at domain end points.
$f(0)=\cos\left(\frac\pi{2\sqrt2}\right)-\sqrt2\lt0$
$f(2)=\sin\left(\frac\pi{2\sqrt2}\right)+1-\sqrt2$
$4\gt2\sqrt2\implies\frac\pi4\lt\frac\pi{2\sqrt2}\implies \sin\left(\frac\pi{2\sqrt2}\right)\gt\frac1{\sqrt2}\gt0.7$
Thus, $f(2)\gt0$
Thus, the given equation has one and only one solution.
A: $f(x)=\sin\left(\frac{\pi\sqrt x}4\right)+\cos\left(\frac{\pi\sqrt {2-x}}4\right)-\sqrt 2=0$
Check that $f'(x)>0$ in [0,2], $f(x)$ being  increasing function, it can have at most one root in the domain [0,2]. As $f(1)=0$, the single root is $x=1$
A: Let $x = 2 \cos^2 \theta, \theta \in \left[0, \dfrac{\pi}{2}\right]$
Then we have $\sin \left(\dfrac{\pi \cos \theta}{2\sqrt 2}\right) +\cos \left(\dfrac{\pi \sin \theta}{2\sqrt 2}\right) = \sqrt 2 $
Now if $\sin \theta > \cos \theta $ we have $\cos \left(\dfrac{\pi \sin \theta}{2\sqrt 2}\right)<\cos \left(\dfrac{\pi \cos \theta}{2\sqrt 2}\right)$ and hence
LHS  $< \sin \left(\dfrac{\pi \cos \theta}{2\sqrt 2}\right)+\cos \left(\dfrac{\pi \cos \theta}{2\sqrt 2}\right)<\sqrt 2$ (by a well known result) which contradicts equality condition.
Similarly we can argue that $\sin \theta \not < \cos \theta$. Hence we have $\sin \theta = \cos \theta = \dfrac{\pi}{4}$ and at which LHS=RHS.
Thus $\boxed{x=1}$ is the unique solution
