# Thread: Can you separate the integral of product functions?

1. ## Can you separate the integral of product functions?

Hi everyone,

This may be a very simple 'No', but it's been going on 15 years since I've had any regular calculus quality time, so I can't remember. if I have the integral of

A(x) * B(x) dx,

is there a way to separate that into 2 independent integrals?

And, second question, is there a simple integral of

dx/(1+A*cos(x)),

(where A is constant) or is that an elliptic integral?

Thanks!

Matt

2. Originally Posted by mdunnbass
Hi everyone,

This may be a very simple 'No', but it's been going on 15 years since I've had any regular calculus quality time, so I can't remember. if I have the integral of

A(x) * B(x) dx,

is there a way to separate that into 2 independent integrals?
No. In general $\displaystyle \int f\cdot g~dx\ne \int f~dx\cdot\int g~dx$

For quick counterexample to the opposite of above is $\displaystyle f=x,g=e^x$.

And, second question, is there a simple integral of

dx/(1+A*cos(x)),

(where A is constant) or is that an elliptic integral?

Thanks!

Matt
Try the substitution $\displaystyle x=2\arctan(z)$

If you have any problems stop back!

3. Hi everyone,

This may be a very simple 'No', but it's been going on 15 years since I've had any regular calculus quality time, so I can't remember. if I have the integral of

A(x) * B(x) dx,
Parts is often a choice for something like this.

And, second question, is there a simple integral of

dx/(1+A*cos(x)),

(where A is constant) or is that an elliptic integral?
This has a general form.

$\displaystyle \displaystyle\frac{ 2tanh^{-1}\left(\displaystyle\frac{(A-1)tan(\frac{x}{2})}{\sqrt{(a-1)(A+1)}}\right)}{\sqrt{(A+1)(A-1)}}$

4. Originally Posted by Mathstud28
No. In general $\displaystyle \int f\cdot g~dx\ne \int f~dx\cdot\int g~dx$

For quick counterexample to the opposite of above is $\displaystyle f=x,g=e^x$.
Thanks. Actually, the post by galactus reminded me to look into Integration by parts, and the Wiki page mentions this:

$\displaystyle \int f\cdot g~dx = f \int g~dx - \int ( f' \int g~dx ) ~dx$

So, I'm going to try the substitution you mentioned below, and see what I can find. I have a feeling that I am in reality trying to invent a very old and well-worn wheel, but, as I'm just dabbling in my spare time, I don't mind.

THank you though for your suggestions!

Originally Posted by Mathstud28
Try the substitution $\displaystyle x=2\arctan(z)$

If you have any problems stop back!
Do you mean, given the integral I mentioned in my OP, change it to integrate WRT z instead of x, such that $\displaystyle z = tan(x/2)$? I'll see what I can figure out.

Thanks!
Matt

5. Originally Posted by galactus
Parts is often a choice for something like this.

This has a general form.

$\displaystyle \displaystyle\frac{ 2tanh^{-1}\left(\displaystyle\frac{(A-1)tan(\frac{x}{2})}{\sqrt{(a-1)(A+1)}}\right)}{\sqrt{(A+1)(A-1)}}$
So, 3 things. First, I love the joke in your sig. I almost spit milk out my nose, and I haven't even drunk any milk this week. Second, thanks for the help on the integral, as well as the reference to parts. Third - I saw that $\displaystyle tanh$, and immediately shuddered. I never did understand the hyperbolic functions back in high school, and never went back to them later....

6. Originally Posted by galactus
$\displaystyle \displaystyle\frac{ 2tanh^{-1}\left(\displaystyle\frac{(A-1)tan(\frac{x}{2})}{\sqrt{(a-1)(A+1)}}\right)}{\sqrt{(A+1)(A-1)}}$
Now that I am looking at this in more detail, I am not sure how you got from A to B. Is there someplace you could point me that might explain the process you took?

What my original post boiled down to was that I am trying to figure out :

$\displaystyle \int\displaystyle\frac{1 + cos \theta}{1 + A*cos \theta} ~d\theta$

over the interval from $\displaystyle 0 - 2 \pi$, where A is a constant. I don't know how to do it, so I was trying to tease out possible strategies without blatantly asking people to do it for me.

By trying integration by parts, given

$\displaystyle \int f(x)*g(x) = f(x) * \int g(x)~dx - \int [f'(x) \int g(x)~dx]~dx$

I set
$\displaystyle g(x) = 1+cos \theta$
and
$\displaystyle f(x) = 1+a*cos \theta$
such that I could substitute the first half of the parts equation in as follows:
$\displaystyle f(x) * \int g(x)~dx = \displaystyle\frac{\theta + sin \theta}{1 + A*cos \theta}$
and the second part would be:
$\displaystyle \int(f'(x) \int g(x)~dx)~dx = \int [f'(x)*(\theta + sin \theta)]~d\theta$

It's calculating $\displaystyle f'(x)$ that I am tripping myself. my first impulse is to think that since the exponent is -1, just multiply f(x) by negative 1 and decrease the exponent to negative 2, but there is a huge nagging image of my Calc teacher yelling something about throwing in the derivative of cos(theta) as well. But then I think, well, simplifying the second terms results in the integral of the derivative of f(x), and isn't that just f(x)?

Or did I go wrong long before all that?

Matt

7. If you use the sub that mathstud suggested(it's called the Weierstrauss

substitution) it works out OK.

$\displaystyle x=2tan^{-1}(u), \;\ dx=\frac{2}{u^{2}+1}du, \;\ u=tan(\frac{x}{2})$

Then, upon making the subs, it whittles down to:

$\displaystyle 2\int\frac{du}{(a-1)u^{2}-a-1}$

Integrate and resub.

The solution may be different than the one I posted, but equivalent.

8. Here you go my friend:

$\displaystyle \int\frac{dx}{a+b\cos(x)}$

Let $\displaystyle x\longmapsto 2\arctan(z)$ so we get $\displaystyle dx=\frac{2}{1+z^2}dz$. So subbing gives

$\displaystyle \int\frac{dx}{a+b\cos(x)}\stackrel{x=2\arctan{z}}{ \longmapsto}2\int\frac{1}{a+b\cos\left(2\arctan(z) \right)}\cdot\frac{dz}{1+z^2}$

Now remember three things

$\displaystyle \cos(2\phi)=\cos^2(\phi)-\sin^2(\phi)\quad(1)$
$\displaystyle \cos(\arctan(\phi))=\frac{1}{\sqrt{1+\phi^2}}\quad (2)$
$\displaystyle \sin(\arctan(\phi))=\frac{\phi}{\sqrt{1+\phi^2}}\q uad(3)$

So combining these three things we can see that

\displaystyle \begin{aligned}\cos\left(2\arctan(z)\right)&=\cos^ 2\left(\arctan(z)\right)-\sin^2\left(\arctan(z)\right)\\ &=\left(\frac{1}{\sqrt{1+z^2}}\right)^2-\left(\frac{z}{\sqrt{1+z^2}}\right)^2\\ &=\frac{1}{1+z^2}-\frac{z^2}{1+z^2}\end{aligned}

So

\displaystyle \begin{aligned}2\int\frac{dz}{a+b\cos\left(2\arcta n(z)\right)}\cdot\frac{1}{1+z^2}&=2\int\frac{dz}{a +\frac{b}{1+z^2}-\frac{bz^2}{1+z^2}}\cdot\frac{1}{1+z^2}\\ &=2\int\frac{dz}{a(1+z^2)+b-bz^2}\\ &=2\int\frac{dz}{(a-b)z^2+a+b}\end{aligned}

Now consider this. We can rewrite $\displaystyle (a-b)z^2$ as $\displaystyle \left(\sqrt{a-b}z\right)^2$

So now make a trig sub $\displaystyle \sqrt{a-b}z\longmapsto\sqrt{a+b}\tan(\vartheta)$ so $\displaystyle dz=\frac{\sqrt{a+b}}{\sqrt{a-b}}\sec^2(\vartheta)d\vartheta$

Subbing this gives

\displaystyle \begin{aligned}2\int\frac{dz}{\left(\sqrt{a-b}z\right)^2+a+b}&\stackrel{\sqrt{a-b}z=\sqrt{a+b}\tan(\vartheta)}{\longmapsto}2\frac{ \sqrt{a+b}}{\sqrt{a-b}}\int\frac{\sec^2(\vartheta)}{\left(\sqrt{a+b}\t an(\vartheta)\right)^2+a+b}d\vartheta\\ &=\frac{2}{\sqrt{a-b}\sqrt{a+b}}\int\frac{\sec^2(\vartheta)}{\tan^2(\ vartheta)+1}d\vartheta\end{aligned}

Now remember that

\displaystyle \begin{aligned}\tan^2(\phi)+1&=\frac{\sin^2(\phi)} {\cos^2(\phi)}+1\\ &=\frac{\sin^2(\phi)+\cos^2(\phi)}{\cos^2(\phi) }\\ &=\frac{1}{\cos^2(\phi)}\\ &=\sec^2(\phi)\end{aligned}

So

\displaystyle \begin{aligned}\frac{2}{\sqrt{a-b}\sqrt{a+b}}\int\frac{\sec^2(\vartheta)}{\tan^2(\ vartheta)+1}d\vartheta&=\frac{2}{\sqrt{a-b}\sqrt{a+b}}\int~d\vartheta\\ &=\frac{2\vartheta}{\sqrt{a-b}\sqrt{a+b}}\end{aligned}

So we must make our tedious backsubs

$\displaystyle \sqrt{a-b}z=\sqrt{a+b}\tan(\vartheta)\implies \arctan\left(\frac{\sqrt{a-b}z}{\sqrt{a+b}}\right)=\vartheta$

But now remember that $\displaystyle x=2\arctan(z)\implies \tan\left(\frac{x}{2}\right)=z$

So we finally get

$\displaystyle \int\frac{dx}{a+b\cos(x)}=\frac{2\arctan\left(\fra c{\sqrt{a-b}\tan\left(\frac{x}{2}\right)}{\sqrt{a+b}}\right) }{\sqrt{a^2-b^2}}+C$

I hope that helps

9. Go Mathstud

10. Originally Posted by Mathstud28
Here you go my friend:

$\displaystyle \int\frac{dx}{a+b\cos(x)}$

Let $\displaystyle x\longmapsto 2\arctan(z)$ so we get $\displaystyle dx=\frac{2}{1+z^2}dz$. So subbing gives

$\displaystyle \int\frac{dx}{a+b\cos(x)}\stackrel{x=2\arctan{z}}{ \longmapsto}2\int\frac{1}{a+b\cos\left(2\arctan(z) \right)}\cdot\frac{dz}{1+z^2}$

Now remember three things

$\displaystyle \cos(2\phi)=\cos^2(\phi)-\sin^2(\phi)\quad(1)$
$\displaystyle \cos(\arctan(\phi))=\frac{1}{\sqrt{1+\phi^2}}\quad (2)$
$\displaystyle \sin(\arctan(\phi))=\frac{\phi}{\sqrt{1+\phi^2}}\q uad(3)$

So combining these three things we can see that

\displaystyle \begin{aligned}\cos\left(2\arctan(z)\right)&=\cos^ 2\left(\arctan(z)\right)-\sin^2\left(\arctan(z)\right)\\ &=\left(\frac{1}{\sqrt{1+z^2}}\right)^2-\left(\frac{z}{\sqrt{1+z^2}}\right)^2\\ &=\frac{1}{1+z^2}-\frac{z^2}{1+z^2}\end{aligned}

So

\displaystyle \begin{aligned}2\int\frac{dz}{a+b\cos\left(2\arcta n(z)\right)}\cdot\frac{1}{1+z^2}&=2\int\frac{dz}{a +\frac{b}{1+z^2}-\frac{bz^2}{1+z^2}}\cdot\frac{1}{1+z^2}\\ &=2\int\frac{dz}{a(1+z^2)+b-bz^2}\\ &=2\int\frac{dz}{(a-b)z^2+a+b}\end{aligned}

Now consider this. We can rewrite $\displaystyle (a-b)z^2$ as $\displaystyle \left(\sqrt{a-b}z\right)^2$

So now make a trig sub $\displaystyle \sqrt{a-b}z\longmapsto\sqrt{a+b}\tan(\vartheta)$ so $\displaystyle dz=\frac{\sqrt{a+b}}{\sqrt{a-b}}\sec^2(\vartheta)d\vartheta$

Subbing this gives

\displaystyle \begin{aligned}2\int\frac{dz}{\left(\sqrt{a-b}z\right)^2+a+b}&\stackrel{\sqrt{a-b}z=\sqrt{a+b}\tan(\vartheta)}{\longmapsto}2\frac{ \sqrt{a+b}}{\sqrt{a-b}}\int\frac{\sec^2(\vartheta)}{\left(\sqrt{a+b}\t an(\vartheta)\right)^2+a+b}d\vartheta\\ &=\frac{2}{\sqrt{a-b}\sqrt{a+b}}\int\frac{\sec^2(\vartheta)}{\tan^2(\ vartheta)+1}d\vartheta\end{aligned}

Now remember that

\displaystyle \begin{aligned}\tan^2(\phi)+1&=\frac{\sin^2(\phi)} {\cos^2(\phi)}+1\\ &=\frac{\sin^2(\phi)+\cos^2(\phi)}{\cos^2(\phi) }\\ &=\frac{1}{\cos^2(\phi)}\\ &=\sec^2(\phi)\end{aligned}

So

\displaystyle \begin{aligned}\frac{2}{\sqrt{a-b}\sqrt{a+b}}\int\frac{\sec^2(\vartheta)}{\tan^2(\ vartheta)+1}d\vartheta&=\frac{2}{\sqrt{a-b}\sqrt{a+b}}\int~d\vartheta\\ &=\frac{2\vartheta}{\sqrt{a-b}\sqrt{a+b}}\end{aligned}

So we must make our tedious backsubs

$\displaystyle \sqrt{a-b}z=\sqrt{a+b}\tan(\vartheta)\implies \arctan\left(\frac{\sqrt{a-b}z}{\sqrt{a+b}}\right)=\vartheta$

But now remember that $\displaystyle x=2\arctan(z)\implies \tan\left(\frac{x}{2}\right)=z$

So we finally get

$\displaystyle \int\frac{dx}{a+b\cos(x)}=\frac{2\arctan\left(\fra c{\sqrt{a-b}\tan\left(\frac{x}{2}\right)}{\sqrt{a+b}}\right) }{\sqrt{a^2-b^2}}+C$

I hope that helps
Yes, absolutely, it helps tremendously. Now, if I try to work through things on my own, given the equation I am truly interested in:

$\displaystyle \int\frac{1+cos(\theta)}{1+b\cdot cos(\theta)}~d\theta$

if I start off with the same substitution you do, I need to take care of the cos term now in the numerator. So,

$\displaystyle cos(\theta) = cos(2arctan(z))$
$\displaystyle cos(2x) = cos^2 (x) - sin^2 (x)$
$\displaystyle cos(2arctan(z)) = cos^2 (arctan(z)) - sin^2 (arctan(z))$
$\displaystyle cos(2arctan(z)) = \frac{1}{1+ z^2 } - \frac{z^2 }{1+ z^2 }$

putting this into the larger equation, we get
$\displaystyle 2\int\frac{1 + \frac{1 - z^2}{1+ z^2}}{a+b\cos\left(2\arctan(z)\right)}\cdot\frac{d z}{1+z^2}$

simplifying the numerator then gives:
$\displaystyle 4\int\frac{\frac{1}{1+ z^2}}{a+b\cos\left(2\arctan(z)\right)}\cdot\frac{d z}{1+z^2}$

Am I right so far?

Now, should I continue from here with the same substitution of
$\displaystyle z=\frac{\sqrt{a+b}}{\sqrt{a-b}}tan(\theta)$?
Or should I choose a different function than tan?

Thanks,
Matt

11. Eh, you can do it that way...but try seperating the integrals and considering

$\displaystyle \int\frac{\cos(x)}{a+b\cos(x)}dx=\int\frac{\cos(x) }{1+a\sqrt{1-\sin^2(x)}}dx\stackrel{\varphi=\sin(x)}{\longmapst o}\int\frac{d\varphi}{a+b\sqrt{1-\varphi^2}}$

12. Originally Posted by Mathstud28
Eh, you can do it that way...but try seperating the integrals and considering

$\displaystyle \int\frac{\cos(x)}{a+b\cos(x)}dx=\int\frac{\cos(x) }{1+a\sqrt{1-\sin^2(x)}}dx\stackrel{\varphi=\sin(x)}{\longmapst o}\int\frac{d\varphi}{a+b\sqrt{1-\varphi^2}}$
Thanks! Now, thinking back, and looking around, I know that

$\displaystyle \int\frac{d\varphi}{\sqrt{1-\varphi^2}} = \arcsin(\varphi)$

and if I try

$\displaystyle \int\frac{d\varphi}{b\cdot\sqrt{1-\varphi^2}} = \frac{\arcsin(\varphi)}{b}$

But, throwing that 'a' term in there is confusing the dickens out of me. Is there a way to work around that?

Matt

13. Originally Posted by mdunnbass
Thanks! Now, thinking back, and looking around, I know that

$\displaystyle \int\frac{d\varphi}{\sqrt{1-\varphi^2}} = \arcsin(\varphi)$

and if I try

$\displaystyle \int\frac{d\varphi}{b\cdot\sqrt{1-\varphi^2}} = \frac{\arcsin(\varphi)}{b}$

But, throwing that 'a' term in there is confusing the dickens out of me. Is there a way to work around that?

Matt
Wow. I just tried an online integral calculator (no idea how accurate, it's at Online Integral Calculator ), and the result it spat out, given the form above was that it cold not be integrated. But, when I removed the $\displaystyle \varphi = \sin(x)$ substitution, and let a=1, was:

$\displaystyle \int\frac{\cos(x)}{1+b\cdot\cos(x)}dx =$$\displaystyle -\frac{2\cdot\sqrt{1-b}\cdot\sqrt{1+b}\cdot\arctan(\frac{\sin(x)}{\cos( x)+1}) - 2\cdot\arctan(\frac{\sqrt{1+b}\cdot(\sin(x)}{\sqrt {1-b}\cdot(\cos(x)+1)})}{b\cdot\sqrt{1-b}\cdot\sqrt{1+b}} based on whether \displaystyle (b-1)\cdot(b+1) was positive or negative. But, it gave no suggestion as to how that was all computed. I am not one to look a gift horse in the mouth, but since I started trying to figure these integrals out solely for the excuse to play with math, I'd rather not include a 'wave magic wand *here*' step. Any ideas how this came about? Of course, this is all moot if I am integrating from 0 to 2\displaystyle \pi, as all the arctan terms become 0. Matt 14. Originally Posted by mdunnbass Wow. I just tried an online integral calculator (no idea how accurate, it's at Online Integral Calculator ), and the result it spat out, given the form above was that it cold not be integrated. But, when I removed the \displaystyle \varphi = \sin(x) substitution, and let a=1, was: \displaystyle \int\frac{\cos(x)}{1+b\cdot\cos(x)}dx =$$\displaystyle -\frac{2\cdot\sqrt{1-b}\cdot\sqrt{1+b}\cdot\arctan(\frac{\sin(x)}{\cos( x)+1}) - 2\cdot\arctan(\frac{\sqrt{1+b}\cdot(\sin(x)}{\sqrt {1-b}\cdot(\cos(x)+1)})}{b\cdot\sqrt{1-b}\cdot\sqrt{1+b}}$

based on whether $\displaystyle (b-1)\cdot(b+1)$ was positive or negative. But, it gave no suggestion as to how that was all computed. I am not one to look a gift horse in the mouth, but since I started trying to figure these integrals out solely for the excuse to play with math, I'd rather not include a 'wave magic wand *here*' step.

Any ideas how this came about? Of course, this is all moot if I am integrating from 0 to 2$\displaystyle \pi$, as all the arctan terms become 0.

Matt
Yes, this is most likely the correct answer. It is not exactly the same result as mine, but I am sure with an elementary manipulation this reduces to my antiderivative.

To handle the integral that I left you with try multiplying the by denominator's conjugate, i.e. $\displaystyle \frac{a-b\sqrt{1-\varphi^2}}{a-b\sqrt{1-\varphi^2}}$. Alternatively, before ever subbing $\displaystyle \varphi=\sin(x)$ you can make the sub $\displaystyle x=2\arctan(\vartheta)$ similar to the first integral.

Note that we can "simplify" this slightly

\displaystyle \begin{aligned}\int\frac{\cos(x)}{a+b\cos(x)}~dx&= \frac{1}{b}\int\frac{a+b\cos(x)-a}{a+b\cos(x)}~dx\\ &=\frac{1}{b}\int\left\{1-\frac{a}{a+b\cos(x)}\right\}~dx\end{aligned}

From there you can just use the original integral. A little easier than my first suggestion ...but only because we previously calculated that integral.

,

,

,

,

,

,

,

,

,

,

,

,

,

,

# separate integrals multiplication

Click on a term to search for related topics.