# Humorous integration example?

I was just reading though an introductory calculus book and it has the note:

NOTE When integrating quotients, do not integrate the numerator and denominator separately. This is no more valid in integration than it is in differentiation.

Now that's fair enough to point out and it gives a nice example too. But out of curiosity...

Are there examples of functions $f ,g: \Bbb R \rightarrow \Bbb R$ whereby:

$\int \frac {f}{g} =\frac {\int f}{\int g}$.

Say for clarity you have a choice of the constants in the antiderivatives, and $f \not\equiv 0$.

I imagine it might possibly be easier if you choose definite integrals, just none spring to mind!

Maybe there's a link to a similar question on here?

• Note that by writing $f=gh$, this is equivalent to finding functions $g$ and $h$ such that $\int gh =\int g\int h$.
– MPW
Commented Nov 6, 2014 at 1:40
• @mpw very clever, I didn't even think of that! Commented Nov 6, 2014 at 1:44

Note that by writing $f=gh$, this is equivalent to finding functions $g$ and $h$ such that $\int gh=\int g\int h$.
– MPW

Differentiating both sides of $\int gh=\int g\int h$ gives $$gh=g\int h +h\int g.$$ Then divide by $h$ to get $$g=g\frac{\int h}{h}+\int g.$$ Differentiate again and rearrange, $$g\left(1+\left[\frac{\int h}{h}\right]'\right)=g'\left(1-\left[\frac{\int h}{h}\right]\right)$$ So for any $h$ the family of $g$ such that the original equation works is described by a differential equation. We can simplify using $$\left[\frac{\int h}{h}\right]'=\frac{h^2-h'\int h}{h^2}.$$ So $$g=g'\left(\frac{h^2-h\int h}{2h^2-h'\int h}\right)$$

• That's also quite cool! I can see how @Sam's answer comes out as well in this method :) Commented Nov 6, 2014 at 2:30
• Isn't $\left[\frac{\int h}{h}\right]'=\frac{h^2-h'\int h}{h^2}$? Commented Nov 6, 2014 at 2:45
• @PaulyB Yes, but it's also three in the morning, so don't expect my correction to be correct either. :-) Commented Nov 6, 2014 at 2:56
• Funny how when you were off by a minus, taking $h=e^{2x}$ worked as well as it does now! 3 in the morning here too, didn't notice the minus myself! Commented Nov 6, 2014 at 3:21
• Your method is nice though, and I probably wouldn't have thought of my solution without yours! Take a look on it, it builds a fair bit on your method. Commented Nov 6, 2014 at 6:38

I'll do something similar to Oscar's answer, but I'll introduce bounds of integration to avoid issues with constants. Starting with $f(x)=g(x)h(x)$, we have $$\int_a^x g(y) h(y)\,dy=\int_a^x g(y)\,dy \int_a^x h(y)\,dy$$ Differentiating both sides with respect to $x$, we get $$g(x)h(x)=g(x)\int_a^xh(y)\,dy+h(x)\int_a^xg(y)\,dy$$ $$\implies \frac{\int_a^x h(y)\,dy}{h(x)}=1-\frac{\int_a^x g(y)\,dy}{g(x)}$$ $$\implies\frac{h(x)}{\int_a^x h(y)\,dy}=\frac{g(x)}{g(x)-{\int_a^x g(y)\,dy}}$$ Noting that $\frac{d}{dx}\ln\left(\int_a^xh(y)\,dy\right)=\frac{h(x)}{\int_a^x h(y)\,dy}$, we integrate from $b$ to $x$ to obtain $$\ln\left(\int_a^xh(y)\,dy\right)-\ln\left(\int_a^bh(y)\,dy\right)=\int_b^x{\frac{g(z)}{g(z)-{\int_a^z g(y)\,dy}}}\,dz$$ $$\implies \frac{1}{\int_a^bh(y)\,dy}\int_a^xh(y)\,dy=\exp\left(\int_b^x{\frac{g(z)}{g(z)-{\int_a^z g(y)\,dy}}}\,dz \right)$$ Differentiating with respect to $x$, multipying both sides by $g(x)$ (note $f(x)=g(x)h(x)$), and setting $C=\int_a^bh(y)\,dy$, we obtain

$$f(x)=\frac{Cg(x)^2}{g(x)-{\int_a^x g(y)\,dy}}\exp\left(\int_b^x{\frac{g(z)}{g(z)-{\int_a^z g(y)\,dy}}}\,dz \right)$$

Notice however, that if $f(x)$ satisfies your initial condition on division, so does any multiple of it. Hence, the constant is arbitrary, and we can conclude the following:

For any function $g(x)$ defined on $(a,d)$, the equation $$\int_a^d\frac{f(x)}{g(x)}\,dx=\frac{\int_a^df(x)}{\int_a^dg(x)}\,dx$$ is satisfied by any multiple of the family of functions $$f(x)=\frac{g(x)^2}{g(x)-{\int_a^x g(y)\,dy}}\exp\left(\int_b^x{\frac{g(z)}{g(z)-{\int_a^z g(y)\,dy}}}\,dz \right) \forall \,b\in \mathbb{R}$$

• There was so many answers I just accepted the top one. I quite your answer though, thanks for taking the time. The definite integral version is pretty cool. I did upvote it all the same, just need the time to go through all the steps! Commented Nov 17, 2014 at 21:49

Take for instance $f(x)=e^{4x}$ and $g(x)=e^{2x}$.

• Very cool! I had a feeling exponentials would be a good point to follow; I couldn't pick which ones Commented Nov 6, 2014 at 1:52

The following is equivalent to what others have written but (I think) keeps the relevant symmetries clearer.

First of all, as MPW says, write it as $\int g\int h = \int gh$. Now differentiate: $g\int h+h\int g=gh$. Divide through by $gh$, yielding $(\int g)/g+(\int h)/h=1$. So let's write $\varphi=g/\int g$ and $\psi=h/\int h$; then our condition is simply $\varphi^{-1}+\psi^{-1}=1$. And then $g=(\exp \int\varphi)'$ and $h=(\exp\int\psi)'$.

So, for instance, we can take $\varphi$ and $\psi$ to be constants; call them $a,b$ with $a^{-1}+b^{-1}=1$. Then integrating yields $ax,bx$; exponentiating yields $\exp(ax),\exp(bx)$; differentiating yields $a\exp(ax),b\exp(bx)$ and these are our $g,h$.

One step more complicated (so you might think): $\varphi=1/x$ and $\psi=1/(1-x)$. Integrate: $\log|x|$, $\log|1-x|$. Exponentiate: $|x|$, $|1-x|$. Differentiate: $\textrm{sign}(x)$, $\textrm{sign}(1-x)$. This is more or less the same thing as the trivial example $g=h=1$.

Another: $\varphi=\sec^2 x$, $\psi=\csc^2 x$. This leads to $g=\exp(\tan x)\sec^2x$ and $h=\exp(-\cot x)\csc^2x$.

It is easy to verify that, in the version suggested by @MPW, for $f=e^{ax}$, $g=e^{bx}$, we have $$a=\frac{b}{b-1}.$$ For $b=2$ we have the answer obtained by Sam.

Edit: There is a sketch, that this is near general solution. We denote integral by $F$, as it is up to constant some function. Then we have $$F(fg)=F(f)F(g).$$ It is known, that the solution (up to constants again) is $F(g)=g^a$, $a\in\bf R$. It means that $g(x)=ag^{a-1}(x)g'(x)$. It is a Bernoulli equation, with solutions of the form $Ce^{bx}$.

• Thanks for the answer, it's good to see a generalisation. Commented Nov 6, 2014 at 2:34
• @Przemyslaw The correct relation is $\frac{b}{a}=\frac{1}{a-b}$.
– EPS
Commented Nov 6, 2014 at 2:40
• @Sam For the division case. Commented Nov 6, 2014 at 3:21