For İntegral $$\int\frac{x^2}{{(x^2+1)}^2}dx$$ I used this substitution $x=it$

We have,

$$\begin{align} \int\frac{x^2}{{(x^2+1)}^2}dx &=-i\int\frac{t^2}{{(t^2-1)}^2}dt \\ &=-\frac i4\left( \int\frac{1}{t-1}dt+\int\frac{1}{(t-1)^2}dt-\int\frac{1}{t+1}dt+\int\frac{1}{(t+1)^2}dt\right) \\ &=-\frac i4\left(\ln\left|\frac{t-1}{t+1}\right|-\frac{2t}{t^2-1}+C \right) \end{align}$$

In the answer the function $\ln$ doesn't included.

My answer is wrong. Where is the mistake? I can not see.

  • 8
    $\begingroup$ Real $x$, real $t$, and the equation $x = it$ are simply incompatible. $\endgroup$ – Bartosz Malman May 19 at 20:24
  • $\begingroup$ @CameronBuie I have seen such substitutions in some integrals..:( $\endgroup$ – Learner May 19 at 20:29
  • 3
    $\begingroup$ It's perfectly possible to solve it this way, however some care needs to be taken with respect to the logarithm. And you are not terribly far off the correct answer. It's basically no absolute value in the logarithm and then making the connection with the logarithm and the $\arctan$-function to make it manifestly real. $\endgroup$ – Winther May 19 at 20:29
  • 1
    $\begingroup$ It's $\arctan(x) = \frac{1}{2i}\log(\frac{x-i}{x+i})$, see e.g. math.stackexchange.com/questions/414248/… $\endgroup$ – Winther May 19 at 20:36
  • 6
    $\begingroup$ Yes. And since some of these steps are a bit dubious (you are in a real setting working with a complex logarithm which you might not be familiar with) to make the proof rigorous you simply take the real function you end up with and differentiate it and show that you end up with the given integrand. This is a bit of the beauty of indefinite integration: you can use whatever method (rigorous or not) you like as long as you check the answer in the end. $\endgroup$ – Winther May 19 at 20:44

Complex substitutions is a common source of error in real integration. It often leads to wrong results if you don't know what you are doing and to do the derivation you have attempted to do rigorously you cannot get away from the theory of complex integration and the complex logarithm.

However the beauty of indefinite integration is that you can use whatever method you like (rigorous or not) to get the answer as long as you check in the end by differentiating the result and show that you recover the integrand.

In your case a naive derivation can indeed give the correct answer. If we naively use $\int \frac{{\rm d}t}{t+a} = \log(t+a)$ then we end up with

$$\int \frac{x^2}{(x^2+1)^2}{\rm d}x = -\frac{i}{4}\left[\log\left(\frac{t-1}{t+1}\right) - \frac{2t}{t^2-1} \right]_{t=x/i} + C$$

Now using a known connection between the logarithm and the arctan-function $\arctan(x) = \frac{1}{2i}\log\left(\frac{x-i}{x+i}\right)$ we end up with the manifestly real result

$$\int \frac{x^2}{(x^2+1)^2}{\rm d}x = \frac{\arctan(x)}{2} - \frac{x}{2(1+x^2)} + C$$

For the crucial step to make it a valid proof: differentiating the right hand side we find that we do indeed recover the integrand showing that the answer is correct (even through the derivation was a bit sketchy).

  • $\begingroup$ So I was right, when I thought there is little to no difference between magic and math. $\endgroup$ – user541396 May 19 at 21:19
  • $\begingroup$ @user541396 A similar kind of “magic” is the great method of treating $\frac{dy}{dx}$ as a fraction when solving differential equations. Both of these methods are dubious, but works (and importantly in both cases we have a way of checking the results we get independently of the method used). But once you learn the underlying theory it becomes clear why they work so it’s not really magic, just shows the power of 'creative' calculations :) $\endgroup$ – Winther May 19 at 21:29

It has been pointed out in the comments while your substitution is ill formed. Here is a way to solve it by substitution.

The group $1+x^2$ calls for a change of variable $x=\sinh(u)$ or $x=\tan(u)$.

In this case the first one, doesn't work so well, you can try it and get $\displaystyle\int \frac{\sinh(u)^2}{\cosh(u)^3}\mathop{du}$ which is not very desirable.

Instead $x=\tan(u)$ gets $dx=(1+\tan(u)^2)\mathop{du}$ to cancel with the denominator and reduce the exponent.

$\displaystyle\int \dfrac{x^2}{(1+x^2)^2}\mathop{dx}=\int \dfrac{\tan(u)^2}{1+\tan(u)^2}\mathop{du}=\int \sin(u)^2\mathop{du}=\frac 12u-\frac 14\sin(2u)=\frac 12u-\frac 14\left(\dfrac{2\tan(u)}{1+\tan(u)^2}\right)$

Finally $$\displaystyle\int \dfrac{x^2}{(1+x^2)^2}\mathop{dx}=\frac 12\arctan(x)-\frac 14\left(\dfrac{2x}{1+x^2}\right)$$

  • $\begingroup$ I'm just wondering about the change $x=it$. You do that to get to factorize $t^2-1$ and perform partial fractions expansion. Yet (assuming the change $x=it$ would not be ill-formed), you would get something which is not much easier to integrate. So why going for complications instead of a trig substitution, especially if you are comfortable with it? $\endgroup$ – zwim May 19 at 21:11
  • $\begingroup$ I'm novice. I just started to learn these topics. $\endgroup$ – Learner May 19 at 21:18

your result can be written in a simpler form as: $$-\frac{i}{4}\left( \frac{2t}{{{t}^{2}}-1}+\ln \left( 1+t \right)-\ln \left( 1-t \right) \right)$$ now substitute $t=-ix$

$$\begin{align} & =-\frac{i}{4}\left( \frac{2\left( -ix \right)}{{{\left( -ix \right)}^{2}}-1}+\ln \left( 1-ix \right)-\ln \left( 1+ix \right) \right) \\ & =-\frac{i}{4}\left( \frac{2ix}{{{x}^{2}}+1}+\ln \left( 1-ix \right)-\ln \left( 1+ix \right) \right) \\ & =-\frac{i}{4}\left( \frac{2ix}{{{x}^{2}}+1}+\left( \left( ix \right)-\frac{{{\left( ix \right)}^{2}}}{2}+\frac{{{\left( ix \right)}^{3}}}{3}-\cdots \right)+\left( \left( ix \right)+\frac{{{\left( ix \right)}^{2}}}{2}+\frac{{{\left( ix \right)}^{3}}}{3}-\cdots \right) \right) \\ & =-\frac{i}{4}\left( \frac{2ix}{{{x}^{2}}+1}+2\left( ix \right)+\frac{2{{\left( ix \right)}^{3}}}{3}+\frac{2{{\left( ix \right)}^{5}}}{5}+\cdots \right) \\ & =-\frac{i}{4}\left( \frac{2ix}{{{x}^{2}}+1}+2ix-\frac{2i{{x}^{3}}}{3}+\frac{2i{{x}^{5}}}{5}-\cdots \right) \\ & =\frac{1}{2}\left( \frac{x}{{{x}^{2}}+1}+x-\frac{{{x}^{3}}}{3}+\frac{{{x}^{5}}}{5}-\cdots \right) \\ & =\frac{1}{2}\left( \frac{x}{{{x}^{2}}+1}+{{\tan }^{-1}}\left( x \right) \right) \\ \end{align}$$

  • $\begingroup$ Is there an error in my calculation!!!!!!!!!!!!! $\endgroup$ – logo May 19 at 21:34
  • 1
    $\begingroup$ Think there is a sign error in the first line, should be $-\frac{2t}{t^2-1}$. This then propagates down so there will be a minus sign in front of $\frac{x}{x^2+1}$, but other than that it's fine. $\endgroup$ – Winther May 20 at 13:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.