[Math] Why can’t I use the chain rule to solve this trigonometric integration

calculusintegration

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

Best Answer

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