# Evaluate the following integral:

Question:

Evaluate the following integral:

$\int \frac{x^{2}}{\left(x^{2}+4\right)\left(x^{2}+9\right)} d x$

Solution:

Denominator is factorised, so let separate the fraction through partial fraction, hence let

$\frac{x^{2}}{\left(x^{2}+4\right)\left(x^{2}+9\right)}=\frac{A x+B}{\left(x^{2}+4\right)}+\frac{C x+D}{x^{2}+9} \ldots \ldots(i)$

$\Rightarrow \frac{x^{2}}{\left(x^{2}+4\right)\left(x^{2}+9\right)}=\frac{(A x+B)\left(x^{2}+9\right)+(C x+D)\left(x^{2}+4\right)}{\left(x^{2}+4\right)\left(x^{2}+9\right)}$

$\Rightarrow \mathrm{x}^{2}=(\mathrm{Ax}+\mathrm{B})\left(\mathrm{x}^{2}+9\right)+(\mathrm{Cx}+\mathrm{D})\left(\mathrm{x}^{2}+4\right)$

$\Rightarrow \mathrm{x}^{2}=\mathrm{Ax}^{3}+9 \mathrm{Ax}+\mathrm{Bx}^{2}+9 \mathrm{~B}+\mathrm{Cx}^{3}+4 \mathrm{Cx}+\mathrm{Dx}^{2}+4 \mathrm{D}$

$\Rightarrow \mathrm{x}^{2}=(\mathrm{A}+\mathrm{C}) \mathrm{x}^{3}+(\mathrm{B}+\mathrm{D}) \mathrm{x}^{2}+(9 \mathrm{~A}+4 \mathrm{C}) \mathrm{x}+(9 \mathrm{~B}+4 \mathrm{D}) \ldots \ldots$ (ii)

By equating similar terms, we get

$A+C=0 \Rightarrow A=-C \ldots \ldots \ldots \ldots$ (iii)

$B+D=1 \Rightarrow B=1-D \ldots \ldots \ldots \ldots$ (iv)

$9 A+4 C=0$

$\Rightarrow 9(-C)+4 C=0($ from equation(iii))

$\Rightarrow C=0 \ldots \ldots \ldots \ldots(v)$

$9 B+4 D=0 \Rightarrow 9(1-D)+4 D=0 \Rightarrow 5 D=9 \Rightarrow D=\frac{9}{5}$

So equation(iv) becomes $B=1-\frac{9}{5}=-\frac{4}{5}$

So equation (iii) becomes, $A=0$

We put the values of A, B, C, and D values back into our partial fractions in equation (i) and replace this as the integrand. We get

$\int \frac{\mathrm{x}^{2}}{\left(\mathrm{x}^{2}+4\right)\left(\mathrm{x}^{2}+9\right)} \mathrm{dx}$

$\Rightarrow \int\left[\frac{\mathrm{Ax}+\mathrm{B}}{\left(\mathrm{x}^{2}+4\right)}+\frac{\mathrm{Cx}+\mathrm{D}}{\mathrm{x}^{2}+9}\right] \mathrm{dx}$

$\Rightarrow \int\left[\frac{(0) \mathrm{x}-\frac{4}{5}}{\left(\mathrm{x}^{2}+4\right)}+\frac{(0) \mathrm{x}+\frac{9}{5}}{\mathrm{x}^{2}+9}\right] \mathrm{dx}$

Split up the integral,

$\mathrm{u}=\frac{\mathrm{x}}{2} \Rightarrow \mathrm{du}=\frac{1}{2} \mathrm{dx} \Rightarrow \mathrm{dx}=2 \mathrm{du}$ in first partthe

$\mathrm{v}=\frac{\mathrm{x}}{3} \Rightarrow \mathrm{dv}=\frac{1}{3} \mathrm{dx} \Rightarrow \mathrm{dx}=3 \mathrm{dv}$ in second parthe $\mathrm{t}$

so the above equation becomes,

$\Rightarrow \frac{9}{5} \int \frac{3}{\left((3 v)^{2}+9\right)} d v-\frac{4}{5} \int \frac{2}{\left((2 u)^{2}+4\right)} d u$

$\Rightarrow \frac{9}{5} \int \frac{3}{\left(9 v^{2}+9\right)} d v-\frac{4}{5} \int \frac{2}{\left(4 u^{2}+4\right)} d u$

$\Rightarrow \frac{3}{5} \int \frac{1}{v^{2}+1} d v-\frac{2}{5} \int \frac{1}{u^{2}+1} d u$

On integrating we get

$\Rightarrow \frac{3}{5} \tan ^{-1} v-\frac{2}{5} \tan ^{-1} u+C$

(the standard integral of $\frac{1}{x^{2}+1}=\tan ^{-1} x$ )

Substituting back, we get

$\Rightarrow \frac{3}{5} \tan ^{-1}\left(\frac{x}{3}\right)-\frac{2}{5} \tan ^{-1}\left(\frac{x}{2}\right)+C$

Note: the absolute value signs account for the domain of the natural log function $(x>0)$.

Hence,

$\int \frac{x^{2}}{\left(x^{2}+4\right)\left(x^{2}+9\right)} d x=\frac{3}{5} \tan ^{-1}\left(\frac{x}{3}\right)-\frac{2}{5} \tan ^{-1}\left(\frac{x}{2}\right)+C$