Originally Posted by

**topsquark** Divide this into two integrals:

Int[(x+Sinx)/(1+cosx) dx] = Int[x/(1 + cos(x)) dx] + Int[sin(x)/(1 + cos(x)) dx]

The first integral can be done by parts:

Int[p dq] = pq - Int[q dp]

Let p = x, dp = dx

Let dq = dx/(1 + cos(x)), q = Int[dx/(1 + cos(x))] = tan(x/2)

So

Int[x/(1 + cos(x)) dx] = x*tan(x/2) - Int[tan(x/2) dx] = x*tan(x/2) - (-2)*ln{|cos(x/2)|} = x*tan(x/2) + 2*ln{|cos(x/2)|}

The second integral may be done by substitution: y = cos(x), dy = -sin(x) dx:

Int[sin(x)/(1 + cos(x)) dx] = -Int[dy/(1 + y)] = -ln{|y + 1|} = -ln{|cos(x) + 1|}

Thus:

Int[(x+Sinx)/(1+cosx) dx] = x*tan(x/2) + 2*ln{|cos(x/2)|} - ln{|cos(x) + 1|}

Now, |cos(x/2)| = sqrt{(1 + cos(x))/2} so

ln{|cos(x/2)|} = ln[sqrt{(1 + cos(x))/2}] = ln[sqrt{(1 + cos(x))}] - ln[sqrt{2}] = (1/2)ln[cos(x) + 1] - (1/2)ln[2] so.....

Int[(x+Sinx)/(1+cosx) dx] = x*tan(x/2) + 2*ln{|cos(x/2)|} - ln{|cos(x) + 1|}

= x*tan(x/2) + ln{cos(x) + 1} - ln{2} - ln{|cos(x) + 1|}

= x*tan(x/2) - ln{2}

and, of course we need to add an arbitrary constant, so I'd say that

Int[(x+Sinx)/(1+cosx) dx] = x*tan(x/2) + C

-Dan