Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Given $f(x)= \sin(\pi x)^{2}$, find the derivative.

Using the chain rule my work is as follows: $(\sin(\pi x)^2)'$ becomes $$2 \sin(\pi x) \cdot \frac{d}{dx}(\sin(\pi x)$$ The derivative of sin is cos, thus $$2 \sin(\pi x) \cdot \cos(\pi x) \cdot \frac{d}{dx}(\pi x)$$ The derivative of $\pi x$ is $\pi$, and the equation stretches to

$$2 \sin(\pi x) \cos(\pi x) \pi == 2 \pi \sin(\pi x) \cos(\pi x)$$

However, the book states the answer as $$2 \pi^{2}~ x ~\cos(\pi x)^{2}$$ and that definitely doesn't match my result. Where did I go wrong?


Thanks to Arturo Madigan, Jonas Meyer, et al for their help.

I re-did the problem based on having $(\pi x)^{2}$, having the exponent rather than the sin function, and it seems I have a missing exponent as well.

Differentiating the terms of the function via the chain rule, I get $$(\pi x)^{2} [\frac{d}{dx}sin] \cdot \frac{d}{dx}(\pi x)^{2}$$

$$ cos(\pi x)^{2} \cdot 2\pi x= 2~\pi~ x cos~(\pi x)^{2}$$

According to the book answer, $2~\pi x$ should actually be $2~ \pi^{2} x$

share|cite|improve this question
I don't think you have given the correct function. Was the original function $f(x)=\sin((\pi x)^2)$? It may have been written as $f(x)=\sin(\pi x)^2$, which is ambiguous, but you seem to have misinterpreted it as $(\sin(\pi x))^2=\sin^2(\pi x)$, and you wrote $\sin(\pi x)$. Will you please clarify? – Jonas Meyer Mar 7 '11 at 5:27
How did you go from $f(x)= sin(\pi x)$ to (it appears) $f'(x)=2 sin(\pi x) \cdot \frac{d}{dx}(sin(\pi x))$? The $2\sin(\pi x)$ appeared out of nowhere and there are mismatched parentheses. But Jonas Meyer may have a better guess. – Ross Millikan Mar 7 '11 at 5:29
@Ross Millikan, $2 sin(\pi x)$ is the derivative of $sin(\pi x)$ in the first stop using the chain rule. My work posted shows my attempt at going into the function. @Jonas Meyer, I wrote the function as it appears in the book. There is only one set of parenthesis, and the exponent is outside it. – Jason Mar 7 '11 at 5:34
@Jonas Meyer, its been edited. My mistake. – Jason Mar 7 '11 at 5:38
@Jason: Thank you. The missing exponent was the reason for PEV's and Dactyl's answers. – Jonas Meyer Mar 7 '11 at 5:41
up vote 3 down vote accepted

Given the answer, the question was for the derivative of $\sin\Bigl( (\pi x)^2\Bigr)$; instead, you computed the derivative of $\Bigl(\sin(\pi x)\Bigr)^2$.

If you were computing the derivative of the latter, then your computations are correct; the derivative is $2\pi\sin(\pi x)\cos(\pi x)$.

But if you were asked for the derivative of $\sin\Bigl((\pi x)^2\Bigr)$, then of course you were looking at the wrong function, and that's why the answers don't match.

It's possible you had "$\sin(\pi x)^2$" and interpreted this as $(\sin(\pi x))^2$; usually, $\sin^2(\pi x)$ is used for the latter, so "$\sin(\pi x)^2$" would be interpreted as $\sin\Bigl((\pi x)^2\Bigr)$.

share|cite|improve this answer
+1 Great detective work. Should not be required, but I am not sure whether to complain to OP, his textbook, or the math establishment. – Ross Millikan Mar 7 '11 at 5:40
but how do you know which to compute for? The book does give examples of how parenthesis placement can affect computation but $sin x^{2}$ can also be written as $sin^{2} x$, which adds to my confusion – Jason Mar 7 '11 at 5:40
@Ross Millikan, I'd definitely say the math prof & book play a large part, but I also have to factor in my lack of sleep studying for the exam. The prof is a great guy, but its very hard to follow along with what he's saying in the class, which is why I have my laptop running the whole time so I can double-check what he's talking about. – Jason Mar 7 '11 at 5:43
@Jason: Since I would use $\sin^2(\pi x)$ for the function $\Bigl(\sin (\pi x)\Bigr)^2$, then it seems reasonable that the other notation, $\sin (\pi x)^2$, is being used to mean something else, namely $\sin\Bigl( (\pi x)^2\Bigr)$. It's bad use of notation on the part of the book (there should be that second set of parentheses to make everything clear), but it's a process of elimination ("if they had meant x they would have written it this way; they didn't write it this way, so they must have meant y instead"). – Arturo Magidin Mar 7 '11 at 5:44
I'm reminded of a sign that was supposedly posted in a newsroom (back in the day of lead type)-"the composing room has an infinite supply of periods to terminate short, complete sentences". Maybe that applies to parentheses, too. We got lots of 'em, so use 'em liberally. – Ross Millikan Mar 7 '11 at 5:51

The derivative is $\pi \cos(\pi x)$.

share|cite|improve this answer
You're right, but why does the sin cancel out in the book answer? – Jason Mar 7 '11 at 5:21
Based on the OP's steps and the answer in the back of the book, I'm pretty sure $\sin(\pi x)$ was not intended. (I elaborate in my comment on the question.) – Jonas Meyer Mar 7 '11 at 5:28

Think of the function $\sin(\pi x)$ like this: $x \to \pi x \to \sin(\pi x)$. In which case it is intuitively clear that the rate of change of the function should be the multiplication of the rate of changes of $x \to \pi x$ and $y \to \sin (y)$, the latter being evaluated at $y=x$. Hence PEV's answer.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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