DIFFERENTIAL EQUATIONS · ONE INDEPENDENT VARIABLE

Ordinary Differential Equations

An ODE turns a law of change into a function. The key skill is not memorizing one formula, but recognizing the structure of the equation and matching it to a valid method.

y′ = −ky

1. ODEs and initial-value problems

An ordinary differential equation contains derivatives with respect to a single independent variable. A general first-order ODE may be written

\[F(x,y,y')=0.\]

If an initial condition \(y(x_0)=y_0\) is supplied, we have an initial-value problem. The differential equation gives a family of possible solution curves; the initial condition selects one curve.

Verification matters: after finding a candidate solution, substitute it back into the original equation and check the initial or boundary data.

2. Classify before you solve

OrderThe order is the highest derivative present. \(y''+y=0\) is second order.
Linear vs nonlinear\(y'+p(x)y=q(x)\) is linear. \(y'=y^2-x\) is nonlinear.
Autonomous\(y'=f(y)\) has no explicit \(x\)-dependence. Its equilibria satisfy \(f(y)=0\).
Homogeneous terminologyFor linear ODEs, homogeneous means the forcing term is zero, e.g. \(y'+p(x)y=0\).

3. Separable first-order equations

If the equation can be written as \(y'=g(x)h(y)\), then—where division by \(h(y)\) is legitimate—we may separate variables:

\[\frac{1}{h(y)}\,dy=g(x)\,dx.\]

Integrating both sides gives an implicit or explicit family of solutions.

Worked example: exponential growth

Solve \(y'=ky\), \(y(0)=y_0\). For nonzero \(y\),

\[\frac{dy}{y}=k\,dx\quad\Rightarrow\quad \ln|y|=kx+C\quad\Rightarrow\quad y=Ce^{kx}.\]

The initial condition gives \(C=y_0\), so

\[\boxed{y(x)=y_0e^{kx}}.\]
Do not lose equilibrium solutions. Dividing by \(h(y)\) may discard solutions where \(h(y)=0\). Check them separately.

4. Linear first-order equations

A first-order linear equation has the standard form

\[y'+p(x)y=q(x).\]

The integrating factor

\[\mu(x)=e^{\int p(x)\,dx}\]

turns the left side into a product derivative:

\[(\mu y)'=\mu q.\]

Worked example

Solve \(y'+2y=4\). Here \(\mu=e^{2x}\), so

\[(e^{2x}y)'=4e^{2x}.\]

Integrating gives \(e^{2x}y=2e^{2x}+C\), hence

\[\boxed{y=2+Ce^{-2x}}.\]

The constant solution \(y=2\) is the equilibrium toward which all solutions converge as \(x\to\infty\).

5. Autonomous equations and stability

For \(y'=f(y)\), an equilibrium \(y_*\) satisfies \(f(y_*)=0\). The sign of \(f(y)\) tells us whether nearby solutions move upward or downward.

Stable equilibriumNearby arrows point toward the equilibrium.
Unstable equilibriumNearby arrows point away from the equilibrium.

For the logistic equation \(y'=ry(1-y/K)\), the equilibria are \(y=0\) and \(y=K\). For \(r>0\), \(0\) is unstable and \(K\) is stable.

6. Second-order linear equations

A constant-coefficient homogeneous equation has the form

\[ay''+by'+cy=0.\]

Trying \(y=e^{rx}\) produces the characteristic equation

\[ar^2+br+c=0.\]
RootsGeneral solution
Distinct real \(r_1,r_2\)\(y=C_1e^{r_1x}+C_2e^{r_2x}\)
Repeated real \(r\)\(y=(C_1+C_2x)e^{rx}\)
Complex \(\alpha\pm i\beta\)\(y=e^{\alpha x}(C_1\cos\beta x+C_2\sin\beta x)\)

Example: harmonic oscillator

For \(y''+4y=0\), the roots are \(r=\pm2i\), hence

\[y=C_1\cos(2x)+C_2\sin(2x).\]

7. Interactive slope-field explorer

Explore three first-order ODEs. The short line segments show the local slope \(y'=f(x,y)\), while the highlighted curve is a numerical solution through \((0,y_0)\).

8. Method selection checklist

Can it be separated?

Try to isolate all \(y\)-dependence with \(dy\) and all \(x\)-dependence with \(dx\).

Is it first-order linear?

Put it into \(y'+p(x)y=q(x)\) and use an integrating factor.

Is it autonomous?

Find equilibria and use a phase-line analysis even when an explicit formula is difficult.

Is it constant-coefficient second order?

Use the characteristic polynomial and classify its roots.

9. Practice

  1. Solve \(y'=3xy\) with \(y(0)=2\).
  2. Solve \(y'-y=e^{2x}\).
  3. Find the equilibria of \(y'=y(2-y)\) and classify their stability.
  4. Solve \(y''-5y'+6y=0\).
Solutions

1) \(y=2e^{3x^2/2}\). 2) \(y=e^{2x}+Ce^x\). 3) Equilibria: \(0\) unstable and \(2\) stable. 4) Characteristic roots \(2,3\), so \(y=C_1e^{2x}+C_2e^{3x}\).

10. Continue the learning path

Once scalar ODEs are familiar, the natural next step is to study coupled systems, where linear algebra and eigenvalues control the geometry and stability of solutions.

Continue to Systems of ODEs → · Differential Equations hub