Canceling the Integral

Lots of integrals involving trigonometric functions will have this property. Consider the integral $$ \int f(x) g'(x) \,\,\mathrm{d}x.\tag{1} $$ Using integration by parts, this integral becomes $$ f(x)g(x) - \int f'(x)g(x)\,\,\mathrm{d}x.\tag{2} $$ Now, suppose that $f$ is a function such that $f'(x) = k_{1}\cdot f(x)$, and similarly $g'(x) = k_{2} \cdot g(x)$. One such example of a function is $f = \exp(k_{1}x)$. Then combining $(1)$ and $(2)$ under these conditions gives $$ \int f(x)g'(x) \,\,\mathrm{d}x = \frac{f(x)g'(x)}{k_{2}} - \frac{k_{1}}{k_{2}} \int f(x)g'(x) \,\,\mathrm{d}x, $$ so that $$ \Big(1 + \frac{k_{1}}{k_{2}}\Big) \int f(x)g'(x) \,\,\mathrm{d}x = \frac{f(x)g'(x)}{k_{2}} \implies \int f(x)g'(x) \,\,\mathrm{d}x = \frac{f(x)g'(x)}{k_{1} + k_{2}} \color{red}{+ c}. $$ This makes sense since only the exponential function is equal to its derivative, so $f$ and $g$ must both be exponential functions and thus $fg'$ is exponential with $f(x)g'(x) = \exp\big((k_{1} + k_{2})x\big)$ up to a scalar multiple.


A more interesting question is when $f(x)$ is a scalar multiple of $f'(x)$, but $g(x)$ is a scalar multiple of $g''(x)$. Examples for $g$ include both $\sin(x)$ and $\cos(x)$ (and also $e^{x}$). So, suppose that $f'(x) = k_{1}\cdot f(x)$ and that $g''(x) = k_{2}^{2}\cdot g(x)$. Consider the integral $$ \int f(x)g''(x) \,\,\mathrm{d}x.\tag{3} $$ This integral becomes $$ f(x)g'(x) - \int f'(x)g'(x) \,\,\mathrm{d}x = f(x)g'(x) - \Big( f'(x)g(x) - \int f''(x)g(x) \,\,\mathrm{d}x \Big).\tag{4} $$ Combining $(3)$ and $(4)$ gives $$ \int f(x)g''(x) \,\,\mathrm{d}x = f(x)g'(x) - f'(x)g(x) + \int f''(x)g(x) \,\,\mathrm{d}x.\tag{5} $$ Notice that this is a very similar form to your question. Now applying the derivative equalities we see that $(5)$ becomes $$ \int f(x)g''(x) \,\,\mathrm{d}x = f(x)g'(x) - f'(x)g(x) + \frac{k_{1}^{2}}{k_{2}^{2}} \int f(x)g''(x) \,\,\mathrm{d}x, $$ so that $$ \left( 1 - \Big(\frac{k_{1}}{k_{2}}\Big)^{2}\right)\int f(x)g''(x) \,\,\mathrm{d}x = f(x)g'(x) - f'(x)g(x), $$ and thus $$ \int f(x)g''(x) \,\,\mathrm{d}x = \frac{f(x)g'(x) - f'(x)g(x)}{1 - \Big(\frac{k_{1}}{k_{2}}\Big)^{2}} \color{red}{+ c}. $$ This method/formula is particularly helpful precisely when $f$ and $g$ are periodic in their derivatives, as one can easily get caught up doing repeated integration by parts without getting anywhere (at least, I know that I have). This method/formula was particularly helpful for me in evaluating integrals like $$ \int e^{-st}\cos(3t) \,\,\mathrm{d}t, $$ which is the Laplace transform of $\cos(3t)$, so that this method is helpful for finding solutions to differential equations.


$2\cosh x=e^x+e^{-x}$ and $2\sinh x=e^x-e^{-x}$, hence $e^x\cosh(x) - e^x\sinh(x)=1$.