On this page
The integral of 1/(1 + sin x) is a common practice question in Class 12 calculus and JEE Main preparation. There is no formula for 1 over a sum, but one move fixes it: multiply by the conjugate. Below is the four-line method, a quick check, and why your textbook's answer might look different.
How do you integrate 1/(1 + sin x) with the conjugate method?
Multiply the top and bottom by (1 − sin x): ∫ dx/(1 + sin x) = ∫ (1 − sin x)/(1 − sin²x) dx.
Use the Pythagorean identity sin²x + cos²x = 1, so 1 − sin²x = cos²x: the integral becomes ∫ (1 − sin x)/cos²x dx.
Split the fraction: 1/cos²x = sec²x, and sin x/cos²x = (1/cos x)(sin x/cos x) = sec x tan x. So the integral is ∫ (sec²x − sec x tan x) dx.
Integrate each term. The standard results are ∫sec²x dx = tan x + C and ∫sec x tan x dx = sec x + C, as listed in OpenStax Calculus Volume 1, Table 4.13.
So ∫ dx/(1 + sin x) = tan x − sec x + C.
The identity in step 2 is the first of the three Pythagorean identities in OpenStax Precalculus 2e. If integrals of secant are still shaky for you, our post on how to integrate sec x and cosec x, and check your answer covers them.
Why does multiplying by 1 − sin x work?
It is the same trick as rationalising 1/(1 + √2). The difference of squares (a + b)(a − b) = a² − b² turns the sum in the denominator into a single term, cos²x. Every piece then becomes a secant or tangent you already know how to integrate.
How do you check that tan x − sec x is right?
Differentiate it. By the same OpenStax table, d/dx (tan x − sec x) = sec²x − sec x tan x = (1 − sin x)/cos²x. Multiply the top and bottom by (1 + sin x) and you are back at 1/(1 + sin x).
One subtle point: tan x − sec x is undefined at x = π/2, though 1/(1 + sin x) equals 1/2 there. Write it as (sin x − 1)/cos x and multiply the top and bottom by (1 + sin x) to get −cos x/(1 + sin x), which equals 0 at π/2. That is the gold curve in the diagram above.
Why does your book's answer look different?
With the tan half-angle substitution t = tan(x/2), you get −2/(1 + tan(x/2)) + C. That looks different from tan x − sec x, but it is the same answer. Put sin x and cos x in terms of t and −cos x/(1 + sin x) simplifies to (t − 1)/(t + 1), which is 1 − 2/(1 + t). The two answers differ by the constant 1, which C absorbs, so both are correct. Our post on the tan half-angle substitution shows how sin x and cos x convert.
What about 1/(1 − sin x) and 1/(1 + cos x)?
The same move works on the whole family:
∫ dx/(1 − sin x): multiply by (1 + sin x) to get ∫ (sec²x + sec x tan x) dx = tan x + sec x + C. A worked solution on SATHEE, the Ministry of Education's free exam-guidance initiative with IIT Kanpur, reaches the same answer by the same route.
∫ dx/(1 + cos x): multiply by (1 − cos x) to get ∫ (cosec²x − cosec x cot x) dx. Since ∫csc²x dx = −cot x + C and ∫csc x cot x dx = −csc x + C (OpenStax, Table 4.13), the answer is cosec x − cot x + C, which simplifies to tan(x/2) + C.
∫ dx/(1 − cos x): multiply by (1 + cos x) to get −cot x − cosec x + C.
For a sin x + b cos x in the denominator, see how to integrate (a sin x + b cos x)/(c sin x + d cos x).
What should you check before moving on?
Did you multiply the top and the bottom, not just the bottom?
Signs: + sin x in the denominator gives tan x − sec x; − sin x gives tan x + sec x.
Did you differentiate your answer once?
For more practice with integrals like these, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. If the Pythagorean identities need work, start with their lesson in the Fermi Concept Library.
Cover the answers above, work out 1/(1 − cos x) yourself, then differentiate to check it.



