Initial Value Problems

April 13, 2026

Problem

Solve dy/dx = 2x with y(0) = 3. Show the unique solution y = x^2 + 3 and explain how the initial condition picks it out of the family y = x^2 + C.

Explanation

What is an initial value problem?

An initial value problem (IVP) is an ODE plus an initial condition that picks one specific solution out of the general family: dydx=f(x,y),y(x0)=y0.\frac{dy}{dx} = f(x, y), \qquad y(x_0) = y_0.

The ODE alone has infinitely many solutions (a "family" parametrized by constants of integration). The initial condition — a single point the solution must pass through — pins down a unique member of that family.

For nn-th order ODEs you need nn initial conditions (typically y(x0),y(x0),,y(n1)(x0)y(x_0), y'(x_0), \ldots, y^{(n-1)}(x_0)).

The given IVP

dydx=2x,y(0)=3\frac{dy}{dx} = 2x, \quad y(0) = 3

Step-by-step solution

Step 1 — Solve the ODE (general solution).

Integrate both sides with respect to xx: y(x)=2xdx=x2+Cy(x) = \int 2x \, dx = x^{2} + C

The +C+C is the one-parameter family — every vertical shift of the parabola y=x2y = x^{2} is a valid solution of the ODE.

Step 2 — Apply the initial condition.

Plug x=0x = 0 and y=3y = 3 into the general solution: 3=02+C    C=33 = 0^{2} + C \implies C = 3

Step 3 — Write the unique solution. y(x)=x2+3\boxed{\, y(x) = x^{2} + 3 \,}

Verification

Check both requirements:

  • ODE: y(x)=2xy'(x) = 2x
  • Initial condition: y(0)=0+3=3y(0) = 0 + 3 = 3

Two conditions, both satisfied. Done.

Why an IVP has a unique solution (Picard–Lindelöf)

The existence and uniqueness theorem (Picard–Lindelöf, sometimes called the Picard theorem) says:

If f(x,y)f(x, y) and f/y\partial f / \partial y are continuous in a rectangle containing (x0,y0)(x_0, y_0), then the IVP y=f(x,y)y' = f(x, y), y(x0)=y0y(x_0) = y_0 has a unique solution on some interval around x0x_0.

For our ODE, f(x,y)=2xf(x, y) = 2x is continuous everywhere (and doesn't depend on yy at all), so the theorem applies globally — the solution y=x2+3y = x^{2} + 3 is the only function satisfying both conditions, anywhere on R\mathbb{R}.

When uniqueness can fail

Classic counter-example: y=y,y(0)=0y' = \sqrt{y}, \quad y(0) = 0

Here f(x,y)=yf(x, y) = \sqrt{y} is continuous but f/y=1/(2y)\partial f / \partial y = 1/(2 \sqrt{y}) blows up at y=0y = 0. The theorem's hypotheses fail. And sure enough there are two solutions: y(x)0,y(x)=x24  (x0).y(x) \equiv 0, \quad y(x) = \frac{x^{2}}{4} \; (x \ge 0).

More generally, one can "peel off" the zero solution at any time t0t^{\star} \ge 0 and then grow as y=(xt)2/4y = (x - t^{\star})^{2}/4 — actually infinitely many solutions. This is an important physics-level cautionary tale: discontinuous "control laws" can produce uniqueness failure.

Geometric picture — the phase portrait

Think of the xyxy-plane with all solution curves drawn at once (see #179 direction fields). The initial condition y(x0)=y0y(x_0) = y_0 is a pin in the plane at (x0,y0)(x_0, y_0). Uniqueness says exactly one solution curve passes through that pin. The IVP amounts to "pin the solution, then follow the slope field forward and backward."

For our problem, the family y=x2+Cy = x^{2} + C is a stack of vertical translates of the parabola; the pin at (0,3)(0, 3) picks the one that hits y=3y = 3 at x=0x = 0.

How this scales to higher order

For a second-order ODE you need two initial conditions, typically y(x0)y(x_0) and y(x0)y'(x_0): y=f(x,y,y),y(x0)=a,y(x0)=b.y'' = f(x, y, y'), \quad y(x_0) = a, \quad y'(x_0) = b.

Geometrically, you pin both the value and the slope at the initial point. For the harmonic oscillator y+y=0y'' + y = 0 (see #184), y(0)=ay(0) = a and y(0)=by'(0) = b fully determines y=acosx+bsinxy = a \cos x + b \sin x.

IVP vs. BVP — different beast

A boundary value problem (BVP, see #198) specifies values at different points — e.g. y(0)=0y(0) = 0, y(π)=0y(\pi) = 0 — rather than an initial value and a derivative at the same point. BVPs have very different behaviour: they can have no solution, a unique solution, or infinitely many solutions (eigenvalue problem).

Common mistakes

  • Forgetting +C+C. Without it you don't have the family, and the initial condition can't single anything out.
  • Applying the initial condition before integrating. The order is: integrate → general solution with CC → plug in IC → solve for CC → write particular solution.
  • Only one condition for a higher-order ODE. A second-order ODE needs two conditions; one leaves a whole one-parameter sub-family.
  • Assuming uniqueness without checking. Most textbook ODEs satisfy Picard–Lindelöf, but problems with \sqrt{\cdot}, 1/y1/y, or non-smooth right-hand sides deserve a closer look.

Try it in the visualization

Drag the initial condition y(x0)y(x_0) vertically and watch the selected solution curve slide through the family. Hold (x0)(x_0) fixed — the unique pinned-through solution tracks your pin smoothly. Switch in a few different ODEs to see the family shape change.

Interactive Visualization

Parameters

3.00
0.00
3.00
10.00
7.00
1.00
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
Initial Value Problems | MathSpin