3

I am trying to evaluate

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

Sounds like $$\int \frac{x+1}{x^2+2x}dx=\int \frac{(x+1)}{(x+1)^2-1}dx\\u=x+1 \implies\int\frac{u}{u^2-1}du\\t=u^2 \implies \frac{1}{2}\int\frac{1}{t-1}dt $$ Which is also known as $$\frac{1}{2}\ln|t-1|=\frac{1}{2}\ln|x^2+2x|$$But before I tried that, I had tried $$\int \frac{x+1}{x^2+2x}dx=\int \frac{1}{x+2}dx+\int \frac{1}{x^2+2x}dx\\=\ln|x+2| + \int \frac{1}{(x+1)^2-1}dx$$ Recalling that $\int \frac{1}{u^2-1}du=-\tanh^{-1}(u)$ or $-\coth^{-1}(u)$, $$\ln|x+2| + \int \frac{1}{(x+1)^2-1}dx=\ln|x+2|-\tanh^{-1}(x+1)$$ or $\ln|x+2|-\coth^{-1}(x+1)$ on the different parts of the domain.

Why did I get two different answers for the two different methods? Thanks.

Edit: They are not different. Just from the logarithmic definition of $\coth^{-1}$ and $\tanh^{-1}$ they are the same thing.

Lug Gian
  • 377
  • These should be the same answers. Try proving it. – Dylan Nov 26 '17 at 00:37
  • as a matter of fact for complex numbers arctan is often defined as a linear combination of logarithms around $\pm i$. https://math.stackexchange.com/questions/414248/why-does-arctanx-frac12i-log-left-fracx-ixi-rightk – mathreadler Nov 26 '17 at 00:42
  • @mathreadler this is the hyperbolic tangent, not the trigonometric tangent. Of course, the hyperbolic one can also be written as logarithms, though not quite how your link describes. – John Doe Nov 26 '17 at 00:51
  • @JohnDoe yep you are right. still related though. – mathreadler Nov 26 '17 at 00:57
  • @Dylan Oops, the ways are equivalent just by the definition of inverse hyperbolic cotangent/tangent. Thanks. – Lug Gian Nov 26 '17 at 01:14

2 Answers2

1

These are not really differents ways – only variants. You can indeed use a partial fractions decomposition: $$\frac{x+1}{x^2+2x}=\frac{x+1}{x(x+2)}=\frac Ax+\frac B{x+2},$$ determine $A$ and $B$, then the integrals of each term.

Or you can go faster and observe that $$\int\frac{x+1}{x^2+2x}\mathop{}\!\mathrm d x=\int\frac12\frac{(x^2+2x)'}{x^2+2x}\mathop{}\!\mathrm d x=\frac12\ln\bigl|x^2+2x\bigr|.$$

Addendum

Your second method actually yields the same result if you remember that all inverse hyperbolic functions are logs: indeed $$\arg\coth x=\frac12\ln\Bigl(\frac{x+1}{x-1}\Bigr), $$ so that $$\ln|x+2|-\arg\coth(x+1)=\frac12\biggl(\ln(x+2)^2-\ln\Bigl(\frac{x+2}{x}\Bigr)\biggr)=\frac12\ln\biggl(\frac{(x+2)^2x}{x+2}\biggr).$$

Bernard
  • 175,478
  • Partial fractions is a third approach that is quickly equal to the first approach. Your second approach is a slight variant on the first approach. Neither explains why OP's second approach is an equivalent answer. – Teepeemm Nov 26 '17 at 01:30
  • I think you might have mistyped that second fraction; $x(x2+2$ is missing an exponent and a closing bracket :) – numbermaniac Nov 26 '17 at 01:32
  • 1
    @numbermaniac: Right, 'twas a bad copy-paste, and (as most of the time) I didn't check. I've fixed that. Thanks! – Bernard Nov 26 '17 at 01:34
  • @Teepeemm: I've added a (slightly simplified) explanation. – Bernard Nov 26 '17 at 01:53
  • That helps; +1. (BTW, I think you want arc coth. It looks like arg coth might be the French spelling.) – Teepeemm Nov 26 '17 at 19:50
  • @Teepeemm: It happens I'm French… Good guess! As it's not predefined by LaTeX, I took the liberty to take my usual notation. I don't know why it's called ‘arc’, as there's no arc in that stuff. Contrarywise, there's an argument (of the function coth). – Bernard Nov 26 '17 at 20:23
0

You can use substitution to solve. I will be a little bit faster. In fact, let $u=x^2+2x$. Then $du=2(x+1)dx$ and so $$ \int\frac{x+1}{x^2+2x}dx=\frac12\int\frac{du}{u}=\frac12\ln|u|+C=\frac12\ln|x^2+2x|+C.$$

xpaul
  • 44,000