# Rules to choose substitution for definite integration

Let us consider the integral :$$\int_0^{\frac{2\pi}{3}}\frac{\cos x}{1+\sin x}dx$$

I want to solve it by using the substitution $$t=\sin x$$.

But I read in a book that the substitution that we make must be monotonic in the given domain.

The author even went on to give some examples to justify his statement one of them being $$\int_0^{\pi}\frac{\cos x}{1+\sin x}dx$$

Clearly, the substitution $$t=\sin x$$ does not work here.

Is there a proper result/theorem which would require the substitution to be monotonic or injective. I can only find examples and counter-examples.

• I believe it is stated this way in Baby Rudin. Commented Mar 12, 2022 at 18:05
• Yes, it is: it is Theorem 6.17 and 6.19. Commented Mar 12, 2022 at 18:07
• But in the first example the substitution works and the substitution is neither monotonic nor injective Commented Mar 12, 2022 at 18:09
• "If it is monotonic then substitution works" does not mean that if it's not monotonic then substitution will fail. Commented Mar 12, 2022 at 18:11
• No, it is not necessary. Commented Mar 13, 2022 at 18:57

I suggest you look at my replies in the comments to your post for more details, but here, I just aim to explain what is an appropriate method for utilizing substitution to obtain the correct value for the integral. Notice that $$\int_0^{\frac{2\pi}3}\frac{\cos(x)}{1+\sin(x)}\,\mathrm{d}x=\int_0^{\frac{\pi}2}\frac{\cos(x)}{1+\sin(x)}\,\mathrm{d}x+\int_{\frac{\pi}2}^{\frac{2\pi}3}\frac{\cos(x)}{1+\sin(x)}\,\mathrm{d}x$$ $$=\int_0^{\frac{\pi}2}\frac{\cos(x)}{1+\sin(x)}\,\mathrm{d}x+\int_{\frac{\pi}2}^{\frac{2\pi}3}\frac{-\sin(x-\frac{\pi}2)}{1+\cos(x-\frac{\pi}2)}\,\mathrm{d}x$$ $$=\int_0^{\frac{\pi}2}\frac{\cos(x)}{1+\sin(x)}\,\mathrm{d}x+\int_0^{\frac{\pi}6}\frac{-\sin(x)}{1+\cos(x)}\,\mathrm{d}x.$$ For the first integral, the substitution $$y=\sin(x)$$ is injective and results in $$\int_0^1\frac1{1+y}\,\mathrm{d}y,$$ while for the second integral, the substitution $$y=\cos(x)$$ is injective and results in $$\int_1^{\frac{\sqrt{3}}2}\frac1{1+y}\,\mathrm{d}y.$$ Therefore, $$\int_0^{\frac{2\pi}3}\frac{\cos(x)}{1+\sin(x)}\,\mathrm{d}x=\int_0^1\frac1{1+y}\,\mathrm{d}y+\int_1^{\frac{\sqrt{3}}2}\frac1{1+y}\,\mathrm{d}y=\int_0^{\frac{\sqrt{3}}2}\frac1{1+y}\,\mathrm{d}y=\ln\left(1+\frac{\sqrt{3}}2\right).$$ In this case, it turns out that the direct non-injective substitution gives the same result, but in general, you have to be careful.