7

Of course this is not true, because the integrand is always greater than zero. However, when using Mathematica to do an indefinite integral of the general form $$ \int\frac{dx}{\xi-\sin x} = -\frac{2\arctan\left[\frac{1-\xi\tan\frac{x}{2}}{\sqrt{\xi^2-1}}\right]}{\sqrt{\xi^2-1}} $$

Now if you plug into the limit in the result, i.e. $0$ to $2\pi$, the result is zero. What's wrong with this argument? I must miss something very basic...

I don't need another way to do the integral, just need someone tell me why this doesn't work...

  • It should not be zero since the integrand is positive in $[0,2\pi]$ The problem us that the domain where the identity (if there is such an identity) holds is not $[0,2\pi]$. – Mittens Jun 18 '21 at 03:02
  • @OliverDiaz I am bit new to calculus so I don't quite understand why the equality does not hold for some domain. – Asher2211 Jun 18 '21 at 03:09
  • 1
    RHS is not defined at $x=\pi$ – orangeskid Jun 18 '21 at 03:14
  • 1
    Notice that $\tan$ is define on $(-\pi/2,\pi/2)$; hence, the function on the right is defined on $(-\pi,\pi)$. Now your integrand, being $2\pi$ periodic can be shifted to get the integral $\int^\pi_{-\pi}\frac{dx}{2-\sin x}$. Then things should be better. – Mittens Jun 18 '21 at 03:16
  • $arctan(x)$ is not single valued. $arctan(0)=n\pi$. – herb steinberg Jun 18 '21 at 03:26
  • @OliverDiaz When finding $~\int^\pi_{-\pi}\frac{dx}{2-\sin x}~$ I took$\displaystyle\lim_{x \to \pi^-}\left(2\arctan\left[1-2\tan\frac{x}{2}\right]\right)=\frac{-\pi}{2}$ and $\displaystyle\lim_{x \to \pi^+}\left(2\arctan\left[1-2\tan\frac{x}{2}\right]\right)=\frac{\pi}{2}.$ Is what I did above correct? – Asher2211 Jun 18 '21 at 03:37
  • @Asher2211: You are almost done. Putting things together, you get that the integral should be
    $$-\frac{1}{\sqrt{3}}\left(\lim_{x\rightarrow\pi-}2\arctan\big(1-2\tan(x/2)\big) - \lim_{x\rightarrow-\pi+}2\arctan\big(1-2\tan(x/2)\big)\right)\ =-\frac{1}{\sqrt{3}}\big(2(-\pi/2)-2(\pi/2)\big)=\frac{2\pi}{\sqrt{3}}$$ This is in accordance with my numerical computations.
    – Mittens Jun 18 '21 at 04:05
  • 1
    See the comments and linked questions here. – Hans Lundmark Jun 18 '21 at 05:53

4 Answers4

5

The $\arctan$ function is multi-valued. When it appears in formulae for indefinite integrals you have to be careful when using it to calculate definite integrals, since in practice you use the principal branch ${\rm Arctan} : {\Bbb R} \cup {\infty}\to (-\pi/2,\pi/2]$ to evaluate the expression.

Let me illustrate by a simplified example: $$ x = \int dx = 2\arctan(\tan(x/2)).$$

Again, calculating $\int_0^{2\pi} dx = 2\pi$ leads to the same paradoxe as yours if you evaluate using ${\rm Arctan}$ on the RHS. To solve the paradoxe note that there is a constant of integration which was omitted in the formula. You may change this constant when $\tan$ goes through a singularity $x=(2k+1)\pi$, $k\in {\Bbb Z}$ so as to make the result a continuous function. Thus for my integral, if I want a continuous indefinite integral I should split ${\Bbb R}$ into intervals between these singularities:

$$ x =\int dx = 2{\rm Arctan} (\tan(x/2)) + 2\pi k, \ \ \ \ \ \ {\rm when } \ \ x\in \left((2k-1) \pi, (2k+1) \pi\right], k\in {\Bbb Z}.$$ which now is continuous and an identity for all $x\in {\Bbb R}$. A drawback is, of course, that the formula becomes somewhat indigestible to read.

H. H. Rugh
  • 35,236
  • A really nice answer. Could you also make some comments about the case $\xi < 1$? Does the integral make any sense in this case? – an offer can't refuse Jun 18 '21 at 06:40
  • @anoffercan'trefuse For $-1\leq\xi \leq1$ the integrand is infinite at some point or the end points. If $|\xi|> 1$ then the integral will always exist and be finite. – Sarvesh Ravichandran Iyer Jun 18 '21 at 06:52
  • The integral make sense only on intervals where $\xi\neq \sin(x)$ but on such interval my argument should work. There is by the way something which bothers me with your formula. When $\xi\to 1^+$ the RHS diverges but not necessarily the LHS – H. H. Rugh Jun 18 '21 at 06:52
  • @H.H.Rugh Yes, there's a mistake in OP's antiderivative, it was pointed out in another answer. – Sarvesh Ravichandran Iyer Jun 18 '21 at 06:53
  • 1
    @H.H.Rugh Do you mean the integral is only defined as a so-called principal value? Yes, this is a mistake in my post, I am going to correct it. – an offer can't refuse Jun 18 '21 at 06:54
  • A curious but difficult point. Could be that there is a link between PV and some choice of analytic continuation on the RHS. But in your stated formula the RHS becomes complex and you would have to figure out how to choose the right analytic branches. Not clear what it leads to. – H. H. Rugh Jun 18 '21 at 07:13
1

As Olivier Diaz has pointed out rightly in the comments, there is a problem with the domain. And, also the period of the function is $2 \pi$ and hence the limits can be shifted.

Link for the graphs : https://www.desmos.com/calculator/dd6azsbkak

Note that the antiderivative you provided is wrong.
It is $$\dfrac{2\arctan\left(\frac{2\tan\left(\frac{x}{2}\right)-1}{\sqrt{3}}\right)}{\sqrt{3}}$$ You missed the $\sqrt{3}$

Anyways as we can see from the graph there is a discontinuity at $x= \pi$

Also note that the function is changing its signs. If you wanted to simply substitute limits it wouldn't work. It is similar to the case of $$\int_{-1} ^{1} |x|^3dx$$ where you need to resolve the limits for antiderivative $>0$ and $<0$ If we directly substitute limits we find that the integral is zero. There is a difference between calculating area under a curve and value of definite integral

Thus we need to substitute limits from $0$ to $\pi$ first and then $\pi$ to $2\pi$. that would give the required answer. Also be careful about taking limit at $x=\pi$.

The explanation relating to $\int |x|^3dx$ is just a partial explanation. The actual discrepancy occurs due to the domain of $\tan^{-1}x$ only. Just integrate by breaking into two parts.

1

Open Image here

Hi, pls find the answer in the attached image. The answer should also yield 2π/sqrt(3) which is the same as mjw answer. Please upvote if you find it useful

0

One popular method to find this integral is to let $z=e^{ix}$, so that $\sin x = \frac{z+z^{-1}}{2i}$ and $\frac{dz}{iz} = dx.$

$$I=\int_0^{2\pi} \frac{dx}{2-\sin x} = \oint_C \frac{ \frac{dz}{iz}}{2-\frac{z-z^{-1}}{2i}}= -2\oint_C \frac{dz}{z^2-4iz-1}$$ where $C$ is the unit circle traversed counterclockwise.

$$I = -2 \oint \frac{dz}{(z-r_1)(z-r_2)}$$ where $r_1=i(2-\sqrt{3})$ and $r_2 = i(2+\sqrt{3})$. The root $r_1$ is inside the circle and $r_2$ is outside.

We have $$I = -2\cdot (2\pi i)\cdot \text{Res}_{z=r_1} \, \frac{1}{(z-r_1)(z-r_2)}=- \frac{4 \pi i }{r_1-r_2} = \frac{2\pi }{\sqrt{3}}.$$

mjw
  • 8,647
  • 1
  • 8
  • 23
  • Notice that the OP states, in on of his comments, that he/she is a bit new to Calculus. That means that your solution, based on standard complex analysis techniques, may not be within her set of tools. – Mittens Jun 18 '21 at 05:35
  • @OliverDiaz It was me (not the OP) who said that I was bit new to calculus, anyway the OP mentioned that he didn't need another way to do the integral. – Asher2211 Jun 18 '21 at 05:52
  • @OliverDiaz Since you mentioned, what is the integral if $\xi<1$ ? – an offer can't refuse Jun 18 '21 at 06:18
  • For the integral $\displaystyle \int_0^{2\pi} \frac{dx}{\xi-\sin x}$ to convergence, must be that $|\xi|>1$. – mjw Jun 18 '21 at 12:37
  • @OliverDiaz, if the OP had made a comment about his experience with calculus, that would not have been stated in the question, so how is somebody to know what techniques we can use in the answers and which ones we should shy away from? And besides, who is to say what is easy to comprehend and what is not so easy? Admittedly, the definition of residue might need some explanation, or it could be looked up here: https://mathworld.wolfram.com/ComplexResidue.html with additional information here: https://mathworld.wolfram.com/ResidueTheorem.html – mjw Jun 18 '21 at 13:36