Avoid having to integrate by parts twice
Suppose f(x) and g(x) are functions that are each proportional to their second derivative. These include exponential, circular, and hyperbolic functions. Then the integral of f(x) g(x) can be computed in closed form with a moderate amount of work.
The first time you see how such integrals are computed, it's an interesting trick. I wrote up an example here. It may seem like you're going in circles-and if you're not careful you will go in circles-but the integral pops out.
After you've done this kind of integration a few times, the novelty wears off. You know how the calculation is going to end, and it's a bit tedious and error-prone to get there.
There's a formula that can compute all these related integrals in one fell swoop [1].
Suppose
and
for constants h and k. All the functions mentioned at the top of the post are of this form. Then
So, for example, let
and
Then h = 400, k = -529, and
Here's another example.
Let
and
Then h = -1, k = 900, and
Implicit in the formula above is the requirement h k. If h does equal k then the integral can be done by more basic techniques.
Related posts[1] Donald K. Pease. A useful integral formula. American Mathematical Monthly. December 1959. p. 908.
The post Avoid having to integrate by parts twice first appeared on John D. Cook.