Examples of a function whose derivative looks much simpler than the original function

derivativesintegration

In many cases when we differentiate a function, we get a more complicated-looking function. For example, the derivative of $f(x) = \frac{x+1}{x^2+1}$ is $f'(x) = -\frac{x^2+2x-1}{(x^2+1)^2}$. There are also functions whose derivative does not increase in complexity in terms of its expression, such as $(\sin x)' = \cos x$ and $(\ln x)' = \frac{1}{x}$.

What I am interested here are functions whose derivative looks much simpler – so that one gets a really satisfying experience when differentiating the function because there are tremendous cancellations and simplifications. Of course this is another way of asking for simple-looking functions having a complicated-looking antiderivative. Examples are $\int \sqrt{\tan x} \ dx$ and $\int \sqrt[3]{\tan x} \ dx$, although I'd say these are too extreme for my purpose (You will see what I mean if you integrate $\sqrt{\tan x}$ and $\sqrt[3]{\tan x}$). On the other hand, $\int \ln x \ dx = x \ln x – x + C$ is a very mild example that fits into this category. I welcome any examples, but preferably those that fall between these two extremes.

I understand that this is a mathematically vague question, but I do hope to see if there are interesting examples that pop up.

Best Answer

As noted in other answers already, you can start with a simple expression and integrate it. There is a caveat: sometimes the integral can be simplified, in which case it seems to me that the integral you get initially (before simplification) does not really meet the conditions of the question, since the "cancellations and simplifications" are not completely due to integration. So we want to use the simplest form of the integral we can find.

And of course you can always tack a constant term onto any formula which will disappear when you take the derivative, so let's try to avoid doing that either explicitly or implicitly.

The web pages https://www.integral-table.com/ and https://www.math.stonybrook.edu/~bishop/classes/math126.F20/CRC_integrals.pdf can provide some inspiration since they make it easy to browse for complicated expressions on the right-hand side without a lot of trial and error.


Powers of the sine or cosine are an obvious source of examples. The positive even powers have the cute feature that one of the terms in their integrals is a multiple of $x$, which at first glance would not seem likely to combine with the rest of the integral (trig functions) in any useful way.

\begin{align} \frac{\mathrm d}{\mathrm dx}\left(\frac x2-\frac{\sin(2x)}{4}\right) &= \sin^2 x,\\ \frac{\mathrm d}{\mathrm dx}\left( \frac38 x - \frac14 \sin(2x) + \frac1{32}\sin(4x) \right) &= \sin^4 x,\\ \frac{\mathrm d}{\mathrm dx}\left( \frac5{16}x - \frac{15}{64} \sin(2x) + \frac3{64} \sin(4x) - \frac1{192} \sin(6x) \right) &= \sin^6 x. \end{align}

There's nothing too weird on on the left side, just a linear term in $x$ plus some sines of multiples of $x$ that do not combine in any particularly nice way until you happen to take their derivatives.

There is a similar set of integrals with cosine instead of sine, of course. On the right hand side of the equation is a function that varies periodically around an average value; the function on the left is $x$ times the average value, plus whatever terms it takes to create the periodic variation that is so concisely expressed once you take the derivative.

The formulas on the left get even more complicated if you try to express them in terms of $\sin x$ and $\cos x$ rather than functions of multiples of $x$, but that violates the principle of using the simplest form of the integral.

We can also try integrals of powers of sine or cosine multiplied by powers of $x$. For example,

\begin{align} \frac{\mathrm d}{\mathrm dx}\left( \frac14 x^2 - \frac14 x \sin(2x) - \frac18 \cos(2x) \right) &= x \sin^2 x,\\ \frac{\mathrm d}{\mathrm dx}\left( \frac16 x^3 - \frac14 x \cos(2x) + \frac1{24} (3 - 6 x^2) \sin(2x) \right) &= (x \sin x)^2,\\ \frac{\mathrm d}{\mathrm dx}\left( 2x \sin x - (x^2 - 2) \cos x \right) &= x^2 \sin x,\\ \frac{\mathrm d}{\mathrm dx}\left( (3 x^2 - 6) \sin x - (x^3 - 6x) \cos x \right) &= x^3 \sin x,\\ \frac{\mathrm d}{\mathrm dx}\left( (4 x^3 - 24 x) \sin x - (x^4 - 12 x^2 + 24) \cos x \right) &= x^4 \sin x. \end{align}

Not surprisingly, given the relationship between the exponential function and the sine and cosine, we can do something similar with powers of $x$ multiplied by $e^x$:

\begin{align} \frac{\mathrm d}{\mathrm dx}\left( (x^2 - 2 x + 2)e^x \right) &= x^2 e^x,\\ \frac{\mathrm d}{\mathrm dx}\left( (x^3 - 3 x^2 + 6 x - 6)e^x \right) &= x^3 e^x,\\ \frac{\mathrm d}{\mathrm dx}\left( (x^4 - 4 x^3 + 12 x^2 - 24 x + 24)e^x \right) &= x^4 e^x. \end{align}

Note that the integral of $x^n \sin x$ can be derived from the integral of $x^n e^x$ and Euler's formula. It's also little easier to see here how the derivatives of the various powers of $x$ multiplied by $e^x$ combine in a cascade of cancellation to leave only one term in the end.

Unlike the case with the trig functions, however, we don't seem to get anything particularly new by taking higher powers of $e^x$:

$$ \frac{\mathrm d}{\mathrm dx}\left( \frac1{32} (8 x^2 - 4 x + 1)e^{4 x} \right) = x^2 e^{4 x}. $$

The integrals of odd powers of secant and cosecant include logarithmic terms. For the higher powers, there are also terms in trig functions without the logarithm. I'm not sure whether this is a bonus or too weird.

\begin{align} \frac{\mathrm d}{\mathrm dx}\left( \frac12 \sec x\tan x + \frac12 \ln \lvert\sec x+\tan x\rvert \right) &= \sec^3 x,\\ \frac{\mathrm d}{\mathrm dx}\left( \frac14 \sec^3 x \tan x + \frac38 \sec x \tan x + \frac38 \ln\lvert\sec x + \tan x\rvert \right) &= \sec^5 x. \end{align}

In the realm of integrals of rational functions we also get some surprising but perhaps too-weird results such as $$ \frac{\mathrm d}{\mathrm dx}\left( \frac12 \ln(x^2 + 2x + 2) - \arctan(x + 1) \right) = \frac{x}{x^2 + 2x + 2}, $$ due to the particular forms of the derivatives of the logarithm and arc tangent of polynomials.

As with polynomials in $x$ multiplied by $\sin x$ or $e^x$, we can get some interesting cancellation by multiplying a polynomial in $x$ by something like $\sqrt{x+1}$.

\begin{align} \frac{\mathrm d}{\mathrm dx}\left( \frac2{105} (15 x^2 - 12 x + 8) (x + 1)^{3/2} \right) &= x^2 \sqrt{x + 1},\\ \frac{\mathrm d}{\mathrm dx}\left( \frac2{315} (35 x^3 - 30 x^2 + 24 x - 16) (x + 1)^{3/2} \right) &= x^3 \sqrt{x + 1}. \end{align}

The logarithm is interesting in that its own powers can form a chain of cancellation:

\begin{align} \frac{\mathrm d}{\mathrm dx}\left( ((\ln x)^2 - 2 \ln x + 2)x \right) &= (\ln x)^2,\\ \frac{\mathrm d}{\mathrm dx}\left( ((\ln x)^3 - 3 (\ln x)^2 + 6 \ln x - 6) x \right) &= (\ln x)^3,\\ \frac{\mathrm d}{\mathrm dx}\left( ((\ln x)^4 - 4 (\ln x)^3 + 12 (\ln x)^2 - 24 \ln x + 24) x \right) &= (\ln x)^4. \end{align}

Related Question