01 / 22

Analytic vs. Numeric
Solutions

Understand when a differential equation can be solved exactly with a formula and when you need numerical approximation: two powerful, complementary approaches.

Differential Equations

What Is a Differential Equation?

A differential equation (DE) is an equation that relates a function to its derivatives. It describes how a quantity changes over time or space.

Solving a DE means finding the function \( y(x) \) (or \( y(t) \)) that satisfies the equation. There are two fundamentally different ways to do this.

Two Ways to Solve

Analytic (Exact)
Find a closed-form formula for \( y(x) \). You can evaluate it at any point instantly. Example: \( y = Ce^{-x} \).
Numeric (Approximate)
Compute \( y \) values point by point using an algorithm. You get a table of numbers, not a formula. Example: Euler's method.

Why This Matters

In engineering, physics, biology, and economics, differential equations model everything from population growth to circuit dynamics. Choosing the right solution method determines whether your answer is exact, approximate, fast, or even possible.

1
Analytic solutions give deep insight: you see how parameters affect the answer symbolically.
2
Numeric solutions give practical answers when algebra fails: turbulence, weather, nonlinear oscillations.
3
Knowing both lets you validate numeric results against known analytic cases.

The Analytic Solution

Common techniques that yield analytic solutions:

1
Separation of variables: rewrite as \( g(y)\,dy = f(x)\,dx \), then integrate both sides.
2
Integrating factor: for linear first-order DEs \( y' + P(x)y = Q(x) \).
3
Characteristic equation: for constant-coefficient linear DEs like \( y'' + 3y' + 2y = 0 \).

The Numeric Solution

The most famous numeric method is Euler's method:

Exact Curve vs. Euler Steps

x y 0 1 2 3 4 0 2 4 6
Analytic: \( y = e^{0.5x} \)
Euler (\(h = 1\))

Analytic vs. Numeric: Key Differences

Analytic Numeric
Output Closed-form formula Table of approximate values
Accuracy Exact Approximate (depends on step size)
Applicability Limited to "nice" DEs Works on almost any DE
Speed of evaluation Instant (plug in \(x\)) Must step through all prior points
Insight Shows parameter dependence Hard to see general trends

When to Use Which

Use Analytic When:
The DE is separable, linear, exact, or has constant coefficients. You need a general formula to understand behavior across all inputs.
Use Numeric When:
The DE is nonlinear, has no known closed-form, or involves complicated functions. You need a specific numerical answer at particular points.

How to Choose and Apply

1
Classify the DE: Is it separable? Linear? Exact? Constant coefficients?
2
Attempt analytic methods first: Separation of variables, integrating factor, characteristic equation.
3
If no analytic solution exists, choose a numeric method: Euler, Improved Euler, or Runge-Kutta.
4
Pick step size \( h \): Smaller \( h \) = more accuracy but more computation.
5
Validate: If you have both, compare. Do the numeric values approach the analytic curve as \( h \to 0 \)?

Example 1: Analytic Solution

1
Separate variables: \( \dfrac{dy}{y} = -2\,dx \)
2
Integrate both sides: \( \ln|y| = -2x + C_1 \)
3
Solve for \( y \): \( y = Ce^{-2x} \)
4
Apply initial condition: \( 3 = Ce^0 \Rightarrow C = 3 \)

Example 2: Euler's Method

Step \( x_n \) \( y_n \) (Euler) \( y \) (Exact)
0 0 3.000 3.000
1 0.5 0.000 1.104
2 1.0 0.000 0.406

Smaller Step: \( h = 0.1 \)

Let us redo the same problem \( y' = -2y \), \( y(0) = 3 \) with a much smaller step: \( h = 0.1 \).

\( x_n \) Euler (\( h = 0.1 \)) Exact Error
0.0 3.000 3.000 0.000
0.1 2.400 2.456 0.056
0.5 0.983 1.104 0.121
1.0 0.322 0.406 0.084

Example 3: When Algebra Fails

What can we do? Apply a numeric method. Here are Euler's steps with \( h = 0.25 \):

\( x_n \) \( y_n \) \( f(x_n, y_n) = x_n^2 + y_n^2 \)
0.000.00000.0000
0.250.00000.0625
0.500.01560.2503
0.750.07820.5686
1.000.22031.0485

Visualizing \( y' = x^2 + y^2 \)

x y 0.0 0.5 1.0 1.5 0.0 0.5 1.0 1.5 No formula exists! High-accuracy numeric
Euler (\(h = 0.25\))

Common Mistakes

✕ Assuming All DEs Have Formulas
Most DEs encountered in practice have no closed-form analytic solution. Always check before investing time in algebraic manipulation.
✕ Using Too Large a Step Size
A big \( h \) can cause Euler's method to diverge or wildly overshoot. Start small, then test convergence by halving \( h \).
✕ Trusting Numeric Without Validation
Numeric solutions can accumulate error. Always validate against a known analytic case or check with a finer step size.

Summary Comparison

Feature Analytic Numeric
Result type Formula: \( y = f(x) \) Data points: \( \{(x_i, y_i)\} \)
Accuracy Exact Approximate
Existence Only for special DEs Always computable
Speed (per point) \( O(1) \): plug in value \( O(n) \): step through all prior
Error control None needed Reduce \( h \), use higher-order methods
Best for Understanding, proofs Complex/real-world models

Question 1 of 5

What does an analytic solution to a differential equation provide?

Question 2 of 5

Given \( y' = -2y \), \( y(0) = 3 \), and Euler's method with \( h = 0.5 \), what is \( y_1 \)?

Question 3 of 5

The DE \( y' = x^2 + y^2 \) has no known closed-form solution. Which statement is true?

Question 4 of 5

What happens to the error in Euler's method as the step size \( h \) is decreased?

Question 5 of 5

Which is a key advantage of an analytic solution over a numeric one?