# How to find the primitive function of $\frac{1}{5+2\sin x-\cos x}$

I am trying to find the primitive function of $\displaystyle\int_{}^{}\frac{dx}{5+2\sin x-\cos x}$. I've got $$\int_{}^{}\frac{dx}{5+2\sin x-\cos x}=\frac{\textrm{arctan}\left(\frac{3\tan\frac{x}{2}+1}{\sqrt{5}}\right)}{\sqrt{5}}$$ However the plot of this function isn't continuous - exactly these points $\pi+2k\pi$ make the problem. It means that this primitive function doesn't exist on whole $\mathbb{R}$, but just on some small interval. So what I have to do in this case? And how the whole primitive function looks like?

Thank you

• – lab bhattacharjee May 22 '13 at 14:17
• @labbhattacharjee that is what he did. His issue is that his antiderivative is discontinuous whenever when $\tan(\frac{x}{2})=\infty$. – N. S. May 22 '13 at 14:26
• @Anakin You forgot about the constants, which can be different constants on those intervals... – N. S. May 22 '13 at 14:38
• This is actually a great problem! Has anyone notices that the denominator never gets zero? (WHY??) So the given function is certainly continuous (and also differentiable) on domain R. But the antiderivative is not continuous. A good counter example to those who believe that if a given function is continuous, then so should be the anti derivative, as assumed in many introductory calculus classes. Now since you were asking about a general anti derivative, I wouldn't worry much about the constants, but when integrating on a given interval, then you need to be very carefull – imranfat May 22 '13 at 15:35
• This post below seems good but I would like to know did he calculate this jump. – Anakin May 22 '13 at 17:34

Remember that on each interval of the type $(\pi+2k\pi, x+(2k+2)\pi)$ your antiderivative is actually.

$$\int_{}^{}\frac{dx}{5+2\sin x-\cos x}=\frac{\textrm{arctan}\left(\frac{3\tan\frac{x}{2}+1}{\sqrt{5}}\right)}{\sqrt{5}} +C$$

Now, at $x=\pi+2k\pi$ your function has a jump of $\frac{\pi}{\sqrt{5}}$, so if you chose your constant as

$$\int_{}^{}\frac{dx}{5+2\sin x-\cos x}=\frac{\textrm{arctan}\left(\frac{3\tan\frac{x}{2}+1}{\sqrt{5}}\right)}{\sqrt{5}} + k \frac{\pi}{\sqrt{5}} \,;\, x \in (\pi+2k\pi, x+(2k+2)\pi)$$

your antiderivative becomes continuous on $\mathbb R$... To make it more accurate, let

$$g: \mathbb R \backslash \{ \pi+ 2k \pi \} \,;\, g(x)= k \frac{\pi}{\sqrt{5}} \,;\, x \in (\pi+2k\pi, x+(2k+2)\pi) \,,$$

Then $g$ is locally constant, and

$$\frac{\textrm{arctan}\left(\frac{3\tan\frac{x}{2}+1}{\sqrt{5}}\right)}{\sqrt{5}} +g(x) +C \,,$$

is an antiderivative of your function on $\mathbb R \backslash \{ \pi+ 2k \pi \}$ which has removable discontinuities at $\{ \pi+ 2k \pi \}$, thus it can be extended to a continuous function on $\mathbb R$.