Category Archives: Integration by Parts

Integration Question (much easier with Integration by Parts)

The Year 12 Mathematics Methods course doesn’t cover Integration by Parts, so they end up with questions like the following.

Determine the following:
(a) \frac{d}{dx} \left (e^{2x}sin(3x) \right )
(b) \frac{d}{dx} \left (e^{2x}cos(3x) \right )
Hence, determine the following integral by considering both parts (a) and (b)
\int_0^{\frac{\pi}{2}}13e^2xcos(3x) \enspace  dx

(a) Use the product rule

(1)   \begin{equation*}\frac{d}{dx} \left (e^{2x}sin(3x) \right)= 2e^{2x}sin(3x)+3e^{2x}cos(3x) \end{equation*}

(b)

(2)   \begin{equation*}\frac{d}{dx} \left (e^{2x}cos(3x) \right )=2e^{2x}cos(3x)-3e^{2x}sin(3x)\end{equation*}

I need to use equations 1 and 2 to find \int_0^{\frac{\pi}{2}}13e^2xcos(3x) \enspace  dx.

The e^{2x}sin(3x) terms need to vanish and I need 13 of the e^{2x}cos(3x) terms.

3\times \text{equation} (1)+ 2\times \text{equation} (2)

(3)   \begin{equation*}3\frac{d}{dx} \left (e^{2x}sin(3x) \right)= 6e^{2x}sin(3x)+9e^{2x}cos(3x) \end{equation*}

(4)   \begin{equation*}2\frac{d}{dx} \left (e^{2x}cos(3x) \right )=4e^{2x}cos(3x)-6e^{2x}sin(3x)\end{equation*}

Equation 3 plus equation 4

(5)   \begin{equation*}3\frac{d}{dx} \left (e^{2x}sin(3x) \right)+2\frac{d}{dx} \left (e^{2x}cos(3x) \right )=13e^{2x}cos(3x)\end{equation*}

Integrate both sides of the equation

\int_0^{\frac{\pi}{2}} \left (3\frac{d}{dx} \left (e^{2x}sin(3x) \right)+2\frac{d}{dx} \left (e^{2x}cos(3x) \right )  \right ) dx=\int_0^{\frac{\pi}{2}}13e^{2x}cos(3x) \enspace dx

By the fundamental theorem of calculus, we know

(3e^{2x}sin(3x) \right)+2 \left (e^{2x}cos(3x) \right ]_0^{\frac{\pi}{2}}=\int_0^{\frac{\pi}{2}}13e^{2x}cos(3x) \enspace dx

3e^{\pi}sin(\frac{3\pi}{2}})+2e^{\pi}cos(\frac{3\pi}{2}})-3e^0sin(3(0))-2e^0cos(3(0))=\int_0^{\frac{\pi}{2}}13e^{2x}cos(3x) \enspace dx

\int_0^{\frac{\pi}{2}}13e^{2x}cos(3x) \enspace dx=-3e^{\pi}-2

Integration by Parts

Remember \int u\enspace dv=uv-\int v \enspace du

\int_0^{\frac{\pi}{2}}e^{2x}cos(3x) \enspace dx

Let u=cos(3x), then du=-3sin(3x)

and dv=e^{2x}, then v=\frac{e^{2x}}{2}

\int_0^{\frac{\pi}{2}}e^{2x}cos(3x) \enspace dx = \left (cos(3x)\left (\frac{e^{2x}}{2}\right ) \right )_0^{\frac{\pi}{2}}-\int_0^{\frac{\pi}{2}} \frac{e^{2x}}{2}(-3sin(3x)) \enspace dx

\int_0^{\frac{\pi}{2}}e^{2x}cos(3x) \enspace dx=cos(\frac{3\pi}{2})(\frac{e^\pi}{2})-cos(0)(\frac{e^0}{2})+\frac{3}{2}\int_0^{\frac{\pi}{2}}sin(3x)e^{2x} \enspace dx

\int_0^{\frac{\pi}{2}}e^{2x}cos(3x) \enspace dx=-\frac{1}{2}+\frac{3}{2}\int_0^{\frac{\pi}{2}}sin(3x)e^{2x} \enspace dx

Let u=sin(3x), then du=3cos(3x)

and dv=e^{2x}. then v=\frac{e^{2x}}{2}

\int_0^{\frac{\pi}{2}}e^{2x}cos(3x) \enspace dx=-\frac{1}{2}+\frac{3}{2}(\frac{e^{2x}}{2}sin(3x)]_0^{\frac{\pi}{2}}-\int_0^{\frac{\pi}{2}} \frac{e^{2x}}{2}(3cos(3x)) \enspace dx)

\int_0^{\frac{\pi}{2}}e^{2x}cos(3x) \enspace dx=-\frac{1}{2}+\frac{3}{2}(-\frac{e^\pi}{2}-\frac{3}{2} \int_0^{\frac{\pi}{2}} e^{2x}cos(3x) \enspace dx)

\int_0^{\frac{\pi}{2}}e^{2x}cos(3x) \enspace dx=-\frac{1}{2}-\frac{3e^\pi}{4}-\frac{9}{4} \int_0^{\frac{\pi}{2}} e^{2x}cos(3x) \enspace dx

Collect like terms (the integrals are like)

\frac{13}{4}(\int_0^{\frac{\pi}{2}}e^{2x}cos(3x) \enspace dx)=-\frac{1}{2}-\frac{3e^\pi}{4}

(\int_0^{\frac{\pi}{2}}e^{2x}cos(3x) \enspace dx)=\frac{-2-3e^\pi}{13}

Leave a Comment

Filed under Algebra, Calculus, Integration, Integration by Parts, Year 12 Mathematical Methods

Integrating the Natural Log Function

One of the students asked me the other day how to integrate f(x)=ln(x) – it’s not part of their course, but I thought I would do it here.

We use integration by parts to integrate ln(x)

    \begin{equation*}\int u dv=uv-\int v du\end{equation}

    \begin{equation*}\int ln(x) dx\end{equation}

Let u=ln(x) and dv=1, then du=\frac{1}{x} and v=x

    \begin{equation*}\int ln(x) dx = xln(x)-\int x\times \frac{dx}{x}\end{equation}

    \begin{equation*}\int ln(x) dx = xln(x)-\int 1 dx\end{equation}

    \begin{equation*}\int ln(x) dx = xln(x)-x+c\end{equation}

What about \int 5ln(\sqrt{x}) dx

We can take advantage of log laws and the properties of integration.

    \begin{equation*}\int 5ln(\sqrt{x}) dx=5\int lnx^{\frac{1}{2}} dx=5\int \frac{1}{2}ln(x) dx=\frac{5}{2} \int ln(x) dx\end{equation}

    \begin{equation*}\frac{5}{2} \int ln(x) dx=\frac{5}{2}(xlnx-x)+c\end{equation}

Leave a Comment

Filed under Integration, 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

1 Comment

Filed under Integration, Integration by Parts, Tabular Integration