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$?
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?
$\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$
$\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}$
$\dfrac{2x}{x^2-1}dx=\dfrac{d(x^2-1)}{x^2-1}$
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.