2

I need to solve the integral

$\displaystyle \int _{-1}^{3} \left[\arctan \left(\dfrac{x}{x^2+1}\right) + \arctan \left(\dfrac{x^2 + 1}{x}\right)\right]dx$.

I thought I could use the identity $\arctan(x) + \operatorname{arccot}(x) = \dfrac{\pi}{2}$ to simplify the integral, But that gives the answer as $2\pi$ while the actual answer is given as:

$\pi$;

can anyone tell me how should I solve this definite integral?

Thank you.

Adrian Keister
  • 10,099
  • 13
  • 30
  • 43

3 Answers3

3

$\forall x\in\mathbb{R}^*,\,\arctan(x)+\arctan\left(\frac{1}{x}\right)=\mathrm{sgn}(x)\frac{\pi}{2}$, split the integral into two integrals : $$ \int _{-1}^{3} \left[\arctan \left(\dfrac{x}{x^2+1}\right) + \arctan \left(\dfrac{x^2 + 1}{x}\right)\right]dx=\int _{-1}^{0} \left[\arctan \left(\dfrac{x}{x^2+1}\right) + \arctan \left(\dfrac{x^2 + 1}{x}\right)\right]dx+\int _{0}^{3} \left[\arctan \left(\dfrac{x}{x^2+1}\right) + \arctan \left(\dfrac{x^2 + 1}{x}\right)\right]dx $$ We then have $$\int _{0}^{3} \left[\arctan \left(\dfrac{x}{x^2+1}\right) + \arctan \left(\dfrac{x^2 + 1}{x}\right)\right]dx=\frac{3\pi}{2}$$ and $$\int _{-1}^{0} \left[\arctan \left(\dfrac{x}{x^2+1}\right) + \arctan \left(\dfrac{x^2 + 1}{x}\right)\right]dx=-\frac{\pi}{2}$$ so that $$ \int _{-1}^{3} \left[\arctan \left(\dfrac{x}{x^2+1}\right) + \arctan \left(\dfrac{x^2 + 1}{x}\right)\right]dx=\pi $$

Tuvasbien
  • 8,907
2

Remember that

$$\arctan x+\arctan\frac1x=\begin{cases}\cfrac\pi2,&x>0\\{}\\-\cfrac\pi2,&x<0\end{cases}$$

so we can simply write your integral as

$$\int_{-1}^0-\frac\pi2\,dx+\int_0^3\frac\pi2\,dx=-\frac\pi2+\frac{3\pi}2=\pi$$

DonAntonio
  • 211,718
  • 17
  • 136
  • 287
0

You can't use that identity here since it doesn't apply. The identity you should use here is $$\arctan x+\arctan y=\arctan\left(\frac{x+y}{1-xy}\right).$$

Allawonder
  • 13,327
  • 1
    No, he can't use that as in this case $;y=\frac1x;$ and thus he'd divide by zero... – DonAntonio Sep 12 '19 at 20:51
  • @DonAntonio Of course, but he can take limits. Which makes the integral trivial. – Allawonder Sep 12 '19 at 20:55
  • Limits of what and to what? – DonAntonio Sep 12 '19 at 21:33
  • @DonAntonio Isn't it obvious? For example you may set $y=1/x+\epsilon $ and consider the limits as $\epsilon \to 0^{\pm}.$ This gives $\pm π/2$ depending on the manner of approach, and one can then split the domain into two accordingly and proceed to integrate. Not that it matters much, but why are you asking this when you already know? I now see that's essentially what you and the other answerer did. – Allawonder Sep 13 '19 at 06:06
  • NO, it is not obvious at all, and even much less obvious surely to the person who asked this question. When you take the limits you seem to imply, then you have to be careful, in this case, whether you take limits when $;x\to0;$ from the left or from the right, which already adds complication to fix things, as in one case you go to $;+\infty;$ and in the other to $;-\infty;$ . Of course I know what happens here, and that's the reason I wouldn't give an answer that implies both complications and obscure processes...or else dividing by zero! – DonAntonio Sep 13 '19 at 08:52
  • The identity you wrote about is valid only for real numbers $;x;;s.t.;;xy\neq1;$ ...this is from trigonometry, not from calculus. – DonAntonio Sep 13 '19 at 08:53
  • @DonAntonio Well, if you claim it's not obvious, then I've explained what's meant. We're doing analysis here, not algebra, by the way. Thus, the identity is valid even when the argument is an extended real. – Allawonder Sep 13 '19 at 15:53