024. Integration of Rational Functions

Evaluate

∫11+tan⁡xdx\begin{aligned} \int \cfrac{1}{1 + \tan x} dx \end{aligned}

When the numerator can be expressed in terms of the derivative of the denominator, the expression can be rewritten as follows, and then the constants α\alpha and β\beta can be determined. ∫g(x)f(x)dx=∫αf(x)+βf′(x)f(x)dx=αx+βln⁡∣f(x)∣+C\begin{aligned} \int \cfrac{g(x)}{f(x)} dx = \int \cfrac{\alpha f(x) + \beta f'(x)}{f(x)} dx = \alpha x + \beta \ln \vert f(x) \vert + C \end{aligned}

To make use of this, first multiplying both the numerator and the denominator by cos⁡x\cos x gives ∫cos⁡xsin⁡x+cos⁡xdx=∫α(sin⁡x+cos⁡x)sin⁡x+cos⁡x+β(cos⁡x−sin⁡x)sin⁡x+cos⁡xdx\begin{aligned} \int \cfrac{\cos x}{\sin x + \cos x} dx = \int \cfrac{\alpha \left( \sin x + \cos x \right)}{\sin x + \cos x} + \cfrac{\beta \left( \cos x - \sin x \right)}{\sin x + \cos x} dx \end{aligned}

Since cos⁡x=(α−β)sin⁡x+(α+β)cos⁡x\cos x = (\alpha - \beta) \sin x + (\alpha + \beta) \cos x, α−β=0\alpha - \beta = 0 and α+β=1\alpha + \beta = 1, so α=β=1/2\alpha = \beta = 1 / 2. Therefore, (x+ln⁡∣sin⁡x+cos⁡x∣)/2+C(x + \ln \vert \sin x + \cos x \vert) / 2 + C.


© 2026. All rights reserved.