So, the integral is: $$I=\int \frac{3x+5}{x^2+4x+8}dx$$ and here is how I did it, but in the end, I got a wrong result: $$x^2+4x+8=(x+2)^2+4=4\bigg[\bigg(\frac{x+2}{2}\bigg)^2+1\bigg]$$ $$I=\frac{1}{4} \int \frac{3x+5}{\big(\frac{x+2}{2}\big)^2+1}dx$$ substitution: $\frac{x+2}{2}=u$, $dx=2du$, $x=2u-2$ $$I=\frac{1}{2}\int\frac{3(2u-2)+5}{u^2+1}du=\frac{1}{2}\int\frac{6u-1}{u^2+1}du=$$ $$\frac{3}{2}\int\frac{2u-\frac{1}{3}}{u^2+1}du=\frac{3}{2}\int\frac{2u}{u^2+1}du-\frac{1}{2}\int\frac{du}{u^2+1}=$$ $$\frac{3}{2}\ln|u^2+1|-\frac{1}{2}\arctan(u)+C$$ $$I=\frac{3}{2}\ln\bigg|\frac{x^2+4x+8}{4}\bigg|-\frac{1}{2}\arctan\bigg(\frac{x+2}{2}\bigg)+C$$ Thank you for your time.
-
2Why do you think your result is wrong? – Daniel Fischer Mar 06 '16 at 17:05
-
Is there a particular reason why you pulled out a $4$ after you completed the square? – imranfat Mar 06 '16 at 17:06
-
4Same thing, just with different constant. $\ln \frac{w}{4} = \ln w - \ln 4$. – Daniel Fischer Mar 06 '16 at 17:07
-
Hmm, wow :) Thank you. – A6SE Mar 06 '16 at 17:08
-
Yes, it ends up to be the same thing. I would expect a different step, but in the end it turns out to be the same... – imranfat Mar 06 '16 at 17:13
-
@imranfat I always do that when I'm expecting an $\arctan$ primitive function in the end. – A6SE Mar 06 '16 at 17:14
-
1@A6SE That's because you are not afraid of fractions :) For such bravery: +1 – imranfat Mar 06 '16 at 17:15
-
All roads lead to Rome. Some are short, some are long. – Mojo Jojo Mar 08 '16 at 05:05
1 Answers
You're doing good. Maybe some passages can be done more easily (at least according to my tastes): \begin{align} \int\frac{3x+5}{x^2+4x+8}\,dx &=\frac{1}{2}\int\frac{6x+10}{x^2+4x+8}\,dx\\[6px] &=\frac{1}{2}\int\frac{6x+12-2}{x^2+4x+8}\,dx\\[6px] &=\frac{3}{2}\int\frac{2x+4}{x^2+4x+8}\,dx- \int\frac{1}{x^2+4x+8}\,dx \end{align} The first integral can be written directly as $$ \frac{3}{2}\log(x^2+4x+8) $$ and for the second one can do like you did, that is, $2t=x+2$, so $dx=2dt$ and the integral becomes $$ \int\frac{2}{4t^2+4}=\frac{1}{2}\arctan t=\frac{1}{2}\arctan\frac{x+2}{2} $$
By delaying the completion of the square we have to deal with less fractions.
Note that $$ \log\frac{x^2+4x+8}{4}=-\log4+\log(x^2+4x+8), $$ so the result is the same as yours, because a constant can be absorbed in the constant of integration.

- 238,574