0

Me and my friend were trying to solve this integration question for our upcoming exams and we came up with 2 different ways, both are shown in pictures below, I don't know why we got two different answers. I think it's related to domain/range of inverse functions. Please let me know.

1st Method.(original image)

\begin{align*} 2I &= \pi \int_{0}^{\pi} \frac{\sec x \tan x}{1 + \sec^2 x} \, \mathrm{d}x \\ &= \pi \int_{0}^{\frac{\pi}{2}} \left( \frac{\sec x \tan x}{1 + \sec^2 x} + \frac{\sec(\pi-x) \tan(\pi-x)}{1 + \sec^2 x} \right) \, \mathrm{d}x \\ &= 2\pi \int_{0}^{\frac{\pi}{2}} \frac{\sec x \tan x}{1 + \sec^2 x} \, \mathrm{d}x \\ &= 2\pi \left[ \tan^{-1}(\sec x)\right]_{0}^{\frac{\pi}{2}} \\ &= 2\pi \left[ \tan^{-1}(\infty) - \tan^{-1}(1) \right] \\ &= 2\pi \left[ \frac{\pi}{2} - \frac{\pi}{4} \right] = \frac{\pi^2}{2}. \\[1em] \implies & \quad I = \frac{\pi^2}{4}. \end{align*}

2nd Method.(original image)

\begin{align*} 2I &= \int_{0}^{\pi} \frac{\pi \sec x \tan x}{1 + \sec^2 x} \, \mathrm{d}x. \end{align*}

Let $t = \sec x$. Then

$$ \mathrm{d}t = \sec x \tan x \mathrm{d}x, \qquad \text{Limits:} \quad \begin{array}{|c|c|c|} \hline x & 0 & \pi \\ \hline t & 1 & -1 \\ \hline \end{array} $$

So,

\begin{gather*} 2I = \int_{1}^{-1} \frac{\pi}{1+t^2} \, \mathrm{d}t = \left[ \pi \tan^{-1}(t) \right]_{1}^{-1} = \pi \left[ -\frac{\pi}{4} - \frac{\pi}{4} \right] \\[1em] \implies \quad -\frac{\pi^2}{4}. \end{gather*}

Sangchul Lee
  • 167,468
  • 1
    $\sec $x is not defined when $x = \pi/2$ , thus second method is incorrect. –  Jun 05 '22 at 11:22
  • 1
    The first method is correct, whereas the second method not. In the second method, the issue is that the function $x \mapsto \sec x$ has discontinuity at $x = \pi/2$ with $$\lim_{x\to(\pi/2)^-} \sec x = +\infty, \qquad \lim_{x\to(\pi/2)^+} \sec x = -\infty. $$ Therefore, the substitution $t = \sec x$ does not work. To make amend of the second approach, one can split the integral into two parts just like in the first method, and then apply the substitution to each of them. – Sangchul Lee Jun 05 '22 at 11:28
  • @RamanujanXXV But the first method involves secx too and the upper limit is pi/2. Is that not incorrect? Besides, if the function that we're integrating is defined in the given interval, why would secx matter? Is it because we substitute t=sec(x)? – Yash Gabra Jun 05 '22 at 11:30
  • Yes, the substitution would make sense only if it is continuous and the first one has upper limit has $\pi/2$, so we can make it x tending to $\pi/2$ –  Jun 05 '22 at 11:33

1 Answers1

1

2nd Method. \begin{align*} 2I &= \int_{0}^{\pi} \frac{\pi \sec x \tan x}{1 + \sec^2 x} \, \mathrm{d}x. \end{align*} Let $t = \sec x$.

@RamanujanXXV But the first method involves $\sec x$ too and the upper limit is $\frac{\pi}2.$ Is that not incorrect? Besides, if the function that we're integrating is defined in the given interval, why would $\sec x$ matter? Is it because we substitute $t=\sec(x)?$

Yes, the substitution technique that you use in Method 2 (but not Method 1) is legitimate only if certain specific conditions are satisfied:

  • From: Justification for Integration by Substitution

    If $g'$ is integrable on $[a,b]$ and $f$ is integrable, and has an antiderivative, on $g[a,b],$ then, substituting $t=g(x)$ into the LHS, $$\int_a^bf\big(g(x)\big)\, g'(x)\,\mathrm{d}x=\int_{g(a)}^{g(b)}f(t)\,\mathrm{d}t.$$

$g(x)=\sec x$ not being bounded on $[0,π]$ invalidates your Method 2 because

  • $g$ is not bound on $[0,π]\implies g' $ is not bound on $[0,π]\implies g'$ is not integrable on $[0,π].$

Generally, if $g$ is continuously differentiable on $[a,b],$ then $g'$ is integrable on $[a,b],$ which means that it is valid to proceed with the change of integration variable (and that condition on $f$ is automatically satisfied on succesful integration with the new variable $t$).

ryang
  • 38,879
  • 14
  • 81
  • 179