0

Question is to integrate this: $$\int \frac{x+2}{(x^2+3x+3) \sqrt{x+1}} dx$$

Naturally I put $x+1 = t^2$, $dx = 2tdt$

$$2\int\frac{(t^2+1)}{t^4+t^2+1}dt = 2\int \frac{1+t^{-2}}{t^2+1+t^{-2}}= 2\int \frac{1+t^{-2}}{(t-t^{-1})^2 + 3}$$

so answer is $$\dfrac{2}{\sqrt 3} \tan^{-1}\left(\dfrac{t^2-1}{t\sqrt{3}}\right)$$

But answer is not matching with wolfram alfa, choose to oppose. It gives complex thrillers. https://www.wolframalpha.com/input/?i=integrate+(t%2B2)%2F((t%5E2%2B3t%2B3)(sqrt(t%2B1)))+dt

Also I tried a website known as "Online Integral Calculator" which gives the answer as $$\dfrac{2\left(\arctan\left(\frac{2\sqrt{t+1}+1}{\sqrt{3}}\right)+\arctan\left(\frac{2\sqrt{t+1}-1}{\sqrt{3}}\right)\right)}{\sqrt{3}}$$

which I addded the inner terms to get negative of my original answer!

King Tut
  • 3,074

2 Answers2

2

In principle the way to check an antiderivative is to differentiate it and see if the result is (or can be simplified to be) the function you're integrating. Your answer, expressed in terms of $t = \sqrt{x+1}$, is

$$ \frac{2}{\sqrt{3}} \tan^{-1} \left(\frac{x}{\sqrt{3(x+1)}}\right)$$ and its derivative is indeed $$ \frac{x+2}{(x^2+3x+3)\sqrt{x+1}}$$ so your answer is correct.

However, the answer may also be written in other ways. For example, Maple's answer is $$ \frac{2}{3}\,\sqrt {3}\tan^{-1} \left( \frac{ \left( 2\,\sqrt {x+1}-1 \right) \sqrt {3}}{3} \right) +\frac23\,\sqrt {3}\tan^{-1} \left( \frac{ \left( 2\,\sqrt {x+1}+1 \right) \sqrt {3}}3 \right) $$ which is also correct.

EDIT: In fact it turns out that $$\tan^{-1} \left( \frac{ 2\,\sqrt {x+1}-1 }{\sqrt{3}} \right) +\tan^{-1} \left( \frac{ 2\,\sqrt {x+1}+1 }{\sqrt{3}} \right) - \tan^{-1}\left(\frac{x}{\sqrt{3(x+1)}}\right) = \frac{\pi}{2} $$

Note that $$\tan(\arctan(a)+\arctan(b)) = \frac{a+b}{1-ab}$$

Robert Israel
  • 448,999
  • Thank but how it's correct? Do I need to check derivative of maple? I combined the two tan inverse term to get negative of my answer, maybe something to do with range of argument of tan inverse? – King Tut Jan 17 '18 at 08:04
  • I was getting a negative of that using same fomula. Now I plot it and really they differ only by constant. – King Tut Jan 17 '18 at 11:44
1

We must be careful with substitutions and simplifications

In your case, better use partial fractions

\begin{align*} 2\int\frac{(t^2+1)}{t^4+t^2+1}dt &= \int\frac{1}{t^2+t+1} + \frac{1}{t^2-t+1}dt \\ &= \frac{2}{\sqrt{3}}\left(\arctan{\left(\frac{2t+1}{\sqrt{3}}\right)}+\arctan{\left(\frac{2t-1}{\sqrt{3}}\right)}\right) \end{align*}

gar
  • 4,948
  • You are true, but here we get same answer luckily. But yes $t+t^{-1}$ is not oneone. was that the point? Thank – King Tut Jan 17 '18 at 11:45
  • Yes, when I compared the plots of that output and the simplified form, they weren't the same. Then I wondered whether the substitution is okay or not. – gar Jan 17 '18 at 11:49