# When the integral of products is the product of integrals.

I'm self-studying and was doing the following integral:

$$I = \int \frac{e^{\frac{1}{x}+\tan^{-1}x}}{x^2+x^4} dx$$

I solved it fine by letting $u = \frac{1}{x} + \tan^{-1}x$.

My question is about an alternative method I saw in which it seems the product rule was not applied:

$$I = \int \left(\frac { e^{\frac{1}{x}}} {x^2}\right) \left( \frac{e^{\tan^{-1}x}}{x^2+1}\right) dx$$

$$= \int \frac {e^{\frac{1}{x}}}{x^2} dx \cdot \int \frac{e^{\tan^{-1}x}}{x^2+1}dx$$

Completing the work following this step leads to the same solution as I originally found.

It is this step that has confused me. I have checked using Wolfram and the two statements are equivalent but I do not understand why.

Why are we able to write the integral of products as the product of integrals here, and not apply the product rule?

• To summarize and expand on the answers below: This integrand is a very special case, and it has to be justified. If the method you found just split the integration up like this without justifying that in this situation it works, then that method was wrong, even if it did stumble into the right answer eventually. – Paul Sinclair Apr 25 '17 at 12:42
• Thanks for making an excellent point and this is something that will certainly stick with me. – Bangkockney Apr 27 '17 at 16:13

Why are we able to write the integral of products as the product of integrals here?

Assume you have two differentiable functions $f,g$ such that $$f'+g'=f'\cdot g' \tag1$$ by multiplying by $\displaystyle e^{f+g}$ one gets $$(f'+g')\cdot e^{f+g}=\left(f'e^{f} \right)\cdot \left(g'e^{g} \right) \tag2$$ then by integrating both sides $$e^{f+g}=\int\left(f'e^{f} \right)\cdot \left(g'e^{g} \right) \tag3$$ since $\displaystyle e^f=\int\left(f'e^{f} \right)$ and $\displaystyle e^g=\int\left(g'e^{g} \right)$ we have

$$\int\left(f'e^{f} \right)\cdot \int\left(g'e^{g} \right) =\int\left(f'e^{f} \right)\cdot \left(g'e^{g} \right). \tag4$$

By taking, $f'=-\dfrac1{x^2}$ and $g'=\dfrac1{1+x^2}$ we have $$f'+g'=-\frac1{x^2}+\frac1{1+x^2}=-\frac1{x^2(1+x^2)}=f'g'$$ which leads to $(4)$ with the given example.

• In $(3)$, when you integrated both sides, what happened to $(f′+g′)$ on the left? – Brian J Apr 25 '17 at 17:38
• Nevermind, I finally realized the integral symbol was also missing. And now realize it was part of the derivate of $e^{f+g}$ – Brian J Apr 25 '17 at 17:39
• Thank you for spelling this out for me. I now see how this integral was special. – Bangkockney Apr 27 '17 at 16:13

Let $F(x)$, $G(x)$ and $H(x)$ be antiderivatives of $f(x)$, $g(x)$ and $f(x) g(x)$ respectively. If $F(x) G(x) = H(x)$, then differentiating that equation gives us

$$f(x) G(x) + F(x) g(x) = f(x) g(x)$$

or

$$f(x) + F(x) \frac{g(x)}{G(x) - g(x)} = 0$$

(assuming $G(x) \ne g(x)$). Given differentiable $G(x)$, with $g(x) = G'(x)$ and assuming $G(x) \ne g(x)$, you could get a suitable function $F(x)$ by solving the differential equation

$$y'(x) + y(x) \frac{g(x)}{G(x) - g(x)} = 0$$

EDIT: In the case at hand we may take $g(x) = e^{\arctan(x)}/(x^2+1)$ and $G(x) = e^{\arctan(x)}$. The differential equation simplifies to $$x^2 y'(x) + y(x) = 0$$ which has the solutions $$y(x) = C e^{1/x}$$ and (for $C=1$) this is your $F(x)$.

• Thanks for providing an alternative way of seeing the same thing. – Bangkockney Apr 27 '17 at 16:14
• @RobertIsrael Integrating products as you have here, would that apply to my problem in the following question math.stackexchange.com/questions/2889856/… – AngusTheMan Aug 21 '18 at 14:08
• @AngusTheMan Not really. You might be able to find some $\phi$ for which the integral of the product would be the product of the integrals. – Robert Israel Aug 21 '18 at 18:22