Boundary Value Problems

April 13, 2026

Problem

Solve y'' + y = 0 with y(0) = 0, y(pi) = 0. Identify the eigenvalue condition that produces non-trivial solutions and explain why infinitely many exist.

Explanation

IVP vs BVP — why they're different

An initial value problem (IVP) pins both the value and (usually) the derivative at the same point: y(a)=αy(a) = \alpha, y(a)=βy'(a) = \beta. Picard–Lindelöf guarantees a unique solution nearby.

A boundary value problem (BVP) pins values at different points: y(a)=αy(a) = \alpha, y(b)=βy(b) = \beta. This is a totally different beast. A BVP may have

  • Zero solutions,
  • A unique solution, or
  • Infinitely many solutions — depending on the ODE and the boundary values. There's no Picard–Lindelöf analogue.

When a BVP admits only the trivial solution for generic data but infinitely many for special data, those special data points are eigenvalues and the corresponding solutions are eigenfunctions. This is the structure that turns up in quantum mechanics, vibrating-string / drum-head problems, and PDEs solved by separation of variables.

The given BVP

y+y=0,y(0)=0,  y(π)=0.y'' + y = 0, \qquad y(0) = 0, \; y(\pi) = 0.

Step-by-step analysis

Step 1 — General solution of the ODE.

Characteristic equation r2+1=0    r=±ir^{2} + 1 = 0 \implies r = \pm i. See #184. y(x)=C1cosx+C2sinx.y(x) = C_1 \cos x + C_2 \sin x.

Step 2 — Apply boundary condition at x=0x = 0.

y(0)=C11+C20=C1=0    C1=0.y(0) = C_1 \cdot 1 + C_2 \cdot 0 = C_1 = 0 \implies C_1 = 0.

So y(x)=C2sinxy(x) = C_2 \sin x.

Step 3 — Apply boundary condition at x=πx = \pi.

y(π)=C2sinπ=C20=0.y(\pi) = C_2 \sin \pi = C_2 \cdot 0 = 0.

This is satisfied for every value of C2C_2. So the BVP has infinitely many solutions: y(x)=C2sinxy(x) = C_2 \sin x for any constant C2C_2.

y(x)=C2sinx,C2R\boxed{\, y(x) = C_2 \sin x, \quad C_2 \in \mathbb{R} \,}

Why this happened — the eigenvalue structure

The BVP is part of a family: y+λy=0,y(0)=0,  y(π)=0,y'' + \lambda \, y = 0, \qquad y(0) = 0, \; y(\pi) = 0, parameterised by λ\lambda. For generic λ\lambda, the unique solution satisfying both boundary conditions is y0y \equiv 0 (the trivial solution). For special values of λ\lambda, non-trivial solutions exist.

Step A. General solution for λ>0\lambda > 0: y=Acos(λx)+Bsin(λx)y = A \cos(\sqrt{\lambda} x) + B \sin(\sqrt{\lambda} x).

Step B. y(0)=0    A=0y(0) = 0 \implies A = 0, so y=Bsin(λx)y = B \sin(\sqrt{\lambda} x).

Step C. y(π)=Bsin(λπ)=0y(\pi) = B \sin(\sqrt{\lambda} \pi) = 0. Either B=0B = 0 (trivial solution) or sin(λπ)=0\sin(\sqrt{\lambda} \pi) = 0. The latter requires λπ=nπ\sqrt{\lambda} \pi = n \pi for integer nn: λn=n    λn=n2,n=1,2,3,\sqrt{\lambda_n} = n \implies \lambda_n = n^{2}, \quad n = 1, 2, 3, \ldots

These are the eigenvalues, and the corresponding eigenfunctions are ϕn(x)=sin(nx),n=1,2,3,\phi_n(x) = \sin(n x), \quad n = 1, 2, 3, \ldots

Our original problem has λ=1=12\lambda = 1 = 1^{2}, so it's the first eigenvalue (n=1n = 1) and the first eigenfunction ϕ1=sinx\phi_1 = \sin x.

Why there are infinitely many eigenvalues

Every integer nn works because sin(nπ)=0\sin(n \pi) = 0 for every integer nn. So we get an infinite sequence of eigenvalue–eigenfunction pairs:

  • λ1=1\lambda_1 = 1, ϕ1=sinx\phi_1 = \sin x (one half-wave on [0,π][0, \pi]).
  • λ2=4\lambda_2 = 4, ϕ2=sin2x\phi_2 = \sin 2x (two half-waves).
  • λ3=9\lambda_3 = 9, ϕ3=sin3x\phi_3 = \sin 3x (three half-waves).
  • \ldots
  • λn=n2\lambda_n = n^{2}, ϕn=sinnx\phi_n = \sin n x (nn half-waves).

These are the standing-wave modes of a guitar string of length π\pi pinned at both ends.

Sturm–Liouville perspective

Any linear BVP of the form ddx ⁣[p(x)y]+q(x)y+λr(x)y=0,\frac{d}{dx}\!\left[p(x) y'\right] + q(x) y + \lambda \, r(x) y = 0, with appropriate boundary conditions, is a Sturm–Liouville problem. Under mild hypotheses, its eigenvalues form a discrete, increasing, unbounded sequence λ1<λ2<\lambda_1 < \lambda_2 < \ldots \to \infty, and its eigenfunctions are orthogonal under the weight r(x)r(x): abϕn(x)ϕm(x)r(x)dx=0for nm.\int_{a}^{b} \phi_n(x) \phi_m(x) r(x) \, dx = 0 \quad \text{for } n \ne m.

This orthogonality is the foundation of Fourier series (the [π,π][-\pi, \pi] case of y+λy=0y'' + \lambda y = 0) and generalises to Legendre polynomials, Bessel functions, spherical harmonics, etc.

When a BVP has no solution

Consider y=0y'' = 0, y(0)=0y(0) = 0, y(1)=1y(1) = 1. General solution y=a+bxy = a + b x, boundary conditions give a=0a = 0 and a+b=1a + b = 1b=1b = 1. Unique solution y(x)=xy(x) = x.

Now change to y=0y'' = 0, y(0)=0y(0) = 0, with y(0)=1y(0) = 1 as the second boundary condition (both at the same point, a contradiction). No solution — the boundary data is inconsistent.

Non-homogeneous BVPs at resonance with an eigenvalue can also fail to have a solution. The Fredholm alternative makes this precise: a BVP at an eigenvalue has solutions iff the forcing is orthogonal to the homogeneous eigenfunctions.

Physical meaning — standing waves on a string

The BVP y+λy=0y'' + \lambda y = 0, y(0)=y(L)=0y(0) = y(L) = 0 describes a taut string fixed at both ends of length LL. Allowed modes are ϕn(x)=sin(nπx/L)\phi_n(x) = \sin(n \pi x / L) with frequencies ωn=nπc/L\omega_n = n \pi c / L (for wave speed cc). The fundamental (n=1n = 1) is the lowest pitch; n=2,3,n = 2, 3, \ldots are overtones. This is literally the math of musical instruments.

Initial conditions vs boundary conditions

IVP: "Given where you are and how fast you're moving right now, where will you be later?" — a forward-in-time propagation.

BVP: "You start here, and you must end there — how should you get there?" — a constraint across space/time; no unique answer unless the ODE plus endpoints cooperate.

Common mistakes

  • Using Picard–Lindelöf for BVPs. The existence–uniqueness theorem is specifically for IVPs. BVPs can have many or no solutions even for smooth ODEs.
  • Missing negative-λ\lambda and λ=0\lambda = 0 cases. In the systematic eigenvalue search for y+λy=0y'' + \lambda y = 0, one has to rule out λ0\lambda \le 0 (by showing only the trivial solution satisfies the BCs for those values) before pinning down the positive eigenvalue ladder.
  • Forgetting orthogonality. Sturm–Liouville eigenfunctions are orthogonal — a miraculous fact that makes Fourier-style expansions possible. Knowing this shapes how you solve associated PDEs.
  • Confusing eigenvalue of a BVP with eigenvalue of a matrix. They're related (one is the spectrum of a differential operator, the other of a matrix) but involve very different machinery.

Try it in the visualization

Sweep λ\lambda continuously and watch how the solution satisfying y(0)=0y(0) = 0 evolves. As λ\lambda hits 1,4,9,1, 4, 9, \ldots, the solution's value at x=πx = \pi is forced to zero — the eigenvalue condition — and you unlock a whole line of non-trivial solutions. Between eigenvalues, only the flat y0y \equiv 0 can satisfy both BCs.

Interactive Visualization

Parameters

1.00
1.00
1.30
3.00
0.04
Your turn

Got your own math or physics problem?

Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.

Sign Up Free to Try It30 free visualizations every day
Boundary Value Problems | MathSpin