3

A given method for calculating $\int^1_{-1} \frac 1 {1+x^2} \, dx$ is

\begin{align} & \int^1_{-1} \frac 1 {1+x^2} \, dx=\int^1_{-1} \frac 1 {x^2(1+\frac 1 {x^2})} \, dx = -\int^1_{-1} \frac 1 {1+(\frac 1 x)^2} \,d(1/x) = \left.-\arctan\left(\frac 1 x\right)\right|_{x=-1}^1 \\[10pt] = {} & -\arctan(1) + \arctan(-1)=-\frac{\pi}{2}. \end{align}

This differs from the expected outcome $$\int^1_{-1} \frac 1 {1+x^{2}}dx= \arctan x \Big|_{x=-1}^1=\arctan(1)-\arctan(-1)=\frac \pi 2.$$

Is there something wrong with the first calculation? I noticed that $\frac{1}{1+x^{2}}-1=\frac{1}{1+(\frac{1}{x})^{2}}$, but I don't yet see how this can be of any help.

simp
  • 883
  • 2
    You've made the substitution $x\to 1/x$. And the domain $[-1,1]$ should transform to $(-\infty,-1)$ and $[1,\infty)$. – Mark Viola Jun 23 '17 at 21:43

1 Answers1

2

Upon enforcing the substitution $x=1/t$, the domain transforms from $[-1,1]$ to $(-\infty,-1)\cup [1,\infty)$. Hence we have

$$\begin{align} \int_{-1}^1\frac{1}{1+x^2}\,dx&= \int_{-\infty}^{-1}\frac{1}{1+t^2}\,dt+\int_1^\infty \frac{1}{1+t^2}\,dt\\\\ &=\left(\arctan(-1)+\frac\pi2\right)+\left(\frac\pi2 -\arctan(1)\right)\\\\ &=\frac{\pi}{2} \end{align}$$

Mark Viola
  • 179,405
  • So I'm wondering whether in this context we should regard $\pi/2$ and $-\pi/2$ as the same thing, i.e. the space in which the arctangent function takes is values is the reals modulo $\pi. \qquad$ – Michael Hardy Jun 24 '17 at 03:58
  • @michaelhardy I don't understand the comment. – Mark Viola Jun 24 '17 at 12:53