# Integration of derivatives

I've recently finished my high school math finals and have come across this integral that gave me some issues: $$\int f^2(x)f'(x)\,dx$$ (the exact function does not matter here)
Initially, I solved it like this: $$y=f(x)$$ $$\int f^2(x)f'(x)\,dx = \int y^2\frac{dy}{dx}\,dx$$ cancel dx's out: $$=\int y^2dy = \frac{1}{3}y^3 + C$$ however, from what I've heard, you can't treat dy/dx as a fraction and canceling them out is not rigorous. In the exam I used IBP to solve this but I was wondering if there is a more detailed/right solution to this. $$\int udv = uv - \int vdu$$ $$u = y => du =y'dx$$ $$dv = y *y' dx => v =\frac{1}{2}y^2$$ $$\int y^2y'dx=y*\frac{1}{2}y^2-\int \frac{1}{2}y^2y'dx$$ $$\frac{3}{2}\int y^2y'dx=\frac{1}{2}y^3$$ $$\int y^2y'dx=\frac{1}{3}y^3+C$$

PS I realize that there is a formula to solve this type of integral, but my question is not about how to solve the integral but about the "canceling" of the dx.

– J.G.
Commented Jul 22 at 15:45

One way to handle this integral is to just note that $$f^2(x)f'(x) = \left(\frac13f^3(x)+C\right)'$$ so that $$\int f^2(x)f'(x)\,dx = \int \left(\frac13f^3(x)+C\right)' \, dx = \frac13f^3(x)+C$$ by the fundamental theorem of calculus.

• Yes, I do think this is a simpler/more-robust way of thinking about it rather than the relabelling and worrying about "cancelling differentials"... Commented Jul 22 at 19:19

Here is a short response to

from what I've heard, you can't treat dy/dx as a fraction and canceling them [the dx's] out is not rigorous

...

my question is not about how to solve the integral but about the "canceling" of the dx.

That cancellation is not rigorous, but it's not hard to replace it by a rigorous argument. Mathematicians and physicists treat dx algebraically that way knowing their arguments can be formalized if necessary.

Searching on this site for dy/dx fraction provides links that may help.

You got bad advice. You can very well simplify the differentials like you did, $$\dfrac{dy}{dx}dx=dy.$$ Or $$\dfrac{dy}{dx}\dfrac{dx}{dz}=\dfrac{dy}{dz}.$$

Anyway, this only works when there is a single independent variable, otherwise partial differentials can be involved.

I would solve your integration case more directly,

$$\int f^2(x)f'(x)\,dx=\int f^2(x)\,df(x)=\tfrac13 f^3(x)+C.$$

• but dy/dx is a function, so how can we separate dy from dx like it's a fraction? it seems improper Commented Jul 22 at 15:59
• @DoubleYouSlash: nope, $dy$ is defined to be $f'(x)\,dx$ where $dx$ is an independent variable. Review the definition of the differential. If the downvote is yours, feel free to undo. Commented Jul 22 at 16:05