Find the smallest positive number $p$ for which the equation $\cos(p\sin x)=\sin(p \cos x)$ has a solution $x\in[0,2\pi].$ Find the smallest positive number $p$ for which the equation 
$\cos(p\sin{x})=\sin(p\cos{x})$ has a solution $x$ belonging $[0,2\pi]$.
I am not able to solve this problem.
Please help me.

It must be that $p\sin{x}+p\cos{x}=\dfrac{\pi}{2}$ with, $p=\dfrac{\pi}{2(\sin{x}+\cos{x})}$.
So, to minimize $p$, $\sin{x}+\cos{x}$ must be maximized. 
$\sin{x}+\cos{x}=\sqrt{2} \sin\left(x+\dfrac{\pi}{4}\right)$, which is maximized when $\sin\left(x+\dfrac{\pi}{4}\right)=1$ at $x=\dfrac{\pi}{4}, \dfrac{7\pi}{4}$.
Hence, $p=\dfrac{\pi}{2\sin\left(\dfrac{\pi}{2}\right)}$.
$p=\dfrac{\pi}{2\sqrt2}$.
Hence, $x=\dfrac{\pi}{4}, \dfrac{7\pi}{4}$ in the interval $[0, 2\pi]$.
