# Is there a simple way to solve int(x^2-1)/(x^3+x)dx?

## There is supposed to be a simple manipulation to this one that makes the answer really simple but I'm not sure what to do. I've tried everything I can think of including any trig subs that might have worked.

Jun 6, 2017

Correct me if I'm wrong, but I don't think we could have done trig sub here since there aren't any square roots (or ways to obtain square root forms). We needed the form $\sqrt{{a}^{2} - {x}^{2}}$, $\sqrt{{a}^{2} + {x}^{2}}$, or $\sqrt{{x}^{2} - {a}^{2}}$, and we didn't have any form of that.

I got

$\ln | \frac{{x}^{2} + 1}{x} | + C$

There is somewhat of a trick I can think of off-hand, though it will lead to partial fractions... good practice if you want to do it this way.

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

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

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

But now it gets somewhat ugly as we get into partial fractions on the second integral, and the second factor is an irreducible quadratic (over the real numbers).

$\int \frac{1}{x} \mathrm{dx} - \underline{\int \frac{2}{x \left({x}^{2} + 1\right)} \mathrm{dx}} = \ln | x | - \underline{\int \frac{A}{x} + \frac{B x + C}{{x}^{2} + 1} \mathrm{dx}}$

For now, let's drop the integral signs and focus on the integrand. We obtain common denominators:

$\frac{A \left({x}^{2} + 1\right) + \left(B x + C\right) \left(x\right)}{\cancel{x \left({x}^{2} + 1\right)}} = \frac{2}{\cancel{x \left({x}^{2} + 1\right)}}$

$A {x}^{2} + A + B {x}^{2} + C x = 2$

$\textcolor{g r e e n}{\left(A + B\right)} {x}^{2} + \textcolor{g r e e n}{C} x + \textcolor{g r e e n}{A} = \textcolor{g r e e n}{0} {x}^{2} + \textcolor{g r e e n}{0} x + \textcolor{g r e e n}{2}$

We have matched the form $a {x}^{2} + b x + c$, so we have the system of equations:

$A + B = 0$
$C = 0$
$A = 2$

Eh, not too bad after all. We thus have that $B = - 2$. So:

$\ln | x | - \int \frac{A}{x} + \frac{B x + C}{{x}^{2} + 1} \mathrm{dx}$

$= \ln | x | - \int \frac{2}{x} - \frac{2 x}{{x}^{2} + 1} \mathrm{dx}$

This leaves us with one integral left we don't immediately know. But, this looks like a $u$ substitution.

Let $u = {x}^{2} + 1$ so that $\mathrm{du} = 2 x \mathrm{dx}$. Then:

$\implies \ln | x | - 2 \ln | x | + \int \frac{1}{u} \mathrm{du}$

$= \ln | x | - 2 \ln | x | + \ln | u | + C$

$= - \ln | x | + \ln | {x}^{2} + 1 | + C$

$= \textcolor{b l u e}{\ln | \frac{{x}^{2} + 1}{x} | + C}$

We can verify this is correct as well.

$\frac{d}{\mathrm{dx}} \left[\ln | {x}^{2} + 1 | - \ln | x |\right]$

$= \frac{1}{{x}^{2} + 1} \cdot 2 x - \frac{1}{x}$

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

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

$= \frac{{x}^{2} - 1}{{x}^{3} + x}$ color(blue)(sqrt"")

Jun 9, 2017

Ah, I think I see what to do now that I know what the integral is.

#### Explanation:

The manipulation is simply multiplying the integral by ${x}^{-} \frac{2}{x} ^ - 2$. This produces the following:

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

$= \int \frac{1 - {x}^{-} 2}{x + {x}^{-} 1} \mathrm{dx}$

And then I can make the substitution:

$u = x + {x}^{-} 1$

$\therefore \mathrm{du} = \left(1 - {x}^{-} 2\right) \mathrm{dx}$

$\therefore \int \frac{1 - {x}^{-} 2}{x + {x}^{-} 1} \mathrm{dx} = \int \frac{\mathrm{du}}{u} = \ln \left\mid u \right\mid + C$

$\ln \left\mid x + \frac{1}{x} \right\mid + C$

Jun 9, 2017

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

Let's try $x = \tan \theta$ so $\mathrm{dx} = {\sec}^{2} \theta d \theta$.

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

Since ${\tan}^{2} \theta + 1 = {\sec}^{2} \theta$:

$= \int \frac{{\tan}^{2} \theta - 1}{\tan} \theta d \theta$

$= \int \left(\tan \theta - \cot \theta\right) d \theta$

$= \int \left(\sin \frac{\theta}{\cos} \theta - \cos \frac{\theta}{\sin} \theta\right) d \theta$

$- \ln \left\mid \cos \right\mid \theta - \ln \left\mid \sin \right\mid \theta + C$

$= - \ln \left\mid \sin \theta \cos \theta \right\mid + C$

From $\tan \theta = x / 1$ we see that $\sin \theta = \frac{x}{\sqrt{{x}^{2} + 1}}$ and $\cos \theta = \frac{1}{\sqrt{{x}^{2} + 1}}$:

$= - \ln \left\mid \frac{x}{{x}^{2} + 1} \right\mid + C = \ln \left\mid \frac{{x}^{2} + 1}{x} \right\mid + C$