Intermediate problem using Chain Rule 
If $y=\frac{d}{dx} [\sin \sqrt{1+\cos (x)}]$ than, differentiate $x$.

$$\frac{d}{dx} [\sin \sqrt{1+\cos (x)}]$$
$$=\frac{d}{dx} [\sin (1+\cos (x))^{\frac{1}{2}}]$$
$$=\frac{1}{2} \cos (1+\cos (x))^{-\frac{1}{2}} (-\sin x)$$
$$=-\frac{\sin (x)}{2\cos (1+\cos (x))^\frac{1}{2}}$$
I found that the answer is wrong. I found the answer which was solved using
$$\frac{dx}{dy}=\frac{dx}{du} \frac{du}{dy} $$
But, I want to figure it out using 

I was trying to solve above question as I did for this
$$\frac{d}{dx}[\tan(x^2+1)]=\sec^2 (x^2+1) \cdot 2x$$
 A: $\sin((1+\cos(x))^{1/2})$ is what you want to differentiate not what your expression is  , Let the inner expression be $g(x)$ and now use the chain rule .
A: You made a mistake from the first to the second line. Suddenly the square root went out of the sine. It should be
$$\frac{\mathrm{d}}{\mathrm{d}x} \sin\left((1+\cos x)^{\frac{1}{2}}\right).$$
A: $$\frac{d}{dx}\sin (\sqrt{1+ \cos x })$$
Note : differentiate the outer function first which is $~\sin x $ and then inner function which is $\sqrt{1+ \cos x} $
Step 1 differentiating the outer function :
$$~\cos(\sqrt{1+cos x }) ~\frac{d}{dx}(\sqrt{1+ \cos x }) $$
Step 2 Differentiating the inner function :
$$= \frac{d}{dx}(\sqrt{1+ \cos x }) = \frac{1}{2}(1+\cos x)^{\frac {-1}{2}} { \frac{d}{dx}(1+ \cos x }) $$
step 3 :
$$ = { \frac{d}{dx}(1+ \cos x })= 0 -\sin x  $$
$$ = \frac{d}{dx}(\sqrt{1+ \cos x }) = \frac{1}{2}(1+\cos x)^{\frac {-1}{2}} (-\sin x)   $$
$$ = \frac{-\sin x}{2 {\sqrt{1 +\cos x }}} $$
Final step  :
$$ \frac{d}{dx}\sin (\sqrt{1+ \cos x }) = ~- \frac {\cos ({\sqrt{1+ \cos x})}~\sin x}{2 {\sqrt{1 +\cos x }} }$$
