TITLE: Humorous integration example?
QUESTION [11 upvotes]: 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?

REPLY [2 votes]: 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$.