Category Archives: Integration

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

1 Comment

Filed under Integration, Integration by Parts, Tabular Integration

Effect of Function Transformations on Integration

My year 12 Mathematical Methods students have questions like this

Given that f(x) is continuous everywhere and that \int_{4}^{10} f(x) dx=-10, find:

(a) \int_{4}^{10}2x +f(x) dx

(b) \int_{5}^{11} f(x-1) dx

(c) \int_{1}^{3} f(3x+1) dx

(d) \int_{-10}^{-4} -f(-x) dx

(e) \int{10}^{22} f(\frac{x-2}{2}) dx

(f) \int_{-3}^{-9} f(1-x) dx

OT Lee Mathematics Methods Textbook Ex 8.3 question 6

For the most part these questions aren’t too difficult, but the horizontal dilations cause issues.

(a) \int_{4}^{10} 2x +f(x) dx
\int_{4}^{10} 2x  dx +\int_{2}^{10} f(x) dx
(x^2]_4^{10} + (-10)
10^2-4^2-10
=74

(b) \int_{5}^{11} f(x-1) dx
=-10




(c) \int_{1}^{3} f(3x+1) dx
Let u=3x+1
\frac{du}{dx}=3
dx=\frac{du}{3}

When x=1, u=4 and when x=3, u=10
\int_{4}^10 f(u) \frac{du}{3}
=\frac{1}{3}\times (-10)
=\frac{-10}{3}

(d) \int_{-10}^{-4} -f(-x) dx
-\int_{-10}^{-4} f(-x) dx

Let u=-x
\frac{du}{dx}=-1
dx=-du

When x=-4, u=4 and when x=-10, u=10
-\int_{4}^{10} f(u) -dx
=-10

(e) \int_{10}^{22} f(\frac{x-2}{2} dx
Let u=f(\frac{x-2}{2})
\frac{du}{dx}=\frac{1}{2}
\du=2dx

When x=10, u=4 and when x=22, u=10
2\int_{4}^{10} f(u) du
=-20

(f) \int_{-3}^{-9} 2f(1-x) dx
Let u=1-x
\frac{du}{dx}=-1

When x=-3, u=4 and when x=-9, u=10
=-2\int_{4}^{10} f(u) du
=20


Split the integral
Integrate the first part.


This is a horizontal translation (one unit to the right) so the shape of the curve doesn’t change.
The integration bounds have also shifted one unit to the right.




This is a horizontal dilation and translation. The easiest method is to use a change of variable





































Once you get the hang of it, you can skip the change of variable and multiply the value of the definite integral by the scale factor of the horizontal dilation (only if the integration bounds are also changed).

Leave a Comment

Filed under Definite, Integration, Uncategorized, Year 12 Mathematical Methods

The Logistic Equation

My year 12 Specialist students are working on logistic growth at the moment. An example might be helpful.

A new viral disease was found to spread according to the equation \frac{dN}{dt}=kn(M-N), where M is the susceptible population, N is the number of people infected at time t months and k=1.5\times 10^{-9}. In March 2010, it was thought only 100 people out of a population of 18 million were infected. Use the logistic model to find the number infected in:

(a) March 2011

(b) June 2012

(c) January 2017

Specialist 12 – Nelson Senior Maths

\frac{dN}{dt}=kN(M-N)

\frac{dN}{dt}=(1.5\times10^{-9})N(18\times10^{6}-N)

\frac{dN}{N(18\times10^{6}-N)}=1.5\times10^{-9}dt

Use partial fractions to separate the denominator \frac{dN}{N(18\times10^{6}-N)}

\frac{1}{N(18\times10^{6}-N)}=\frac{A}{N}+\frac{B}{18\times10^{6}-N}

1=A(18\times10^{6}-N)+BN

When N=0

1=A(18\times10^{6})

A=\frac{1}{18\times10^{6}}

When N=18\times10^{6}

1=B(18\times10^{6})

B=\frac{1}{18\times10^{6}}

\frac{1}{18\times10^{6}}(\frac{1}{N}+\frac{1}{(18\times10^{6}-N)}dN)=1.5\times10^{-9}dt

\int\frac{1}{N}+\frac{1}{(18\times10^{6}-N)}dN=\int27\times10^{-3}dt

\ln|N|-\ln|18\times10^{6}-N|=(27\times10^{-3})t+c

\ln|\frac{N}{18\times10^{6}-N}|=(27\times10^{-3})t+c

\frac{N}{18\times10^{6}-N}=e^{(27\times10^{-3})t+c}

Let A=e^{c} and rearrange to make N the subject.

N=\frac{(18\times10^{6})Ae^{(27\times10^{-3})t}}{1+Ae^{(27\times10^{-3})t}}

Divide by Ae^{(27\times10^{-3})t}

N=\frac{(18\times10^{6})}{\frac{1}{A}e^{-(27\times10^{-3})t}+1}

Initially 100 people were infected.

100=\frac{(18\times10^{6})}{\frac{1}{A}+1}

A=\frac{1}{179999}

N=\frac{(18\times10^{6})}{179999e^{-(27\times10^{-3})t}+1}

(a) t=12, N=138.3, hence 138

(b) t=27, N=207.3, hence 207

(c) t=82, N=915.2, hence 915.

It is not necessary to solve the differential equation, you can use the formula

\frac{dP}{dt}=rP(k-P)\leftrightarrowP=\frac{kP_0}{P_0+(k-P_0)e^{-rkt}}

This formula is on the Year 12 Mathematics Specialist formula sheet for Western Australia.

For our question,

\frac{dN}{dt}=(1.5\times10^{-9})N(18\times10^6-N)

So, P=\frac{18\times10^{6}\times100}{100+(18\times10^6-100)e^{-(1.5\times10^{-9})(18\times10^6)t}}

And you can substitute values for t.

Leave a Comment

Filed under Differential Equations, Integration, Logistic Growth

Integrating by Trigonometric Substitution

Integrating by using a trigonometric substitution can be quite trick for some students.

For example, this question from OCR 4726 June 2009 Question 6

Trig Substitution Notes

PDF version of the above solution

Leave a Comment

Filed under Integration, Trigonometric Substitution