$\int\sec^3x\,dx$; the integral of a function raised to some power is equal to a fraction of the sum of its integral and its derivative.

While looking at the solution

$$\int\sec^3x\,dx \,=\, \frac 12\ln|\sec x + \tan x|\,+\,\frac 12 \sec x \tan x+C\,,$$ from integration by parts, I see that $\frac d{dx}\sec x$ is formed by both $u=\sec x$ and $v=\tan x$ when we let $\int\sec^3x\,dx=\int u\,dv$ so $$\int\sec^3x\,dx \,=\, \frac 12\left(\int\sec x\,dx\,+\,\frac d{dx}\sec x\right)+C\,.$$

I find that this is a simple way to remember the result from now on (and avoid having to evaluate the integral to convince myself) but I wonder why such a nice result happens with this integral and

is it trivial that the integral of a function raised to some power is equal to a fraction of the sum of its integral and its derivative?

Why does this happen with this particular integral and are there other interesting examples of similar behavior?

Thanks for the input!

• Just for clarity, you're asking if/when $uv = u^\prime$? – Will Craig Apr 11 '17 at 19:05
• @WillCraig I mean that the integral of the function cubed is equal to half the integral of the function plus half the derivative of the function. Now that I wrote it this way I see that it sound much better, I will edit the question I agree that it is not quite clear right now, thank you. – user409521 Apr 11 '17 at 19:53
• Oh I see that now. That's much more interesting. – Will Craig Apr 11 '17 at 20:26
• This a product of the over all method known as the reduction formula for secant, you can actually work out the more general case. There is in fact a whole Wikipedia article written specifically for this particular integral en.m.wikipedia.org/wiki/Integral_of_secant_cubed – Triatticus Apr 11 '17 at 20:39

Following a similar pattern, $$\int\csc^3x dx=\frac 12\left(\int csc x dx+\frac{d}{dx}\csc x\right)$$

On a similar theme, $$\int \operatorname{sech}^3x dx=\frac 12\left(\int\operatorname{sech} xdx\color{red}{-}\frac {d}{dx}\operatorname{sech} x\right)$$

This question appears to be asking when $uv = u^\prime$. We can solve this as follows (we let $u = u(t), v = v(t)$);

$$uv = \dfrac{du}{dt} \implies v dt = \dfrac{du}{u} \implies \int vdt = \int \dfrac{du}{u} \implies \ln{|u|} + C = \int vdt$$

This suggests that such convenient properties occur whenever the antiderivative of $v$ is expressible as a logarithm. In the case given, we have that $\int \tan{t}dt = -\ln{|cos{x}|} + C$. I am not aware of any other integrals that work this way that are not either trivial ($v = 1/t$) or essentially the same as this ($u = \csc{t}, v = \cot{t}$) but if anyone else is aware of some I would love to see!

Taking the derivative of both sides of $$\int\sec^3(x)\ dx = \frac{1}{2}\left(\int\sec(x)\ dx+\frac{d}{dx}\sec(x) \right)$$ shows that $\sec(x)$ satisfies the differential equation: $$y^3 = \frac{1}{2}(y+y'').$$ Now, we can are in a position to generalize this; we can search for solutions to the differential equation $$y^n=\frac{1}{k}(y+y'')\quad\Leftrightarrow\quad y'' = ky^n-y = f(y)$$ for $k>0$ and $n\in\mathbb{Z}_{\geq 0}$. This is a second order autonomous ODE, and has the following implicit solution: $$K\pm x = \int\frac{1}{\sqrtC+2\int f(y)\ dy}}\ dy = \int\frac{1}{\sqrt{\frac{2k}{n+1}y^{n+1}-y^2+C}}\ d$$ for $C$ and $K$ arbitrary constants. In the case where $n=3$, $k=2$, $C=K=0$, and we take positive $x$ on the left we have the solution $$x = \int\frac{1}{\sqrt{y^4-y^2}}\ dy = \int\frac{1}{|y|\sqrt{y^2-1}}\ dy = \operatorname{arcsec}(y)+A$$ and therefore $y=\sec(x-A)$. When $K=0$, the left hand side is $-x$, and $n=3$, $k=2$, and $C=0$, we have $$x = \int\frac{-1}{\sqrt{y^4-y^2}}\ dy = \int\frac{-1}{|y|\sqrt{y^2-1}}\ dy = \operatorname{arccsc}(y)+A$$ and so $y=\csc(x-A)$. Taking $f(y) = y-ky^n$ will give you things like David Quinn's second example. Maybe the masters of integration around here will have more to say about integrals of the form: $$\int\frac{1}{\sqrt{\frac{2k}{n+1}y^{n+1}-y^2+C}}\ dy.$$

• Very interesting, thanks for the insight! – user409521 Apr 12 '17 at 15:46
• @InfiniteMonkey Happy to help! – user171308 Apr 12 '17 at 16:08

We can consider the reduction formula:

$$I_n=\int sec^n(x)dx \ s.t. \ n>2$$

Expressing $sec^nx=sec^{n-2}x\cdot sec^2x$ we have:

$$I_n=\int (sec^{n-2}(x)sec^2(x))dx$$

Integrating by parts, and setting $f=sec^{n-2}(x)$ and $g'=sec^2(x)$,

$$I_n=sec^{n-2}(x)tan^2(x)-(n-2)\int (sec^{n-2}(x)tan^2(x))dx$$

$$=sec^{n-2}(x)tan^2(x)-(n-2)\int (sec^{n-2}(x)(sec^2(x)-1))dx$$

$$=sec^{n-2}(x)tan^2(x)-(n-2)(I_n-I_{n-2})$$

Solving for $I_n$, we get:

$$I_n=\frac {sec^{n-1}(x)sin(x)}{n-1}+\frac {n-2}{n-1}I_{n-2}$$

So as $n$ increases, we get a summation of terms including only $sec^{n-2}(x)tan(x)$ and integrals of $sec$, two degrees below the previous integration.