According to wolframalpha
$$ \int f'(x)df(x) = f'(x) f(x) + constant $$
I am trying to get the RHS, but alas... I tried to apply integration by parts and to apply it twice
According to wolframalpha
$$ \int f'(x)df(x) = f'(x) f(x) + constant $$
I am trying to get the RHS, but alas... I tried to apply integration by parts and to apply it twice
Copyright © 2021 JogjaFile Inc.
Too long for comment: As you and MartinR suspect, WA is mistaken due to a bug* in the Wolfram Language function
Integratethat has been addressed (but not fixed!) as recently as version 13.2.0 of Mathematica.I happen to have just the right versions of Mathematica installed that demonstrate this. Here's the output from 12.2.0 :
And from 13.2.0 :
(NB:
Derivative[1][f][x]means "Derivativeof order1offwith respect tox", i.e. $f'(x)$)But this result is still not quite right (outside of Mathematica, anyway; it's possible this behavior is by design). The problem is that
Integrate[expr, var]is strictly integrating w.r.t.varand treats everything else constant. In this case the symbolf[x]is the variable, and the dependency onxis ignored. Similarly, computing a derivative w.r.t. $f(x)$ also gives a bad result in both aforementioned versions,whereas one might expect, using the chain rule,
$$\begin{align*} \frac{d}{df(x)}[f(x)f'(x)] &= f'(x) + f(x) \frac{df'(x)}{df(x)} \\ &= f'(x) + f(x) \frac{df'(x)}{dx} \frac{dx}{df(x)} \\ &= f'(x) + \frac{f(x)f''(x)}{f'(x)} \end{align*}$$
Doing the same for your original output, the same process yields
$$\begin{align*} \frac{d}{df(x)} \left[\frac12 f(x)^2 f'(x)\right] &= \frac12 \frac{df(x)^2}{df(x)} f'(x) + \frac12 f(x)^2 \frac{df'(x)}{df(x)} \\ &= f(x) f'(x) + \frac12 f(x)^2 \frac{df'(x)}{dx}\frac{dx}{df(x)} \\ &= f(x) f'(x) + \frac12 f(x)^2 \frac{f''(x)}{f'(x)} \end{align*}$$
which would mean WA's antiderivative only applies to a certain family of functions $f$, namely those for which $f'\neq0$ and $f''=0$.