Skip to content
Free public beta until December 4, 2026: every course is open, no card needed. After that, the first chapter of each course stays free and full access is a one-time $39 ($19 for up to 100 founding members chosen for helpful feedback). Your progress is kept. How the beta works

Recipe

Compute the energy of a vibrating string

Use when: you're given u(x,t), or its mode coefficients, for a string satisfying u_{tt}=c^2u_{xx}, and asked for E(t)

Goal: the total energy E(t)=\frac12\int_0^L(u_t^2+c^2u_x^2)\,dx at the time you need it

Taught in Energy of a vibrating string

  1. 1

    Check whether the solution is already broken into normal modes with known A_n,B_n,\omega_n, or given only as a single formula for u(x,t) that you'd have to differentiate yourself.

    • the mode coefficients are already known — skip differentiating, go straight to the closed-form formula in Step 3.
    • only u(x,t) itself is given — differentiate it directly, continuing to Step 2.

    Why: the closed-form per-mode energy only exists once the mode decomposition is already in hand; without it, the definition itself is the only route.

  2. 2

    Compute u_t(x,t) and u_x(x,t) at whatever time you need the energy, and evaluate them there before squaring anything.

    Example

    For u(x,t)=[4\cos(2t)+3\sin(2t)]\sin(x) on L=\pi: u_t(x,0)=6\sin(x) and u_x(x,0)=4\cos(x).

    Why: the definition needs the velocity and the slope separately, since one feeds the kinetic term and the other the potential term.

  3. 3

    Multiply u_x^2 by c^2, add it to u_t^2, integrate the sum from 0 to L, and multiply the result by \tfrac12.

    Example

    E(0)=\frac12\int_0^\pi\big[(6\sin x)^2+4(4\cos x)^2\big]dx=\frac12\big[36(\tfrac\pi2)+64(\tfrac\pi2)\big]=25\pi.

    ⚡ Shortcut

    If the solution is already a single mode u_n=[A_n\cos\omega_nt+B_n\sin\omega_nt]\sin(n\pi x/L), skip the integral entirely: E_n=\frac{L\omega_n^2}4(A_n^2+B_n^2). For the same mode (A_1=4,B_1=3,\omega_1=2,L=\pi), E_1=\frac{\pi(4)}4(16+9)=25\pi, matching the direct integral exactly.

    Why: kinetic and potential energy densities are, by definition, exactly these two squared and scaled terms added together.

  4. 4

    Compute each mode's own energy from Step 3 separately, then add them. Don't integrate the full multi-mode u as one combined expression.

    Example

    Adding a second mode B_2=5,\omega_2=4 to the string above gives E_2=\frac{\pi(16)}4(25)=100\pi, so the total is E=25\pi+100\pi=125\pi.

    Why: cross terms between different modes integrate to zero by the same orthogonality that makes the Fourier sine series work, so nothing is lost by adding the modes' energies separately.

Common mistakes

  • Using u(x,t) itself in the integral instead of u_t and u_x; that measures a different quantity entirely, not the energy.
  • Forgetting the c^2 factor on the potential term, or attaching it to the kinetic term instead.
  • Integrating a multi-mode u as one expression and expecting the cross terms to matter, instead of summing each mode's energy separately.
  • Dropping the leading \tfrac12 in front of the whole integral.