INT [(x+Sinx)/(1+cosx)]dx
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
That x is not very easy to deal with. If you have a typo such that that x is actually supposed to be a 1, then this integration will be easy, but with an x I think it will take a few by-parts integrations to deal with.
INT (x + sinx)/(1 + cosx) dx
Let's multiply the numerator and denominator by 1 - cosx
INT [(x + sinx)(1 - cosx)]/(1 - cos^2x) dx
INT (x - x*cosx + sinx - sinxcosx)/sin^2x dx
Let's break this up into 4 fractions:
INT x/sin^2x dx - INT x*cosx/sin^2x dx + INT sinx/sin^2x - INT sinx*cosx/sin^2x dx
INT x*csc^2x dx - INT x*cotx*cscx dx + INT cscx dx - INT cotx dx
Now we will integrate each of these individually:
First:
INT x*csc^2x dx
Let u = x <--> du = dx
Let dv = csc^2x dx <--> v = -cotx
INT x*csc^2x dx = -xcotx + INT cotx dx = -xcotx + ln(abs(sinx))
Second:
INT x*cotx*cscx dx
Let u = x <--> du = dx
Let dv = cotx*cscx dx <--> v = -cscx
INT x*cotx*cscx dx = -x*cscx + INT cscx dx = -x*cscx - ln(abs(cscx + cotx))
Third:
INT cscx dx = -ln(abs(cscx + cotx))
Forth:
INT cotx dx = ln(abs(sinx))
Therefore:
INT (x + sinx)/(1 + cosx) dx = (-xcotx + ln(abs(sinx))) - (-x*cscx - ln(abs(cscx + cotx))) + (-ln(abs(cscx + cotx))) - (ln(abs(sinx))) + C
I don't feel like simplifying that... Check to make sure I did the integrations correctly. I suspect I may have made a few mistakes.
(sigh) To be honest I did it on my calculator and it looked like a simple enough result I never went back to see if I could do it by hand. I CAN'T (baby-like wail). So I'll simplify your result down to mine:
csc(x) - cot(x) = 1/sin(x) - cos(x)/sin(x) = (1 - cos(x))/sin(x)
= (1 - cos(x))/sqrt(1 - cos^2(x)) = (1 - cos(x))/[sqrt(1 - cos(x))*sqrt(1 + cos(x))]
= sqrt(1 - cos(x))/sqrt(1 + cos(x)) = sqrt((1 - cos(x))/2)/sqrt((1 + cos(x))/2)
= sin(x/2)/cos(x/2) = tan(x/2)
-Dan