# Evaluate integral with quadratic expression without root in the denominator

$$\int \frac{1}{x(x^2+1)}dx = ?$$

How to solve it? Expanding to $\frac {A}{x}+ \frac{Bx +C}{x^2+1}$ would be wearisome.

-
It's not that "wearwisome": $1= A(x^2+1) +x(Bx+C)$. Take $x=0$. Then $A=1$. Thus $B=-1$ (looking at the $x^2$ coefficients) and $C=0$ (looking at the $x$ coefficients). – David Mitra Jan 26 '13 at 19:37

It is not hard to express it as partial fraction, if you write $1$ in the numerator as $x^2+1 - x^2$.

Hence, $$\dfrac1{x(x^2+1)} = \dfrac{x^2+1-x^2}{x(x^2+1)} = \dfrac{x^2+1}{x(x^2+1)} - \dfrac{x^2}{x(x^2+1)} = \dfrac1x - \dfrac{x}{x^2+1}$$ Hence, $$\int \dfrac{dx}{x(x^2+1)} = \int \dfrac{dx}x - \int\dfrac{x}{x^2+1}dx = \log(x) - \dfrac12 \log(x^2+1) + \text{ constant}$$

-

You can consider

$\displaystyle \frac{1}{x(x^2 + 1)} = \frac{1 + x^2 - x^2}{x(x^2 + 1)}$.

-

For this problem, yes, we can avoid it in various ways.

For example, rewrite our function as $\frac{x}{x^2(x^2+1)}$. Make the substitution $u=x^2$. Then $du=2x\,dx$ and we end up with $$\frac{1}{2}\int \frac{du}{u(u+1)}.$$ Now use simple partial fractions to get to $$\frac{1}{2}\int\left(\frac{1}{u}-\frac{1}{u+1}\right)\,du.$$

Or else you can make the substitution $x=\tan t$. After the smoke clears, you are trying to find $$\int \frac{\cos t}{\sin t}\,dt.$$ Now make the substitution $u=\sin t$.

Remark: But you should not try to avoid the partial fraction process, it is pleasantly algorithmic.

-

*Just do it!*$\,$: break the integrand into partial fractions...

Using partial fractions is the most straightforward approach (and in this case, is hardly wearisome).

$$\frac{1}{x(x^2 + 1)} = \frac{x^2+1-x^2}{x(x^2+1)} = \frac{\color{blue} {\bf{x^2+1}}}{x\color{blue}{\bf(x^2+1)}} - \frac{\color{blue}{\bf x}\cdot x}{\color{blue}{\bf{x}}(x^2+1)}=\frac1x - \frac{x}{x^2+1}$$
$$\text{So now you have}\;\;\;\int \dfrac{dx}{x(x^2+1)}\; = \;\int \dfrac{1}x\,dx - \int\dfrac{x}{x^2+1}\,dx$$ and I trust you can take it from here.

The more you work with partial fractions (i.e. practice, i.e.), the easier they are to work with, and the more quickly you'll see how to proceed in doing so.

-

And just to make this problem unnecessarily complicated: $$I=\int\frac{dx}{x^2\left(x+\frac{1}{x}\right)}=\int\frac{dx}{\left(x+\frac{1}{x}\right)}-\int\frac{\left(1-\frac{1}{x^2}\right)dx}{\left(x+\frac{1}{x}\right)}=\frac{1}{2}\int\frac{d\left(x^2+1\right)}{x^2+1}-\int\frac{d\left(x+\frac{1}{x}\right)}{\left(x+\frac{1}{x}\right)}$$

-