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 inner product of two functions on an interval

Use when: you're given two piecewise-continuous functions and an interval and asked for \langle f,g\rangle

Goal: a single real number equal to \int_a^b f(x)g(x)\,dx, with no x left in it

Taught in The inner product of two functions on an interval

  1. 1

    State the interval [a,b] you're integrating over, then form the pointwise product f(x)g(x) as a single function of x. Don't integrate yet.

    Example

    For f(x)=x^2 and g(x)=x on [0,2]: the interval is [0,2] and the product is f(x)g(x)=x^2\cdot x=x^3.

    Why: \langle f,g\rangle is defined as the integral of exactly this product, so building it correctly is what every later step depends on.

  2. 2

    Check whether f(x)g(x) is odd or even on this interval; an odd integrand on a symmetric interval integrates to 0 with no antiderivative needed at all.

    Example

    \sin(x)\cos(x)=\tfrac12\sin(2x) is odd on [-\pi,\pi], so \langle\sin x,\cos x\rangle_{[-\pi,\pi]}=0 instantly, with no antiderivative computed.

    • the integrand is odd on a symmetric interval — the inner product is 0; skip straight to Step 4.
    • the integrand is even, or the interval isn't symmetric, or there's no symmetry to exploit — continue to Step 3.

    ⚡ Shortcut

    When the integrand is even instead of odd, you still save work: \int_{-b}^{b}f(x)g(x)\,dx=2\int_0^b f(x)g(x)\,dx, so only the right half needs an antiderivative.

    Why: checking symmetry first turns some inner products into a one-line answer, and halves the arithmetic on the rest.

  3. 3

    Find an antiderivative of f(x)g(x) and evaluate it at the interval's two endpoints (or the reduced half-interval, if Step 2's shortcut applied).

    Example

    \displaystyle\int_0^2 x^3\,dx=\left[\frac{x^4}{4}\right]_0^2=\frac{16}{4}-0=4.

    Why: this is the one step the definition actually requires; everything before it is only setup.

  4. 4

    Look at what you wrote down as the final answer. If it still contains an x, the integral was never carried out, only the integrand.

    Example

    \langle f,g\rangle = 4 has no x left in it, so the computation is finished. Writing "x^3" and stopping there would still be the integrand, not the inner product.

    Why: an inner product is defined to be a number, so a leftover x is the clearest sign a required step was skipped.

Common mistakes

  • Integrating f and g separately and multiplying the results, instead of multiplying pointwise first.
  • Stopping at the integrand (e.g. writing "x\sin x") and reporting it as the inner product.
  • Assuming orthogonality proved on one interval (a full period) carries over automatically to a sub-interval of it.
  • Evaluating the antiderivative at only the upper endpoint and forgetting to subtract its value at the lower one.