Chain rule to differentiate $\sin ^2\frac{x}{2}$ I have this equation $$\sin ^2(\frac{x}{2})$$
Using the chain rule $
M'(N(x)).N'(x)$:
$$\begin{align*}
&M= (\sin \frac{x}{2})^2 \\
&N= \frac{x}{2}\end{align*}$$
That makes
$$2\sin \frac{x}{2}*\frac{1}{2}$$ or $$\sin \frac{x}{2}$$
Going again, we should have 
$$\frac{1}{2} \cos \frac{x}{2}$$ or $$\frac{\cos \frac{x}{2}}{2}$$
Yet solution is giving me
$$(\sin \frac{x}{2})(\cos \frac{x}{2})$$
Why...?
 A: $2\sin(x/2)\cdot\cos(x/2)\cdot\frac{1}{2}=\sin(x/2)\cdot\cos(x/2)$
The problem is that you took the derivative of $x/2$ twice. For the chain rule and future complicated problems, think of going from the outside to the inside so as to prevent taking the derivatives of the same expression twice.
Also, once you took the derivative of $\sin^2$ you have to keep the $\sin$ and not take the derivative again.
A: Write down
$$\begin{cases}h(x)=x^2\\g(x)=\sin x\\k(x)=\frac x2\end{cases}\;\;\implies \sin^2\frac x2=h\circ g\circ k(x)=h(g(k(x)))\implies$$
$$\left(\sin^2\frac x2\right)'=h'(g(k(x))\cdot g'(k(x))\cdot k'(x)=2\sin\frac x2\cdot\cos\frac x2\cdot\frac12=\frac12\sin x$$
using the trigonometric identity
$$\sin2\alpha=2\sin\alpha\cos\alpha$$
A: Let $u=sin(\frac{x}2)$
Apply the chain rule we get $\frac{d}{dx}sin^2(\frac{x}2)=\frac{d}{du}(u^2)\frac{d}{dx}(sin(\frac{x}2))$
$\frac{d}{du}(u^2)=2u$
$\frac{d}{dx}(sin(\frac{x}2))=\frac12cos(\frac{x}2)$
So $$\frac{d}{du}(u^2)\frac{d}{dx}(sin(\frac{x}2))=2u(\frac12)cos(\frac{x}2)=ucos(\frac{x}2)=sin(\frac{x}2)cos(\frac{x}2)$$
A: Note: $\frac{d}{dx}$ and $'$ denote the derivative.
$$y=\sin^2\left(\frac{x}{2}\right)=\left(\sin\frac{x}{2}\right)^2$$
I will refer to $2$ as my power, $\sin$ as my expression, and $x/2$ as my angle. Basically, we are using chain rule twice.
Chain rule says we'll get power times expression to power minus one times derivative of expression times derivative of expression. Generally this:
$$2(\exp)^1(\exp')$$
For your problem
$$y'=2\left(\sin\frac{x}{2}\right)^1\cdot\left(\frac{d}{dx}\sin\left(\frac{x}{2}\right)\right)$$
Now, for taking the derivative of $\sin\frac{x}{2}$, we use chain rule again. Generally, it's derivative of angle times derivative of expression of angle, or this:
$$\text{ang}'\cdot \exp'(\text{ang})$$
For you
$$\frac{d}{dx}\sin\frac{x}{2}=\frac{1}{2}\cos\frac{x}{2}$$
Putting it all together:
$$y'=2\left(\sin\frac{x}{2}\right)^1\left(\frac{1}{2}\cos\frac{x}{2}\right)$$
Cancelling $2$ and $1/2$:
$$y'=\sin\frac{x}{2}\cdot\cos\frac{x}{2}$$
Using double ange formula for sine:
$$y'=\frac{1}{2}\sin x$$
