# Evaluate the following integrals:

Question:

Evaluate the following integrals:

$\int \frac{x^{4}+1}{x^{2}+1} d x$

Solution:

We will use basic formula : $(a+b)^{2}=a^{2}+b^{2}+2 a b$

Or, $a^{2}+b^{2}=(a+b)^{2}-2 a b$

Here, $x^{4}+1=x^{4}+1^{4}$

$=\left(\mathrm{x}^{2}\right)+\left(1^{2}\right)^{2}$

Applying above formula, we get, $x^{4}+1=\left(x^{2}+1\right)^{2}-2 \times 1 \times x^{2}$

$=\left(x^{2}+1\right)^{2}-2 x^{2}$

Hence, $\int \frac{x^{4}+1}{x^{2}+1} d x=\int \frac{\left(x^{2}+1\right)^{2}-2 x^{2}}{x^{2}+1} d x$

Separate the numerator terms,

$\int \frac{\left(x^{2}+1\right)^{2}-2 x^{2}}{x^{2}+1} d x=\int \frac{\left(x^{2}+1\right)^{2}}{x^{2}+1} d x-\int \frac{2 x^{2}}{x^{2}+1} d x$

$=\int\left(\mathrm{x}^{2}+1\right) \mathrm{dx}-\int \frac{2 \mathrm{x}^{2}+2-2}{\mathrm{x}^{2}+1} \mathrm{dx}\{$ add and subtract 2 to the second term)

$=\int\left(x^{2}+1\right) d x-\int \frac{2\left(x^{2}+1\right)}{x^{2}+1} d x-2 \int 1 /\left(x^{2}+1\right) d x\left\{2 x^{2}+2-2=2\left(x^{2}+1\right)-2\right\}$

$=\int\left(\mathrm{x}^{2}+1\right) \mathrm{dx}-\int 2 \mathrm{dx}-2 \int 1 /\left(\mathrm{x}^{2}+1\right) \mathrm{dx}$

$=\frac{x^{2}}{3}+x-2 x+2 \tan ^{-1} x+c\left\{\right.$ since $\left.\int \frac{1}{x^{2}+1} d x=\tan ^{-1}(x)+c\right\}$

$=\frac{x^{3}}{3}-x+2 \tan ^{-1} x+c$