# Evaluate $\int {2x\over x^2-1}dx$

My friend evaluated this before he went to bed: $$\int {2x\over x^2-1}dx$$

The answer was $\log(x^2-1)$.

I just can't figure out how that works. I know that $\int \frac1x dx = \log|x|$, so what just happened to $2x$?

-

Let $\quad\quad u = \;x^2 - 1.\quad$ (Use "$\;u$-substitution.")

Then $\;\;\; du = 2x \;\;dx$.

$($Recall, we need to replace $\;2x\;dx\;$ with $\;du\;$ to integrate in terms of $u.)$

This gives us...

$$\int \frac{2x \;dx}{x^2 - 1} \quad=\quad \int \frac{du}{u} \quad= \quad\int \frac{1}{u} du \;\;= \;\;\;?$$

From what you stated in your question, I think you can go from here?

-
Ah thanks! You edited the ans. the way i kept thinking lol – Kishan Thobhani Dec 28 '12 at 20:41
You're welcome, Kishan! – amWhy Dec 28 '12 at 20:42
(+1) what a good word. $u-$ substitution. I didn't see this. – Babak S. Jul 28 '13 at 8:14

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

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

$$=\int\left(\frac1{x-1}+\frac1{x+1}\right)dx=\int\left(\frac1{x-1}\right)dx+\int\left(\frac1{x+1}\right)dx=$$ $$=\ln(x-1)+\ln(x+1)+C=\ln(x-1)(x+1)+C=\ln(x^2-1)+C$$

-
+1 for showing an alternate way. – half-integer fan Dec 29 '12 at 2:07
I love the elementary way. I always do as you, think like you. It is more effective than complicated ones. +1 – Babak S. Jun 15 '13 at 10:07

$\dfrac{2x}{x^2-1}dx=\dfrac{d(x^2-1)}{x^2-1}$

-

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

Alternatively, using Partial Fraction Decomposition, let $\frac{2x}{x^2-1}=\frac{(x+1)+(x-1)}{x^2-1}=\frac A{x+1}+\frac B{x-1}$ where $A,B$ are arbitrary constants.

So, $2x=(A+B)x+B-A$

Comparing the constant terms in either of the identity, $B-A=0\implies A=B$

Comparing the coefficients of $x,A+B=2\implies A=B=1$

So, $\frac{2x}{x^2-1}=\frac{(x+1)+(x-1)}{x^2-1}=\frac 1{x+1}+\frac 1{x-1}$

-
+1 just for showing there are multiple ways to solve problems, but I think you should have factored $x^2 - 1$ and completed the re-combining of the logs to be explicit. – half-integer fan Dec 29 '12 at 2:06
@half-integerfan, could you please have a look into the edited answer? – lab bhattacharjee Dec 29 '12 at 5:32
Well, by writing $(x+1) + (x-1)$ for $2x$ you've given away the answer. If you just start with A and B then that shows that the solution can be arrived at even if you can't do that trick "by inspection". I would have also explicitly shown the $\frac{A(x-1) + B(x+1)}{x^2-1}$ step leading to your equation between $2x$ and $A$ and $B$. Sorry if I am being pedantic but I think if the question is relatively easy then you should not assume the questioner can follow multiple transformations per step. – half-integer fan Dec 29 '12 at 14:53

Substitute $u=x^2-1$, $\mathrm du=2x\,\mathrm dx$

Then $\int \frac{2x}{x^2-1}\,\mathrm dx=\int \frac{1}{u} \,\mathrm du=\log(u)=\log(x^2-1)$

-

$\int {2x\over x^2-1}dx = -\int {2x\over 1-x^2}dx = -\int 2x dx \sum_{n=0}^{\infty} x^{2n} = -2\int dx \sum_{n=0}^{\infty} x^{2n+1} = -2\sum_{n=0}^{\infty}\int x^{2n+1}dx = -2\sum_{n=0}^{\infty} {x^{2n+2} \over 2n+2} = -\sum_{n=0}^{\infty} {(x^2)^{n+1} \over n+1} = -\sum_{n=1}^{\infty} {(x^2)^{n} \over n} = \ln(1-x^2)$.

Check:

$(\ln(1-x^2))' = {-2x \over 1-x^2} = {2x \over x^2-1}$.

Just playing with power series Eulerishly to see what would happen.

-

In general, $$\int(\frac{\frac{d}{dx}(f(x))}{f(x)}dx=\log(|f(x)|)+C$$ (As seen in $\frac1x dx = \log|x|+C$)

Similarly, $$\frac{d}{dx}(x^2-1)=2x$$

$$\therefore\int {2x\over x^2-1}dx=\int(\frac{\frac{d}{dx}(x^2-1)}{x^2-1}dx$$

$$=\log(|x^2-1|)+C$$

We apply mod in logarithm to take only the positive value of $x^2-1$ because if $x<1$ then $(x^2-1)<0$ and logarithms of negative values do not exist.

-