Question:
Evaluate the following integrals:
$\int e^{x}\left(\frac{x-1}{2 x^{2}}\right) d x$
Solution:
$\int e^{x}\left(\frac{x-1}{2 x^{2}}\right) d x$
Let $I=\int e^{x} \frac{1}{2 x} d x-\int e^{x} \frac{1}{2 x^{2}} d x$
Integrating by parts,
$=\frac{\mathrm{e}^{\mathrm{x}}}{2 \mathrm{x}}-\int \mathrm{e}^{\mathrm{x}}\left(\frac{\mathrm{d}}{\mathrm{dx}}\left(\frac{1}{2 \mathrm{x}}\right)\right) \mathrm{dx}-\int \frac{\mathrm{e}^{\mathrm{x}}}{2 \mathrm{x}^{2}} \mathrm{dx}$
$=\frac{\mathrm{e}^{\mathrm{x}}}{2 \mathrm{x}}+\int \frac{\mathrm{e}^{\mathrm{x}}}{2 \mathrm{x}^{2}} \mathrm{dx}-\int \frac{\mathrm{e}^{\mathrm{x}}}{2 \mathrm{x}^{2}} \mathrm{dx}$
$=\frac{e^{x}}{2 x}+c$