# Evaluate the following integrals:

Question:

Evaluate the following integrals:

$\int \frac{x^{3}-3 x^{2}+5 x-7+x^{2} a^{x}}{2 x^{2}} d x$

Solution:

Let $I=\int \frac{x^{2}-3 x^{2}+5 x-7+x^{2} a^{x}}{2 x^{2}} d x$

$\Rightarrow I=\frac{1}{2} \int \frac{x^{3}-3 x^{2}+5 x-7+x^{2} a^{x}}{x^{2}} d x$

$\Rightarrow I=\frac{1}{2} \int\left(\frac{x^{3}}{x^{2}}-\frac{3 x^{2}}{x^{2}}+\frac{5 x}{x^{2}}-\frac{7}{x^{2}}+\frac{x^{2} a^{x}}{x^{2}}\right) d x$

$\Rightarrow I=\frac{1}{2} \int\left(x-3+\frac{5}{x}-\frac{7}{x^{2}}+a^{x}\right) d x$

$\Rightarrow I=\frac{1}{2} \int\left(x-3+\frac{5}{x}-7 x^{-2}+a^{x}\right) d x$

$\Rightarrow I=\frac{1}{2}\left[\int x d x-\int 3 d x+\int \frac{5}{x} d x-\int 7 x^{-2} d x+\int a^{x} d x\right]$

$\Rightarrow I=\frac{1}{2}\left[\int x d x-3 \int d x+5 \int \frac{1}{x} d x-7 \int x^{-2} d x+\int a^{x} d x\right]$

Recall $\int x^{n} d x=\frac{x^{n+1}}{n+1}+c$ and $\int d x=x+c$

We also have $\int a^{x} d x=\frac{a^{x}}{\log a}+c$ and $\int \frac{1}{x} d x=\log x+c$

$\Rightarrow I=\frac{1}{2}\left[\frac{x^{1+1}}{1+1}-3 \times x+5 \times \log x-7\left(\frac{x^{-2+1}}{-2+1}\right)+\frac{a^{x}}{\log a}\right]+c$

$\Rightarrow I=\frac{1}{2}\left[\frac{x^{2}}{2}-3 x+5 \log x+7 x^{-1}+\frac{a^{x}}{\log a}\right]+c$

$\therefore \mathrm{I}=\frac{1}{2}\left[\frac{\mathrm{x}^{2}}{2}-3 \mathrm{x}+5 \log \mathrm{x}+\frac{7}{\mathrm{x}}+\frac{\mathrm{a}^{\mathrm{x}}}{\log \mathrm{a}}\right]+\mathrm{c}$

Thus, $\int \frac{x^{3}-3 x^{2}+5 x-7+x^{2} a^{x}}{2 x^{2}} d x=\frac{1}{2}\left[\frac{x^{2}}{2}-3 x+5 \log x+\frac{7}{x}+\frac{a^{x}}{\log a}\right]+c$