
William W. answered 10/21/19
Math and science made easy - learn from a retired engineer
The key to this problem is the substitution. Many of these rational functions with sin or cos in the denominator take the substitution u = tan(x/2)
So, let u = tan(x/2)
Drawing the triangle, we get:
So cos(x/2) = 1/√(u2+1)
To find cos(x), we need to use the double angle identity because 2(x/2) = x
So, cos(2(x/2)) = 2cos2(x/2) - 1 meaning cos(x) = 2[1/√(u2+1)]2 - 1 = 2/(u2+1) - 1 or cos(x) = (1-u2)/(u2+1)
Drawing that triangle:
Solving for y you get y = sqrt[(u2 + 1)2 - (1 - u2)2] which simplifies to √(4u2) or 2u
So the sin(x) = 2u/(u2+1)
Also, since u = tan(x/2) then du/dx = 1/2sec2(x/2) or dx = 2du/sec2(x/2) but since sec2(x/2) = 1 + tan2(x/2) then dx = 2du/(1 + tan2(x/2)) or dx = 2du/(1 + u2)
Now, making all the substitutions, ∫1/[1-cos(x)+sin(x)]dx becomes
∫1/[1 - (1-u2)/(u2+1) + 2u/(u2+1)] • 2du/(1 + u2)
There's a bunch of simplifying but this simplifies down to ∫1/(u2 + u) du or ∫1/[u(u+1)] du
Using Partial Fractions, this becomes ∫[1/u - 1/(u+1)] du which can be integrated as ln(u) - ln (u + 1)
But since u = tan(x/2) then it goes back to: ln(tan(x/2)) - ln(tan(x/2) + 1) + C
Wow