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$?
$\endgroup$ 72 Answers
$\begingroup$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$.
$\endgroup$ 2 $\begingroup$$$ \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}}$;
- You entirely neglected the quotient rule. You cannot just differentiate the numerator and leave the denominator alone, unless the denominator is constant---and in this case, it is not.