I was assigned to find the integral of this expression:
$$ \int\frac{-5x^3+3x^\frac{3}{2}-2x^2-5x + \frac{3}{\sqrt x}}{x^2+1}\mathrm{d}x$$
I did:
$$ = \int\frac{-5x(x^2 + 1)}{x^2+1} \mathrm{d}x + \int\frac{ 3x^{-\frac{1}{2}}(x^2+1)}{x^2+1} \mathrm{d}x + \int\frac{-2x^2 - 2 + 2}{x^2+1}\mathrm{d}x$$
And continued on from there.
Apparently, Wolfram Alpha (offline Mathematica as well) gives 2 different answers to the following queries:
- Link:
$$ \int \frac{3 x^{3/2}+\frac{3}{\sqrt{x}}}{x^2+1} \, dx + \int\frac{-2 x^2}{x^2+1}dx$$
Which gives:
$$ 6 \sqrt{x}-2 \left(x-\tan ^{-1}(x)\right) $$
- Link:
$$ \int \left(\frac{3 x^{3/2}+\frac{3}{\sqrt{x}}}{x^2+1}-\frac{2 x^2}{x^2+1}\right) \, dx $$
Which gives:
$$ -2 \left(x-3 \sqrt{x}+\tan ^{-1}\left(\frac{1}{x}\right)\right) $$
Which are almost identical besides the usage of $1/x$ vs $x$ inside $tan^{-1}$ and it's sign. My way led me to the 1st solution.
Which solution is correct? Is there anything wrong with splitting the integrals like that?
We can understand the problem here when we plot the two functions together $f(x) = 6*sqrt(x)-2*x+2*\arctan(x)$ and $g(x) = 6*sqrt(x)-2*x-2*\arctan(1/x)$
In the plot, using some specific range the two functions take the same path Check it
graph of the two functions