# Minimum vertical distance between graph of y=2+sinx and y=cosx is ?

Jul 30, 2018

Subtracting the second function from first we get the resultant function representing the variable vertical distance between the graphs with variation of $x$

So let it be

$D \left(x\right) = 2 + \sin x - \cos x$

$\implies D \left(x\right) = 2 + \sqrt{2} \left(\sin x \cdot \frac{1}{\sqrt{2}} - \cos x \cdot \frac{1}{\sqrt{2}}\right)$

$\implies D \left(x\right) = 2 + \sqrt{2} \left(\sin x \cos \left(\frac{\pi}{4}\right) - \cos x \sin \left(\frac{\pi}{4}\right)\right)$

$\implies D \left(x\right) = 2 + \sqrt{2} \sin \left(x - \frac{\pi}{4}\right)$

$D \left(x\right)$ will be minimum when $\sin \left(x - \frac{\pi}{4}\right) = - 1$,the minimum value of sine function.

Hence

${\left[D \left(x\right)\right]}_{\text{min}} = 2 - \sqrt{2}$