# Math Help - integration problem

1. ## integration problem

How will you integrate dx
1+sinxcosx

2. Originally Posted by gundu
How will you integrate dx
1+sinxcosx
Using the fact that: $sin(2 \theta) = 2sin(\theta)cos(\theta)$, we get:

$\int 1+sin(x)cos(x) dx = \int 1 + \frac{1}{2}sin(2x) dx$

Could you finish it off from here?

3. Originally Posted by gundu
How will you integrate dx
1+sinxcosx
Remember that $\sin{2x} = 2\sin{x}\cos{x}$.

Therefore $\sin{x}\cos{x} = \frac{1}{2}\sin{2x}$.

So $\int{1 + \sin{x}\cos{x}\,dx} = \int{1 + \frac{1}{2}\sin{2x}\,dx}$

$= x - \frac{1}{4}\cos{2x} + C$.

Alternatively you could use a $u$ substitution.

$\int{1 + \sin{x}\cos{x}\,dx} = \int{1\,dx} + \int{\sin{x}\cos{x}\,dx}$

$= x + \int{\sin{x}\cos{x}\,dx}$.

Let $u = \sin{x}$ so that $\frac{du}{dx} = \cos{x}$.

Then you get

$= x + \int{u\,\frac{du}{dx}\,du}$

$= x + \int{u\,du}$

$= x + \frac{1}{2}u^2 + C$

$= x + \frac{1}{2}\sin^2{x} + C$

It's not difficult to show that the two answers are the same...

4. thanks

However the question is actually

How will you integrate
1/(1+sinx cosx)

Sorry for the confusion.

5. Originally Posted by gundu
thanks

However the question is actually

How will you integrate
1/(1+sinx cosx)

Sorry for the confusion.
Learning something from the previous replies, you should be able to re-write the integral as $\int \frac{2}{2 + \sin (2x)} \, dx$.

6. $\int\frac{1}{1+\sin x\cos x}dx=\int\frac{1}{1+\frac{\sin 2x}{2}}dx=2\int\frac{dx}{2+\sin 2x}$
Now substitute $u=\tan x$.