4
$\begingroup$

Evaluate $$\int \frac{1}{1+\sin x+\cos x}\:dx$$

I tried several ways but all of them didn't work

I tried to use Integration-By-Parts method but it's going to give me a more complicated integral

I also tried u-substitution but all of my choices of u didn't work

Any suggestions?

$\endgroup$
2
  • 5
    $\begingroup$ Did you try substitutions related to $t = \tan x/2$? $\endgroup$
    – Simon S
    Commented Apr 11, 2015 at 16:16
  • $\begingroup$ No!. But how is this substitution going to make the intgeral simpler? $\endgroup$
    – Maher
    Commented Apr 11, 2015 at 16:34

6 Answers 6

6
$\begingroup$

$$\int \frac{1}{1+\sin x+\cos x}\:dx\stackrel{t=\tan(x/2)}=\int\frac{dt}{1+t}=\ln |1+t|+c=\ln|1+\tan(x/2)|+c$$


As $dt=\frac12\sec^2(x/2)dx\implies 2dt=(1+\tan^2(x/2))dx\implies 2dt=(1+t^2)dx$ where: $$\frac{1}{1+\sin x+\cos x}=\frac{1}{1+\frac{2t}{1+t^2}+\frac{1-t^2}{1+t^2}}=\frac{1+t^2}{1+t^2+2t+1-t^2}=\frac{1+t^2}{2t+2}=\frac{\frac{2dt}{dx}}{2(1+t)}$$

$\endgroup$
4
  • $\begingroup$ why is $tan(x/2)$? how did you change the denominator? $\endgroup$
    – Maher
    Commented Apr 11, 2015 at 16:33
  • 1
    $\begingroup$ @Maher $\tan (\frac12 x)$ is an all-purpose trick when deal with integrals involving $\sin, \cos, \tan$ in a rational combination. $\endgroup$
    – Vim
    Commented Apr 11, 2015 at 16:43
  • $\begingroup$ @Maher edited . $\endgroup$
    – RE60K
    Commented Apr 11, 2015 at 16:44
  • $\begingroup$ why -1? who? why? $\endgroup$
    – RE60K
    Commented Apr 12, 2015 at 5:24
5
$\begingroup$

Write $\sin(x)$ in the denominator as $2\sin(x/2)\cos(x/2)$ and $\cos(x)$ as $2(\cos(x/2))^2-1$. Now the 1s get cancelled. Take $(\cos(x/2))^2$ out from the denominator and send it to numerator as $(\sec(x/2))^2$. Now you arrived at $\frac{\sec(x/2)^2}{2 \tan(x/2) + 2}$. Proceed.

$\endgroup$
5
  • $\begingroup$ A good answer for those that are not already familiar with the power of the $t=\tan(x/2)$ substitution. I fixed your formatting to use MathJax. $\endgroup$
    – Ian
    Commented Apr 11, 2015 at 16:23
  • $\begingroup$ Please use latex for your maths text next time.. See here. $\endgroup$ Commented Apr 11, 2015 at 16:23
  • $\begingroup$ Without properly typing your answer it has a light chance it will even get read by many in the site: meta.math.stackexchange.com/questions/5020/… $\endgroup$
    – Timbuc
    Commented Apr 11, 2015 at 16:23
  • $\begingroup$ Duly noted.Will do next time. $\endgroup$
    – GrandAlpha
    Commented Apr 11, 2015 at 16:25
  • $\begingroup$ Personally I hate using the Weierstrass substitution, and only as a last-ditch effort, because you end up with really messy rational functions. $\endgroup$
    – Dylan
    Commented Apr 12, 2015 at 0:17
4
$\begingroup$

It is easy to recall the half-angle identities $$\begin{align*} \sin \frac{x}{2} &= \sqrt{\frac{1-\cos x}{2}}, \\ \cos \frac{x}{2} &= \sqrt{\frac{1+\cos x}{2}}, \end{align*}$$ from which the tangent half-angle identity can be written $$\tan^2 \frac{x}{2} = \frac{1-\cos x}{1+\cos x} = \frac{\sin^2 x}{(1+\cos x)^2},$$ and it follows that $$\color{red}{\boxed{\displaystyle \tan \frac{x}{2} = \frac{\sin x}{1+\cos x}, \quad \sec^2 \frac{x}{2} = \frac{2}{1+\cos x}}}.$$ (Indeed, there are numerous methods of proving the boxed identities.) Hence $$\frac{1}{1 + \sin x + \cos x} = \frac{\frac{1}{1+\cos x}}{1 + \frac{\sin x}{1+\cos x}} = \frac{\frac{1}{2} \sec^2 \frac{x}{2}}{1 + \tan \frac{x}{2}}$$ and the substitution $$u = \tan \frac{x}{2}, \quad du = \frac{1}{2} \sec^2 \frac{x}{2} \, dx$$ immediately leads to $$\int \frac{dx}{1+\sin x + \cos x} = \int \frac{du}{1+u} = \log |1+u| + C = \log \left| 1 + \tan \frac{x}{2} \right| + C.$$

$\endgroup$
3
$\begingroup$

If you want to avoid the Weierstrass substitution ($t = \tan(\frac{x}{2})$), you can multiply the top and bottom by $1+ \sin(x) - \cos(x)$. $$\int \frac{dx}{1+\sin(x) + \cos(x)} = \int \frac{(1 + \sin(x) - \cos(x))dx}{1 + 2\sin(x) + \sin^2(x) - \cos^2(x)} $$ $$= \int \frac{1 + \sin(x)dx}{2\sin(x) + 2\sin^2(x)} - \int \frac{\cos(x)dx}{2\sin(x) + 2\sin^2(x)} $$ $$= \int {\frac{\csc(x)dx}{2}}- \frac{1}{2}\int \Big(\frac{\cos(x)}{\sin(x)} - \frac{\cos(x)}{(1 + \sin(x))}\Big)dx = \cdots$$ The last two integrals can be solved using the methods you already know.

$\endgroup$
4
  • $\begingroup$ by u-substitution? last one? $\endgroup$
    – RE60K
    Commented Apr 12, 2015 at 5:26
  • $\begingroup$ @ADG. The integral of $\csc(x)$ is a common trig integral and the OP has probably seen it before and the integral of $\Big(\frac{\cos(x)}{\sin(x)} - \frac{\cos(x)}{(1 + \sin(x))}\Big)$ can be solved with a u-substitution. $\endgroup$
    – user222031
    Commented Apr 12, 2015 at 17:25
  • $\begingroup$ why don't we use u at the beginning, what do we acheive with this manipulation? was my question actually. $\endgroup$
    – RE60K
    Commented Apr 13, 2015 at 10:38
  • $\begingroup$ @ADG. Based on the OP's comment they probably have not seen that substitution before, so it might have seemed unintuitive. I guess it's basically the same thing except the $t = \tan(\frac{x}{2})$ substitution is more versatile. $\endgroup$
    – user222031
    Commented Apr 13, 2015 at 15:03
0
$\begingroup$

Notice $\sin{x}+\cos{x}=\sqrt{2}\sin(x+\frac{\pi}{4})$

Setting $x+\frac{\pi}{4}=v$ it remains to evaluate

$\int \frac{1}{1+\sqrt{2}\sin{v}}dv$

Now we use Weierstrauss and it remains to compute

$\int \frac{2}{t^2+2\sqrt{2}t+1}dt=\int \frac{2}{(t+\sqrt{2})^2-1}dt$

And the rest is a basic partial fraction and we're done

$\endgroup$
0
$\begingroup$

$$ \begin{aligned} \int \frac{d x}{1+\sin x+\cos x} = & \int \frac{d x}{2 \cos ^2 \frac{x}{2}+2 \sin \frac{x}{2} \cos \frac{x}{2}}\\ &=\frac{1}{2} \int \frac{\sec ^2 \frac{x}{2}}{1+\tan \frac{x}{2}} d x\\&=\int \frac{d\left(\tan \frac{x}{2}\right)}{1+\tan \frac{x}{2}} \\&=\ln \left|1+\tan \frac{x}{2}\right|+C \end{aligned} $$

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .