Category Archives: Integration by Parts

More Integration

I went down a rabbit hole while reading An Imaginary Tale by Paul J Nahin and I decided I wanted to do this…

    \begin{equation*}\int_0^1{x^x dx}\end{equation}

    \begin{equation*}x^x=e^{ln(x^x)}\end{equation}

    \begin{equation*}x^x=e^{xln(x)}\end{equation}

The power series expansion of e^x is

    \begin{equation*}e^x=1+x+\frac{1}{2!}x^2+\frac{1}{3!}x^3+\frac{1}{4!}x^4+...\end{equation}

    \begin{equation*}\therefore e^{xln(x)}=1+xln(x)+\frac{1}{2!}(xln(x))^2+\frac{1}{3!}(xln(x))^3+...\end{equation}

    \begin{equation*}\therefore e^{xln(x)}=\Sigma_{n=0}^{\infty}(\frac{1}{n!}(xln(x))^n)\end{equation}

Hence \int_0^1{x^x dx}=\int_0^1(\Sigma_{n=0}^{\infty}(\frac{1}{n!}(xln(x))^n dx)

    \begin{equation*}=\Sigma_{n=0}^{\infty}(\frac{1}{n!}\int_0^1xln(x))^n dx)\end{equation}

Let’s consider the integral

(1)   \begin{equation*}\int_0^1 x^n(ln(x))^n dx\end{equation*}

Let u=ln(x) then \frac{du}{dx}=\frac{1}{x} and dx=x du where x=e^u

When x=0, u=-\infty and when x=1, u=0

(2)   \begin{equation*}\int_0^1 x^n(ln(x))^n dx=\int_{-\infty}^0 e^{nu}u^ne^u du\end{equation*}

(3)   \begin{equation*}\int_0^1 x^n(ln(x))^n dx=\int_{-\infty}^0 e^{(n+1)u}u^n du\end{equation*}

Integrate by parts using the tabular method.

SignDifferentiateIntegrate
+u^ne^{(n+1)u}
nu^{n-1}\frac{e^{(n+1)u}}{n+1}
+n(n-1)u^{n-2}\frac{e^{(n+1)u}}{(n+1)^2}
n(n-1)(n-2)u^{n-3}\frac{e^{(n+1)u}}{(n+1)^3}
+\frac{n!}{(n-4)!}u^{n-4}\frac{e^{(n+1)u}}{(n+1)^4}
\vdots\vdots
\frac{n!}{(n-n)!}u^{n-n}\frac{e^{(n+1)u}}{(n+1)^{n}}
(-1)^n0\frac{e^{(n+1)u}}{(n+1)^{n+1}}

When we substitute u=-\infty or u=0 the differentiation column is zero except for \frac{n!}{(n-n)!}u^{n-n}, which is n!,

Thus \int_0^1 x^n(ln(x))^n dx=\frac{e^{(n+1)u}}{(n+1)^{n+1}}}]_{-\infty}^0

    \begin{equation*}=n!\times\frac{e^0}{(n+1)^{n+1}}-0\end{equation}

    \begin{equation*}=\frac{n!}{(n+1)^{n+1}}\end{equation}

Now we just need to think about the sign.

    \begin{equation*}=(-1)^n\frac{n!}{(n+1)^{n+1}}\end{equation}

The integral is now

\int_0^1{x^x dx}=(\Sigma_{n=0}^{\infty}(\frac{1}{n!}( (-1)^n\frac{n!}{(n+1)^{n+1}})

So \int_0^1{x^x dx}=\Sigma_{n=0}^{\infty}( (-1)^n\frac{1}{(n+1)^{n+1}}

Let’s work out some partial sums

n((-1)^n\frac{1}{(n+1)^{n+1}})
5=0.78343
10=0.78343
20=0.78343
100=0.78343

\int_0^1{x^x dx}=0.778343

Leave a Comment

Filed under Definite, Integration, Integration by Parts, Tabular Integration

Integration by Parts using the Tabular Method

(1)   \begin{equation*}\int_0^1x^2e^xdx\end{equation*}

I am going to do this integral in two ways; the traditional method and the tabular method.

Traditional Method

Remember \int{u dv}=u\times v-\int{v du}

Let u=x^2 and dv=e^x

Then du=2x and v=\int{e^x dx}=e^x

    \begin{equation*}\int_0^1{x^2e^x dx}=x^2 \times e^x ]_0^1-\int_0^1{e^x 2x dx}\end{equation}

Now we need to do integration by parts on \int_0^1{e^x 2x dx}

Let u=2x and dv=e^x

Then du=2 and v=e^x

    \begin{equation*}\int_0^1{x^2e^x dx}=x^2 \times e^x ]_0^1-(2x\times e^x]_0^1-\int_0^1{e^x 2 dx})\end{equation}

    \begin{equation*}\int_0^1{x^2e^x dx}=x^2 \times e^x ]_0^1-(2x\times e^x]_0^1-(2e^x )]_0^1)\end{equation}

    \begin{equation*}\int_0^1{x^2e^x dx}=e-(2e-(2e-2))\end{equation}

    \begin{equation*}\int_0^1{x^2e^x dx}=e+2\end{equation}

Tabular Integration

Similar to before, select a u and a dv, u=x^2 and dv=e^x

SignD(ifferentiate)I(ntegrate)
+x^2e^x
2xe^x
+2e^x
0e^x

Stop when the differentiating column reaches zero.

Then we multiply diagonally

(+x^2)(e^x)+(-2x)(e^x)+(+2e^x)

=x^2e^x-2xe^x+2e^x]_0^1

=e-2e+2e-(0-0-2)

=e+2

It is only worth using this method if integration by parts is required more than once. Also, the u has to eventually differentiate to 0.

Let’s try another one

(2)   \begin{equation*}\int{x^3cos(2x) dx}\end{equation*}

Let u=x^3 and dv=cos(2x)

SignDI
+x^3cos(2x)
3x^2\frac{1}{2}sin(2x)
+6x-\frac{1}{4}cos(2x)
6-\frac{1}{8}sin(2x)
+0\frac{1}{16}cos(2x)

\int{x^3cos(2x) dx}=(x^3)(\frac{1}{2}sin(2x))+(-3x^2)(-\frac{1}{4}cos(2x))+(6x)(-\frac{1}{8}sin(2x))+(-6)(\frac{1}{16}cos(2x))+c

=\frac{x^3}{2}sin(2x)+\frac{3x^2}{4}cos(2x)-\frac{3x}{4}sin(2x)-\frac{3}{8}cos(2x)+c

Leave a Comment

Filed under Integration, Integration by Parts, Tabular Integration