2

By using the properties of definite integrals, evaluate $\int_0^{\pi}\frac{x}{1+\sin x}dx$.

My attempt:

(Using the property $\int_0^{2a}f(x)dx=\int_0^a(f(x)+f(2a-x))dx$)

$$\int_0^{2\frac{\pi}{2}}\frac{x}{1+\sin x}dx=\int_0^{\frac{\pi}{2}}(\frac{x}{1+\sin x}+\frac{\pi-x}{1+\sin x})dx$$$$=\pi\int_0^{\frac{\pi}{2}}\frac1{1+\sin x}dx=\pi\int_0^{\frac{\pi}{2}}\frac{1-\sin x}{\cos^2x}dx$$$$=\pi\int_0^{\frac{\pi}{2}}(\sec^2x-\sec x\tan x)dx=\pi[\tan x-\sec x]_0^{\frac{\pi}{2}}$$

Now I am stuck. I understand there might be other ways of solving it, but what's wrong in my method? Why am I not getting the answer?

aarbee
  • 8,246
  • @AnindyaPrithvi Thanks. Did that. – aarbee Nov 08 '20 at 18:17
  • 1
    Maybe $1-\sin x=0$ for $x=\pi/2$ and so you're dividing by zero when multiply and divide by that expression? – Tito Eliatron Nov 08 '20 at 18:18
  • 3
    Your computation is correct. Note that $$\lim_{x\to\frac{\pi}{2}}(\tan x-\sec x)=\lim_{x\to\frac{\pi}{2}}\frac{\sin x-1}{\cos x}\stackrel{\text{L'Hôpital}}=\lim_{x\to\frac{\pi}{2}}\frac{\cos x}{(-\sin x)}=0.$$ So the singularity of your antiderivative at $x=\pi/2$ is removable, and the answer just works. – Sangchul Lee Nov 08 '20 at 18:20
  • 1
    @TitoEliatron Thanks. I think this is it. Can you add that as answer? I'll accept that. – aarbee Nov 08 '20 at 18:20
  • @SangchulLee Oh nice. I didn't know we could do like that too. Thanks. – aarbee Nov 08 '20 at 18:23
  • 3
    @aarbee, Another idea is to use the identity $$\tan x-\sec x=-\frac{\cos x}{1+\sin x},$$ which has the same effect of removing the "artificial" singularity at $x=\pi/2$ but in a more elementary way. – Sangchul Lee Nov 08 '20 at 18:26
  • @SangchulLee that's even better, thanks. – aarbee Nov 08 '20 at 18:32
  • 1
    Could you add a step of how you got the first line of your solution? I can somewhat see how it works, but I don't see the exact step that allowed for the rewriting of the $\pi - x$ to be valid. But it is creative and looking forward to an explanation. – D.C. the III Nov 08 '20 at 18:37
  • 1
    @dc3rd I have edited the post. – aarbee Nov 08 '20 at 18:40
  • 1
    Thanks. for the edit – D.C. the III Nov 08 '20 at 18:42

3 Answers3

4

Your final integral is an improper integral, so you do not evaluate the antiderivative you obtain at the endpoints, you take limits approaching the endpoints.

\begin{align*} \lim_{x \rightarrow 0^+} (\tan x - \sec x) &= -1 \\ \lim_{x \rightarrow (\pi/2)^-} (\tan x - \sec x) &= 0 \text{.} \end{align*}

So you obtain $\pi(0--1) = \pi$, which is the correct answer. (The first limit is not actually necessary, since the antiderivative is continuous at $x = 0$.)

Eric Towers
  • 67,037
  • +1. When you say 'The first limit is not actually necessary', are you implying that whenever we encounter $\infinity$ after putting limits, we can treat that as zero? – aarbee Nov 08 '20 at 18:37
  • @aarbee : No. I've just edited in the observation that the antiderivative is continuous at $x = 0$, so no use of a limit is needed -- just evaluate at that endpoint. – Eric Towers Nov 08 '20 at 18:38
  • Oh, okay, thanks. – aarbee Nov 08 '20 at 18:41
1

$1-\sin x=0$ for $x=\pi/2$ and so you're dividing by zero when multiply and divide by that expression.

  • We're also multiplying by $0$, so this doesn't quite identify the problem. In fact, we are multiplying by something that is constantly $1$ where it is defined and can be extended continuously to $1$, so if we take a limit to evaluate the antiderivative is is approaches this singularity, we will obtain the correct answer where it seems we are dividing by zero. – Eric Towers Nov 08 '20 at 18:41
1

Alternatively, I like to try to change sine to cosine and then tackle it by the properties of odd and even functions.

First of all, I use the substitution $y=\dfrac{\pi}{2}-x,$ then

$$ \begin{aligned} I &=\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{\frac{\pi}{2}-y}{1+\cos y} d y \\ &=\frac{\pi}{2} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{d y}{1+\cos y}-\int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{y}{1+\cos y} d y \\ &=\frac{\pi}{2} \int_{-\frac{\pi}{2}}^{\frac{\pi}{2}} \frac{d y}{1+\cos y} \quad \text { (By the fact that } \frac{y}{1+\cos y} \textrm{ is odd.}) \\ &=\frac{\pi}{2} \int_{0}^{\frac{\pi}{2}} \sec ^{2} \frac{y}{2} d y \\ &=\pi\left[\tan \frac{y}{2}\right]_{0}^{\frac{\pi}{2}} \\ &=\pi \end{aligned} $$ :|D Wish you enjoy the proof!

Lai
  • 20,421