We can rewrite this integral by expanding the sin(2x) into 2sin(x)cos(x).

`int (cos(x) + sin(x))/(2sin(x)cos(x)) dx`

which equals

`1/2 int cos(x)/(sin(x)cos(x)) dx + 1/2 int sin(x)/(sin(x)cos(x)) dx`

in the first integral we can cancel the cos(x) and in the second integral we can cancel the sin(x).

`1/2 int (dx)/sin(x)...

## Unlock

This Answer NowStart your **48-hour free trial** to unlock this answer and thousands more. Enjoy eNotes ad-free and cancel anytime.

Already a member? Log in here.

We can rewrite this integral by expanding the sin(2x) into 2sin(x)cos(x).

`int (cos(x) + sin(x))/(2sin(x)cos(x)) dx`

which equals

`1/2 int cos(x)/(sin(x)cos(x)) dx + 1/2 int sin(x)/(sin(x)cos(x)) dx`

in the first integral we can cancel the cos(x) and in the second integral we can cancel the sin(x).

`1/2 int (dx)/sin(x) + 1/2 int (dx)/cos(x)`

1/sin(x) = csc(x) and 1/cos(x) = sec(x)

we can look up in a trig integral table that the integral of csc and sec are -ln(csc(x) + cot(x)) and ln(sec(x) + tan(x)) respectively.

so this whole integral is

`1/2 (-ln(csc(x) + cot(x)) + ln(sec(x) + tan(x)))`

`int(cos x+sin x)/sin(2x) dx`

Let us denote the above integral wit `I.`

Use formula for sine of double angle: `sin2theta=2sin theta cos theta`

`int(cos x+sin x)/(2sin x cos x)dx=1/2int cos x/(sin x cos x)dx+1/2int sin x/(sin x cos x)dx=`

`1/2(int dx/sin x+int dx/cos x)`

Let us denote the above two integrals with `I_1` and `I_2` respectively.

To calculate `I_1` we use sine of double angle formula.

`I_1=int dx/(2sin(x/2) cos (x/2))`

Using the fact that `tan theta=sin theta/cos theta` we can write the above as

`int (1/2 cdot1/(cos^2(x/2)))/(tan(x/2))dx`

Now we use the fact that `int (f'(x))/(f(x))dx=ln|f(x)|+C.`

Therefore, since `(tan(x/2))'=1/2cdot1/(cos^2(x/2))` we have

`ln|tan(x/2)|+C`

Let us now calculate `I_2.`

`I_2=int dx/cosx`

Use the following formula: `cos theta=sin(theta+pi/2).`

`int dx/(sin(x+pi/2))`

Now we proceed as we did in calculating `I_2.` We use formula for sine of double angle.

`int dx/(2sin(x/2+pi/4)cos(x/2+pi/4))=int(1/2cdot1/(cos^2(x/2+pi/4)))/(tan(x/2+pi/4))dx`

Since `(tan(x/2+pi/4))'=1/2cdot 1/(cos^2(x/2+pi/4))` we get

`ln|tan(x/2+pi/4)|+C`

We can now calculate our starting integral `I.`

`I=1/2(I_1+I_2)=1/2(ln|tan(x/2)|+ln|tan(x/2+pi/4)|)+C`

**Further Reading**