I know that this has already been answered perfectly well, and I have learned from all those answers,
but I want to put up my version :)
Integrate:
\(\displaystyle\int \dfrac{1}{1+\sin x + \cos x}\text{dx}\)
Please use LaTeX or Image to reply. I am not used to something like int(1/(1 + sin x + cos x ))dx
Express in terms of t where \(t=tan(\frac{x}{2})\)
We are suppose to remember what sin(x) and cos(x) equals in terms of t but I never can so I'll derive it.
\(\begin{array}{rl} sin(x)&=2sin(\frac{x}{2})cos(\frac{x}{2}) \qquad \qquad cos(x)&=cos^2(\frac{x}{2})-sin^2(\frac{x}{2})\\ &=2tan(\frac{x}{2})cos^2(\frac{x}{2}) \qquad \qquad &=cos^2(\frac{x}{2})[1-tan^2(\frac{x}{2})]\\ &=\frac{2tan(\frac{x}{2})}{sec^2(\frac{x}{2})} \qquad \qquad &=\frac{[1-tan^2(\frac{x}{2})]}{sec^2(\frac{x}{2})} \\ &=\frac{2tan(\frac{x}{2})}{1+tan^2(\frac{x}{2})} \qquad \qquad &=\frac{1-tan^2(\frac{x}{2})}{1+tan^2(\frac{x}{2})} \\ &=\frac{2t}{1+t^2} \qquad \qquad &=\frac{1-t^2}{1+t^2} \\~\\ \end{array}\)
so
\(\begin{align} 1+sin(x)+cos(x)&=\frac{1+t^2+2t+1-t^2}{1+t^2}\\ &=\frac{1+t^2+2t+1-t^2}{1+t^2}\\ &=\frac{2(t+1)}{1+t^2}\\~\\ \frac{1}{1+sin(x)+cos(x)}&=\frac{1+t^2}{2(t+1)}\\ \end{align}\)
\(\begin{align} t&=tan(\frac{x}{2})\\ \frac{dt}{dx}&=\frac{1}{2}sec^2(\frac{x}{2})\\ &=\frac{1}{2}\left[1-tan^2(\frac{x}{2})\right]\\ &=\frac{1-t^2}{2}\\ \frac{dx}{dt}&=\frac{2}{1-t^2}\\ dx&=\frac{2}{1-t^2}\;dt \end{align}\)
\(\begin{align} \displaystyle\int \frac{1}{1+sin(x)+cos(x)}\;dx &=\displaystyle\int \frac{1+t^2}{2(t+1)} \cdot \frac{2}{1+t^2}\;dt\\ &=\displaystyle\int \frac{1}{t+1}\;dt\\~\\ &= ln(1+t)\\ &=ln[1+tan( \frac{x}{2})]+c \end{align}\)
Restrictions on the domain.
\(\frac{x}{2} \ne n\pi \qquad n\in Z\\ so\\ x\ne 2\pi n\\ also\\ 1+tan(\frac{x}{2})>0\\ \frac{-\pi}{2}+2\pi n<x<\pi+2\pi n \qquad n\in Z\)
also
\(\quad ln[1+tan( \frac{x}{2})]+c\\ = ln[\frac{cos( \frac{x}{2})+sin( \frac{x}{2})}{cos( \frac{x}{2})}]+c\\ =ln[cos( \frac{x}{2})+sin( \frac{x}{2})]-ln[cos( \frac{x}{2})]+c\)
Here is the graph of the solution is you want to play with it.
https://www.desmos.com/calculator/6sbycp3ee2
and here it is just to look at :) (this is for c=1)
I have included two of the asymptotes. \(x=\pi/2\qquad and \qquad x=\pi\)
I don't know what the exact problem is but I can give you a tips:
Use Pythagoras theorem and special angles table!!
Pythagoras theorem: The square of the longest side in a right angled triangle is equal to the sum of squares of the other 2 sides.
OR
\(a^2 + b^2 = c^2\)
Special angles table:
f(x)\x | 30 degrees/ 1/6 pi radians | 45 degrees/ 1/4 pi radians | 60 degrees/ 1/3 pi radians |
---|---|---|---|
sin x | \(\dfrac{1}{2}\) | \(\dfrac{1}{\sqrt2}\) | \(\dfrac{\sqrt3}{2}\) |
cos x | \(\dfrac{\sqrt3}{2}\) | \(\dfrac{1}{\sqrt2}\) | \(\dfrac{1}{2}\) |
tan x | \(\dfrac{1}{\sqrt3}\) | \(1\) | \(\sqrt 3\) |