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})$$


  • $\begingroup$ I'm guessing you want to compute the derivative of that function, right? $\endgroup$ – DonAntonio May 27 '16 at 21:31
  • $\begingroup$ You didn't put $\sin$ in the formula for $N$ $\endgroup$ – alphacapture May 27 '16 at 21:32
  • $\begingroup$ Hi @Joanpemo yes $\endgroup$ – Andy K May 27 '16 at 21:33
  • 1
    $\begingroup$ This reminds me of your previous question math.stackexchange.com/q/1800510/72031 and the answer is again same. Try to figure out how we can get from $x$ to $f(x) = \sin^{2}(x/2)$. This happens via $x \to x/2 = A \to \sin (A) = B \to B^{2} = f(x)$ and hence reversing the order and taking derivatives we get $f'(x) = (2B)(\cos A)(1/2) = B\cos A = \sin A\cos A = \sin(x/2)\cos(x/2)$. $\endgroup$ – Paramanand Singh May 29 '16 at 9:55
  • 1
    $\begingroup$ Looking at this question and the one linked in my previous comment, it appears that you have some trouble identifying $f(x)$ as a composite of other functions. This can be a problem in beginning but once you start thinking about going from $x$ to $f(x)$ in step by step manner using simpler functions you won't have any issue. $\endgroup$ – Paramanand Singh May 29 '16 at 10:00

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


  • $\begingroup$ very interesting. I need to double check the stuff $\endgroup$ – Andy K May 27 '16 at 21:41
  • $\begingroup$ It is just hte application of the chain rule three times. You can easily get it with a little and easy inductive argument, and observing that $$h\circ g\circ k=(h\circ g)\circ k$$ $\endgroup$ – DonAntonio May 27 '16 at 21:44
  • $\begingroup$ Hi @Joanpemo, many thanks for your answer. It is clear and easy. Yet, when do you know you should $h\circ g\circ k(x)$ and when you should do something else ...? What are the rules, if there are any? $\endgroup$ – Andy K May 28 '16 at 14:40
  • $\begingroup$ points are yours , Sir. $\endgroup$ – Andy K May 28 '16 at 14:46
  • 1
    $\begingroup$ @AndyK As in many other cases, practice and experience. Yet, as the chain rule works wonderfully, you do not need to apply it in in any specific order . You only need to recognize the different functions and differentiate them carefully and then take the whole product. $\endgroup$ – DonAntonio May 28 '16 at 15:47


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.

  • $\begingroup$ Hi @Ken, thanks for your answer. $\endgroup$ – Andy K May 28 '16 at 14:45

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))$

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)$$

  • $\begingroup$ HI @Joanna, thanks for your answer. $\endgroup$ – Andy K May 28 '16 at 14:45

Note: $\frac{d}{dx}$ and $'$ denote the derivative.


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:


For your problem


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


Putting it all together:


Cancelling $2$ and $1/2$:


Using double ange formula for sine:

$$y'=\frac{1}{2}\sin x$$

  • $\begingroup$ Hi @lanier-freeman, I would say it is very impressive. I would say one thing though: A good explanation is always handy. All the best for next year in Georgia Tech. $\endgroup$ – Andy K May 28 '16 at 14:43
  • $\begingroup$ You're correct, would you still like an explanation of my steps? $\endgroup$ – Lanier Freeman May 28 '16 at 14:48
  • $\begingroup$ It would be great, so yes $\endgroup$ – Andy K May 28 '16 at 14:52
  • $\begingroup$ Steps added. If you need any additional explanation, let me know. $\endgroup$ – Lanier Freeman May 28 '16 at 15:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.