# Weird indefinite integral situation

Consider the integral $$\int\frac{x}{x^4+3x^2+2}dx=\int\frac{x}{(x^2+1)^2+(x^2+1)}dx$$ Here we make a change of variable $x^2+1=t$ so our integral becomes $$\frac12\int\frac{dt}{t(t+1)}=\frac12\int\frac{dt}{t}-\frac12\int\frac{dt}{t+1}=\frac{1}{2}\ln|x^2+1|-\frac12|x^2+2|+C$$ The integral evaluator at this site evaluates this integral as $$\arctan(x)-\frac{\arctan(\frac{x}{\sqrt2})}{\sqrt2}$$ Now there is no problem that the function I obtained differs from the one obtained by the calculator, however I do find it problematic that they have different graphs as you can see here. Nevertheless, both functions when derived give the same starting function.

How is it possible that one function has two different antiderivatives (not simply differing for a constant) ?

• the arctan one is wrong I think - where is the x in the numerator coming from if it is differentiated - not sat down with pen and papar though – Cato Mar 17 '17 at 10:24

Probably a typo because when I enter your integral at the integral evaluator, it gives me your answer. Note however that (WolframAlpha): $$\frac{\mbox{d}}{\mbox{d}x} \left( \arctan(x)-\frac{\arctan(\frac{x}{\sqrt2})}{\sqrt2}\right) = \frac{\color{blue}{1}}{x^4+3x^2+2} \color{red}{\ne} \frac{\color{blue}{x}}{x^4+3x^2+2}$$so you probably simply forgot the $x$ in the numerator.