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