Evaluate the integral: I = integral dx/(1 + sin(x))
Evaluate the integral: $$ I = \int \frac{dx}{1 + \sin(x)}. $$
Explanation of Method
The Weierstrass substitution $t=\tan(x/2)$ converts any rational function of $\sin x$ and $\cos x$ into an ordinary rational function of $t$, using $\sin x = \frac{2t}{1+t^2}$, $\cos x=\frac{1-t^2}{1+t^2}$, and $dx=\frac{2}{1+t^2}dt$. Substituting these turns $1+\sin x$ into a perfect square over $1+t^2$, which cancels cleanly against the numerator.
- Substitute $t=\tan(x/2)$ and rewrite $\sin x$, $dx$ in terms of $t$.
- Simplify $1+\sin x$ into a single fraction in $t$.
- Reduce the resulting integral to a simple power of $(1+t)$.
- Integrate and substitute back $t=\tan(x/2)$.
Step 1 · Use the Weierstrass substitution
To solve this integral, we use the substitution:
$$ t = \tan\left(\frac{x}{2}\right). $$
This substitution is a common method when dealing with integrals involving $\sin(x)$ and $\cos(x)$. The following identities hold:
$$ dx = \frac{2}{1+t^2}\,dt, \qquad \sin(x) = \frac{2t}{1+t^2}. $$
Step 2 · Simplify $1+\sin x$
Substituting the expression for $\sin(x)$:
$$ 1+\sin(x) = 1 + \frac{2t}{1+t^2} = \frac{1+t^2+2t}{1+t^2} = \frac{(1+t)^2}{1+t^2}. $$
This is the key simplification: the denominator becomes a perfect square divided by $1+t^2$.
Step 3 · Substitute into the integral
Substituting $dx = \dfrac{2}{1+t^2}\,dt$ and $1+\sin(x)=\dfrac{(1+t)^2}{1+t^2}$ into the integral:
$$ I = \int \frac{\frac{2}{1+t^2}}{\frac{(1+t)^2}{1+t^2}}\,dt = \int \frac{2}{(1+t)^2}\,dt. $$
The $1+t^2$ factors cancel exactly, leaving a simple power of $(1+t)$.
Step 4 · Integrate
Using the power rule for integration:
$$ \int \frac{2}{(1+t)^2}\,dt = 2\int (1+t)^{-2}\,dt = 2\cdot \left(-\frac{1}{1+t}\right) = -\frac{2}{1+t}. $$
Thus:
$$ I = -\frac{2}{1+t} + C. $$
Step 5 · Substitute back $t = \tan(x/2)$
Finally, substituting back $t = \tan\left(\dfrac{x}{2}\right)$, we obtain the result:
$$ I = -\frac{2}{1+\tan\left(\frac{x}{2}\right)} + C. $$
Summary Table
| Quantity | Value |
|---|---|
| Substitution | $t = \tan(x/2)$ |
| $1+\sin x$ in terms of $t$ | $(1+t)^2/(1+t^2)$ |
| Reduced integral | $\int 2(1+t)^{-2}\,dt$ |
Additional Notes
- The domain of $I$ excludes $x=-\tfrac\pi2+2k\pi$ for integer $k$, where $1+\sin x=0$, and points where $\tan(x/2)$ itself is undefined ($x=\pi+2k\pi$).
- An equivalent closed form is $I=\tan x-\sec x+C$, obtained by multiplying the original integrand by $\frac{1-\sin x}{1-\sin x}$ and using $1-\sin^2x=\cos^2x$; the two forms differ only by an additive constant.
- The result can be checked by differentiating $-\dfrac{2}{1+\tan(x/2)}$ with the chain rule and confirming it returns $\dfrac{1}{1+\sin x}$.
Result
The solution to the integral is: