# Why can't I use the chain rule to solve this trigonometric integration?

The question is: what is the indefinite integral: $\int \sin^2(kx) \, \mathrm dx$?

I get the correct answer using trig identities to change the $(\sin(kx))^2$ into $\dfrac{1}{2} - \dfrac{(\cos(2kx))}{2}$ and integrating that. But why can't I just integrate the outermost function $(x^2)$ and then divide by the derivative of the inner function giving $\dfrac{(\sin(kx))^3}{3k\cos(kx)} + c$?

• Puzzling question. Nov 10, 2013 at 4:03
• Because the chain rule is for derivatives, not integrals? You can't just use the chain rule in reverse that way and expect it to work. (It doesn't even work for simpler examples, e.g., what is the integral of $(x^2+1)^2$?) Nov 10, 2013 at 4:08
• A "rule" is actually a theorem which has hypotheses and conclusions. What are the hypotheses for the chain rule? Nov 10, 2013 at 4:14
• @BrenBarn so how would you integrate the equation you have given? Nov 10, 2013 at 4:31
• @Heisenbugs: Expand it out and integrate term by term. Nov 10, 2013 at 4:32

The chain rule does say something about integrals, but not what you seem to think. The chain rule says $$\dfrac{d}{dx}f(g(x)) = f'(g(x)) g'(x)$$ Integrating both sides gives you $$\int f'(g(x)) g'(x)\ dx = f(g(x)) + C$$ Now you can't just divide out the $g'(x)$ from the left side, because that $g'(x)$ is inside the integral: $\dfrac{1}{g'(x)} \int f'(g(x)) g'(x) \ dx$ is not the same as $\int f'(g(x))\ dx$.
• Okay, I think that makes sense. However, the reason why I thought to do the question the way I did in the first place is because in the notes I have it says you can integrate composite functions by integrating the outer function and then dividing by the derivative of the inner function. The example it gives is $(2x + 3)^5$. Why would it work in this case, but not like the one given in the comment above: $(x^2 + 1)^2$? Nov 10, 2013 at 4:42
$$\frac{(\sin(kx))^3}{3k\cos(kx)}$$
If you differentiate the expression above, the derivative of the numerator is $$3(\sin(kx))^2\cdot 3k\cos(kx) \cdot \underbrace{\frac{d}{dx}(2k\cos(kx))}.$$
• You entirely neglected the part over the $\underbrace{\text{underbrace}}$;