# Integral, is my result correct?

• Jul 18th 2008, 12:45 PM
arbolis
Integral, is my result correct?
Just need to be sure on this : $\int \frac{dx}{2+\sin x +\cos x}$, making the substitution $x=2 \arctan (t)$ I reached that the integral is worth $\frac{2 \tan \left( \frac{x}{2}\right) }{5}+C$.
• Jul 18th 2008, 01:02 PM
Mathstud28
Quote:

Originally Posted by arbolis
Just need to be sure on this : $\int \frac{dx}{2+\sin x +\cos x}$, making the substitution $x=2 \arctan (t)$ I reached that the integral is worth $\frac{2 \tan \left( \frac{x}{2}\right) }{5}+C$.

It is wrong, and your math intuition should tell you so

If $\int\frac{dx}{1+\cos(x)}=\tan\left(\frac{x}{2}\rig ht)$

Then adding a WHOLE NEW FUNCTION to the denominator should not change the answer by a constant.
• Jul 18th 2008, 01:07 PM
arbolis
You're right. I think I know where is my error...
• Jul 18th 2008, 01:17 PM
Mathstud28
Quote:

Originally Posted by arbolis
You're right. I think I know where is my error...

Glad to hear it! I knew if you actually thought about it you could answer it yourself (Clapping)...you don't give yourself enough credit! But if you do have any problems/questions just ask!
• Jul 18th 2008, 01:27 PM
arbolis
You're right. I think I know where is my error... Hmm no...
Let me show you what I did : Let $x=2\arctan (t)$, $dx=\frac{2}{1+t^2}$.
So the integral becomes $\int \frac{\frac{2}{1+t^2}}{2+\sin(2\arctan(t))+\cos(2\ arctan(t))}dt$.
Now let $\theta = \arctan(t)$.
We know that $\sin(2\theta)=2\cos(\theta)\sin(\theta)$ and that $\cos(2\theta)=2\cos ^2(\theta)-1$. Furthermore, $\cos(\arctan(t))=\frac{1}{\sqrt{1+t^2}}$ and $\sin(\arctan(t))=\frac{t}{\sqrt{1+t^2}}$.
Therefore we can rewrite the integral as $\int \frac{\frac{2}{1+t^2}}{2+2\left(\frac{1}{\sqrt{1+t ^2}} \right) \left( \frac{t}{\sqrt{1+t^2}} \right) +\frac{2}{1+t^2}-1}dt$, and from it I reached the result I gave in my first post. I thought I might have made an error for $\sin(\arctan(t))$, but I don't think so. Can you help me finding where is my error?
• Jul 18th 2008, 01:31 PM
Mathstud28
Quote:

Originally Posted by arbolis
You're right. I think I know where is my error... Hmm no...
Let me show you what I did : Let $x=2\arctan (t)$, $dx=\frac{2}{1+t^2}$.
So the integral becomes $\int \frac{\frac{2}{1+t^2}}{2+\sin(2\arctan(t))+\cos(2\ arctan(t))}dt$.
Now let $\theta = \arctan(t)$.
We know that $\sin(2\theta)=2\cos(\theta)\sin(\theta)$ and that $\cos(2\theta)=2\cos ^2(\theta)-1$. Furthermore, $\cos(\arctan(t))=\frac{1}{\sqrt{1+t^2}}$ and $\sin(\arctan(t))=\frac{t}{\sqrt{1+t^2}}$.
Therefore we can rewrite the integral as $\int \frac{\frac{2}{1+t^2}}{2+2\left(\frac{1}{\sqrt{1+t ^2}} \right) \left( \frac{t}{\sqrt{1+t^2}} \right) +\frac{2}{1+t^2}-1}dt$, and from it I reached the result I gave in my first post. I thought I might have made an error for $\sin(\arctan(t))$, but I don't think so. Can you help me finding where is my error?

I think your error is in simplifying that integral at the end
• Jul 18th 2008, 01:36 PM
arbolis
Quote:

I think your error is in simplifying that integral at the end
I made an error there! Yes...
Finally I got the answer $\frac{2}{5+\tan ^2(\frac{x}{2})}+C$. I hope this time it's correct.
• Jul 18th 2008, 01:39 PM
Mathstud28
Quote:

Originally Posted by arbolis
I made an error there! Yes...
Finally I got the answer $\frac{2}{5+\tan ^2(\frac{x}{2})}+C$. I hope this time it's correct.

Check it one more time.
• Jul 18th 2008, 01:55 PM
arbolis
Now I got that it's equal to $\int \frac{2dt}{t^2+2t+3}$. Now I must calculate this.
• Jul 18th 2008, 02:00 PM
Mathstud28
Quote:

Originally Posted by arbolis
Now I got that it's equal to $\int \frac{2dt}{t^2+2t+3}$. Now I must calculate this.

(Clapping)(Clapping)

First notice that

$t^2+2t+3=(t+1)^2+2$

So we have

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

Now let $t+1=\sqrt{2}\tan(\theta)$
• Jul 18th 2008, 02:24 PM
arbolis
Quote:
I tried by integration by parts and then by substitution but didn't reach anything. Now following your trick, I got that the final result is...................................... $\frac{\tan \left(\frac{x}{2} \right)}{\frac{\tan\left(\frac{x}{2} \right)+1}{\sqrt{2}}}+C$ or $\frac{\sqrt{2}\tan\left(\frac{x}{2} \right)}{\tan\left(\frac{x}{2} \right)+1}+C$. But you know what? I've a strong feeling I made at least an error in all that.
• Jul 18th 2008, 03:04 PM
Mathstud28
Quote:

Originally Posted by arbolis
Before I read I tried by integration by parts and then by substitution but didn't reach anything. Now following your trick, I got that the final result is...................................... $\frac{\tan \left(\frac{x}{2} \right)}{\frac{\tan\left(\frac{x}{2} \right)+1}{\sqrt{2}}}+C$ or $\frac{\sqrt{2}\tan\left(\frac{x}{2} \right)}{\tan\left(\frac{x}{2} \right)+1}+C$. But you know what? I've a strong feeling I made at least an error in all that.

I am going to do the integral for you, so that you can check it when you get stuck ok?

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

Let $t+1=\sqrt{2}\tan(\theta)$

$\Rightarrow{dt=\sqrt{2}\sec^2(\theta)}$

$\therefore\quad2\int\frac{dt}{(t+1)^2+2}\underbrac e{\Rightarrow}_{t+1=\sqrt{2}\tan(\theta)}2\int\fra c{\sqrt{2}\sec^2(\theta)}{2\tan^2(\theta)+2}~d\the ta$

$=\sqrt{2}\int\frac{\sec^2(\theta)}{\sec^2(\theta)~ }d\theta$

$=\sqrt{2}\int~d\theta$

$=\sqrt{2}\theta$

$\underbrace{\Rightarrow}_{\text{backsub}}2\int\fra c{dt}{(t+1)^2+2}=\sqrt{2}\arctan\left(\frac{t+1}{\ sqrt{2}}\right)$

$\underbrace{\Rightarrow}_{\text{backsub again}}\int\frac{dx}{2+\sin(x)+\cos(x)}=\sqrt{2}\a rctan\left(\frac{\tan\left(\frac{x}{2}\right)+1}{\ sqrt{2}}\right)+C$