Integration without integration

A neat shortcut for integrals like ∫e^{ax}sin(bx)dx and ∫e^{ax}cos(bx)dx, avoiding repeated integration by parts.

  • University Physics Year 1
On this page

There is a clean shortcut for integrals involving products of common “physics functions” like e^ax, sin(bx), cos(bx), sinh(bx), cosh(bx).

It’s especially useful when you keep meeting the same exponential × trig patterns (for example, while solving linear ODEs with sinusoidal forcing, or while doing repeated integration-by-parts loops).

Why physics needs this (examples you can click)

The formula

Suppose f and g satisfy second-order equations of the form:

f'' = v f, g'' = u g

where u and v are constants and u ≠ v.

Then:

∫ f g dx = (f g' - f' g)/(u-v) + C.
Template (how to use it quickly)
  1. Pick f and g so your integrand is fg.
  2. Confirm f'' = vf and g'' = ug with constants u,v.
  3. Compute f',g'.
  4. Substitute into (fg' - f'g)/(u-v) + C.
  5. Differentiate your result to verify you got back fg.

Common “constant-u/v” functions:

  • e^ax: f'' = a² f
  • sin(bx), cos(bx): g'' = -b² g
  • sinh(bx), cosh(bx): g'' = b² g

Why it works (one line)

Differentiate the numerator:

(d/dx)(f g' - f' g) = f g'' - f'' g = f(ug) - (vf)g = (u-v)fg.

Divide by (u-v) and integrate.

What if u = v?

The shortcut above breaks because you’d divide by zero. In that case, use a different method (often a direct integral or a short integration-by-parts loop).

Pitfall: u=v happens more than you think

If both functions satisfy the same second-order equation (same u), then u-v = 0 and the shortcut is not valid.

Example: sin(bx) and cos(bx) both satisfy y'' = -b²y, so you can’t use this trick directly on ∫ sin(bx) cos(bx) dx.


Worked example: ∫ e^ax sin(bx) dx

Let:

f = e^ax ⇒ f'' = a² e^ax = a² f (so v = a²),

and

g = sin(bx) ⇒ g'' = -b² sin(bx) = -b² g (so u = -b²).

Compute derivatives:

f' = a e^ax, g' = b cos(bx).

Apply the shortcut:

∫ e^ax sin(bx) dx = (e^ax b cos(bx)-a e^ax sin(bx))/(-b²-a²) + C.

So:

∫ e^ax sin(bx) dx = (e^ax(a sin(bx)-b cos(bx)))/(a² + b²) + C.

Worked example: ∫ e^ax cos(bx) dx

Use the same setup:

  • f = e^ax so v = a², f' = ae^ax
  • g = cos(bx) so u = -b², g' = -b sin(bx)

Then:

∫ e^ax cos(bx) dx = (e^ax(-b sin(bx))-a e^ax cos(bx))/(-b²-a²) + C

so:

∫ e^ax cos(bx) dx = (e^ax(a cos(bx) + b sin(bx)))/(a² + b²) + C.

Worked example (hyperbolic): ∫ e^ax sinh(bx) dx

Let f = e^ax so v = a², and g = sinh(bx) so u = b² with g' = b cosh(bx).

Apply the shortcut:

∫ e^ax sinh(bx) dx = (e^axb cosh(bx)-ae^ax sinh(bx))/(b²-a²) + C = (e^ax(a sinh(bx)-b cosh(bx)))/(a²-b²) + C.

Practice (with hints + answers)

1) Compute ∫ e^{2x} cos(3x) dx

Hint: Use the cosine result with a = 2, b = 3.

Answer:

∫ e^2x cos(3x) dx = (e^2x(2 cos(3x) + 3 sin(3x)))/13 + C.
2) Compute ∫ e^{-x} sin(2x) dx

Hint: Use the sine result with a = -1, b = 2.

Answer:

∫ e^(-x) sin(2x) dx = (e^(-x)(- sin(2x)-2 cos(2x)))/5 + C.
3) Compute ∫ e^{x} sinh(2x) dx

Hint: Use the hyperbolic result with a = 1, b = 2.

Answer:

∫ e^x sinh(2x) dx = (e^x(sinh(2x)-2 cosh(2x)))/(1-4) + C = (e^x(2 cosh(2x)- sinh(2x)))/3 + C.
4) (u=v case) Compute ∫ sin(2x) cos(2x) dx

Hint: Use the identity sin(2x) cos(2x) = 1/2 sin(4x).

Answer:

∫ sin(2x) cos(2x) dx = 1/2∫ sin(4x) dx = -(cos(4x))/8 + C.

Back to Mathematics for Undergraduate Physics