2

I am trying to solve the integral

$$ \int_0^{\frac{3}{2}\pi}\frac{1}{\frac{5}{2}+\cos(2x)}dx $$

And I get the primitive function to be

$$ \frac{2\arctan\left(\sqrt{\frac{7}{3}}\tan{x}\right)}{\sqrt{21}} $$

But $\tan(\frac{3}{2}\pi)$ is not defined. Mathematica gets the same primitive function and can solve it when using the given boundaries. How do I handle the boundaries?

Gustaf
  • 23
  • 2
    Yeah! You have solved correctly. Now see when you put $x = 3 \pi / 2$ So, $$ 2 \arctan(\infty) = 2 \left( \frac{\pi}{2} \right) = \pi $$ I hope you got it. – Lucky Chouhan Mar 01 '23 at 18:23
  • 1
    You have to take $\lim\limits_{x\to\frac{3\pi}2-}$ – Тyma Gaidash Mar 01 '23 at 18:41
  • @LuckyChouhan thats true! Thanks for your reply. But I still don't get the right answer. Correct answer should be $\sqrt{\frac{3}{7}}\pi$. And I get $\frac{ \pi }{ \sqrt{21}}$ which isn't close numerically. Am I doing something wrong? – Gustaf Mar 01 '23 at 18:55
  • 1
    @Gustaf that's why I am thinking because I solved using $\cos(2x)$ formula. And when R. J. Mathar solved by splitting he got the correct answer. May be because of discontinuity ? – Lucky Chouhan Mar 01 '23 at 18:58
  • Related: https://math.stackexchange.com/questions/1356523/what-are-the-restrictions-on-using-substitution-in-integration (and the other questions linking there). – Hans Lundmark Mar 01 '23 at 21:02

3 Answers3

4

Because the cosine is periodic we may split the interval into 3 parts: $$ \int_0^{3\pi/2} \frac{dx}{5/2+\cos(2x)} = \frac12 \int_0^{3\pi}\frac{dy}{5/2+\cos y} = \frac32 \int_0^{\pi}\frac{dy}{5/2+\cos y} $$ $$ = \frac32 \frac{2}{\sqrt{(5/2)^2-1}}\arctan\frac{\frac32 \tan(y/2)}{\sqrt{21/4}}\bigg{|}_{y=0}^{y=\pi} = \frac32 \frac{2}{\sqrt{21/4}}\arctan\frac{3 \tan(y/2)}{\sqrt{21}} \bigg{|}_{y=0}^{y=\pi} $$ $$ = \frac32 \frac{2}{\sqrt{21/4}} \bigg \{ \arctan\frac{3 \tan(\pi/2)}{\sqrt{21}} - \arctan\frac{3 \tan(0/2)}{\sqrt{21}} \bigg \} $$ $$ = \frac{3}{\sqrt{21/4}}\bigg \{ \arctan\infty - \arctan 0 \bigg \} $$ $$ = \frac32 \frac{2}{\sqrt{21/4}}[ \pi/2 - 0 ] =\sqrt{\frac37}\pi $$

R. J. Mathar
  • 2,324
3

Let $$ F(x)=\frac{2\arctan\left(\sqrt{\frac{7}{3}}\tan{x}\right)}{\sqrt{21}}. $$ Then $f(x)$ is undefined at $x=\frac\pi2, \frac{3\pi}2$ and $$ \lim_{x\to(\frac{\pi}2)^-}F(x)=\infty, \lim_{x\to(\frac{\pi}2)^+} F(x)=-\infty,\lim_{x\to(\frac{3\pi}2)^-}F(x)=\infty$$ and hence \begin{eqnarray} &&\int_0^{\frac{3}{2}\pi}\frac{1}{\frac{5}{2}+\cos(2x)}dx \\ &=&F(x)\bigg|_{0}^{(\frac{\pi}2)^-}+F(x)\bigg|_{(\frac{\pi}2)^+}^{(\frac{3\pi}2)^-}\\ &=&\lim_{(\frac{\pi}2)^-}F(x)+\lim_{(\frac{3\pi}2)^-}F(x)-\lim_{(\frac{\pi}2)^+}F(x)\\ &=&\frac{3\pi}{\sqrt{21}}=\pi\sqrt{\frac37}. \end{eqnarray}

xpaul
  • 44,000
3

Since the function is $\pi$-periodic, $$\int_{\pi}^{\frac{3}{2}\pi}\frac{1}{\frac{5}{2}+\cos(2x)}dx=\int_{0}^{\frac{1}{2}\pi}\frac{1}{\frac{5}{2}+\cos(2x)}dx.$$ It is also symmetric about $x=\frac{1}{2}\pi$-line and therefore by $x\rightarrow \pi-x$ substitution $$\int_{\frac{1}{2}\pi}^{\pi}\frac{1}{\frac{5}{2}+\cos(2x)}dx=\int_{0}^{\frac{1}{2}\pi}\frac{1}{\frac{5}{2}+\cos(2x)}dx.$$ Hence, $$\int_{0}^{\frac{3}{2}\pi}\frac{1}{\frac{5}{2}+\cos(2x)}dx=3\int_{0}^{\frac{1}{2}\pi}\frac{1}{\frac{5}{2}+\cos(2x)}dx.$$ Finally, by using OP's antiderivative, the result will be $$3\left(\frac{2\arctan\left(\sqrt{\frac{7}{3}}\tan{x}\right)}{\sqrt{21}}\bigg{|}_0^{\frac{\pi}{2}}\right)=3\left(\frac{2\arctan\left(\infty\right)}{\sqrt{21}}\right)=\frac{\sqrt3}{\sqrt7}\pi.$$

Bob Dobbs
  • 10,988