Stochastic Differential Equations
Stochastic Differential Equations, Numerical Methods, and the Heat Equation
Stochastic differential equations
A stochastic differential equation (SDE) describes how a process changes under both a systematic trend and random fluctuations. A common form is
where:
Xt is the process at time t.
μ(t,Xt) is the drift, describing its systematic change.
σ(t,Xt) is the diffusion coefficient, determining the size of its random fluctuations.
Bt is Brownian motion.
Solving an SDE means finding a stochastic process Xt that satisfies the equation and a specified initial condition, such as X0=x0. As with ordinary and partial differential equations, an explicit closed-form solution is not generally available, even when a solution exists.
Existence and uniqueness
Under suitable regularity assumptions on the drift and diffusion functions, an SDE has a solution, and that solution is unique once its initial value is specified. A common sufficient set of conditions is:
Lipschitz continuity in the state variable: for some constant K,
∣μ(t,x)−μ(t,y)∣+∣σ(t,x)−σ(t,y)∣≤K∣x−y∣.This means that small changes in the state cannot cause disproportionately large changes in either coefficient.
Linear growth: for some constant K,
∣μ(t,x)∣2+∣σ(t,x)∣2≤K2(1+∣x∣2).This prevents the coefficients from growing too rapidly as the state becomes large.
These are sufficient, technical conditions rather than requirements that must be checked in every application. The main practical point is that a well-behaved SDE can have a unique solution even when that solution cannot be written as a convenient formula.
Explicitly solvable SDEs
Some SDEs have explicit solutions. Recognizing their structure can make it possible to solve them directly, although the same approach does not work for most equations.
Geometric Brownian motion
Consider the equation
where μ and σ are constants. Both the drift and the random fluctuation are proportional to the current value of the process.
Its solution is
The correction −2σ2t arises from the second-derivative term in Itô’s formula, the stochastic counterpart of the chain rule. In particular, applying ordinary calculus alone to a function of Brownian motion would miss this term.
One way to find the solution is to look for a function of time and Brownian motion with an exponential dependence on the Brownian-motion variable, then use Itô’s formula and match the resulting drift and diffusion terms to the SDE. In practice, recognizing the exponential form may be more direct than carrying out the full derivation.
Ornstein–Uhlenbeck process
A second solvable example is the Ornstein–Uhlenbeck process:
Here the drift pulls the process toward 0, while the random noise has constant size rather than being proportional to Xt. If Xt is above 0, the drift tends to push it downward; if it is below 0, the drift tends to push it upward. This makes the process a model of mean reversion.
Its solution is
The first term decays exponentially with time, reflecting the drift’s pull toward 0. The second term collects the effects of random shocks over time, with earlier shocks weighted less heavily because of the exponential decay. For a deterministic initial value, the mean is
Thus, the mean approaches 0 as time increases, although random fluctuations continue to affect the process.
Numerical solution of differential equations
When no useful explicit formula is available, numerical methods approximate a solution over a discrete grid of time and, where relevant, space points.
Finite difference method for an ordinary differential equation
For an ordinary differential equation
the time interval can be divided into steps of size h. A first-order Taylor approximation gives the Euler method:
where ui approximates the solution at time ti and ti+1=ti+h.
For example, consider
and approximate the solution at t=1 using two steps of size h=21:
At the first step,
u(21)≈u(0)+21(5u(0)+2)=1.At the second step,
u(1)≈u(21)+21(5u(21)+2)=29.
The approximation is updated repeatedly using the differential equation to calculate the slope at the current point. Under suitable conditions, decreasing h improves the approximation, and the numerical values converge to the true solution as the step size approaches zero.
Extension to partial differential equations
For a function of time and space, such as v(t,x), a numerical method divides the time-space domain into a grid. Values at known boundary points and earlier time points are used to approximate values at neighboring grid points. Repeating this process fills in the grid and produces an approximation at the desired point.
The principle is similar to the ODE method, but the calculation must account for changes in more than one variable. The specific update rule depends on the PDE and its boundary conditions.
Numerical solution of SDEs
An SDE adds a difficulty that ordinary finite differences do not face: random fluctuations mean that a future value is not determined by a single slope. It depends on the Brownian-motion path.
Euler–Maruyama method
Suppose a Brownian-motion path has been fixed. Over a time step of size h, the SDE can be approximated by
where
For a fixed path, each increment ΔBi is known, so the update can be performed step by step. This method is called the Euler–Maruyama method.
For Brownian motion, increments over non-overlapping time intervals are independent, and each increment satisfies
Thus, a simulated path can be generated by drawing a sequence of independent normal random variables with mean 0 and variance h, then applying the update at each step.
Monte Carlo simulation
A single simulated Brownian-motion path produces one approximate trajectory of Xt. Different paths generally produce different outcomes. Monte Carlo simulation captures this variability by generating many paths:
Choose a time step h and generate Brownian-motion increments.
Use the numerical update rule to calculate the process along that path.
Record the value of interest, such as XT at a terminal time T.
Repeat the procedure for many independently generated paths.
The recorded terminal values approximate the probability distribution of XT. The same simulations can also be used to estimate quantities such as expectations or probabilities.
A smaller time step generally gives a more accurate approximation of the continuous-time process, but it requires more computation. The step size must therefore balance accuracy against computational cost.
Tree methods
A tree method approximates the possible outcomes of Brownian motion using a discrete branching process. Brownian motion can be obtained as a limit of suitably scaled random walks, so a random walk provides a basis for approximating it.
In a simple binomial tree, each step has two possible moves, typically upward or downward. After several steps, many different paths are possible, but paths can meet at the same node. The probabilities of reaching terminal nodes follow the binomial distribution. For example, after five independent steps with equal probabilities of moving up or down, the probabilities associated with the different numbers of upward moves are
A tree method evaluates the process at the possible nodes and combines those values with the probabilities of reaching them. This replaces a large collection of continuous Brownian-motion paths with a finite set of discrete possibilities.
The method can use more than two branches at each step. For example, a trinomial tree allows an upward move, no move, or a downward move. With an appropriate scaling of the steps, such trees can also approximate Brownian motion.
Accuracy can be improved by decreasing the time step, increasing the number of possible moves at each step, or both. Tree methods are especially useful when the problem depends on the path taken, not only on the final value. For example, an early-exercise decision may depend on the process’s value at each node and on the information available up to that point.
The heat equation
The heat equation is a partial differential equation that models the spreading of heat through space over time. For a one-dimensional, perfectly insulated rod, a common form is
where u(t,x) represents the heat distribution at position x and time t. The variable t describes time, while x describes location along the rod.
If the initial heat distribution is known as u(0,x)=v(x), the equation determines how that distribution changes over time. The rod is treated as very long, and heat moves only along its spatial axis.
Linearity and superposition
The heat equation is linear. If u1(t,x) and u2(t,x) are solutions, then their sum is also a solution:
More generally, suitable weighted sums or integrals of solutions remain solutions. This property is called superposition.
Superposition is useful because a complicated initial heat distribution can be understood as a combination of point-source distributions. Finding the solution for a point source therefore provides a building block for solving the equation with more general initial data.
The Dirac delta initial condition
A point source at the origin is represented by the Dirac delta function, written δ(x). It is concentrated at x=0 and is zero elsewhere in the distributional sense, with total mass 1. Physically, it represents an idealized amount of heat concentrated at a single point at time 0.
For the heat equation above, the solution starting from this point source is
This is the probability density of a normal distribution with mean 0 and variance t. As time passes, the initially concentrated heat spreads out in a bell-shaped distribution. The same mathematical pattern appears in Brownian motion: the location of a Brownian particle at time t, starting at 0, has this normal distribution.
Solution for a general initial distribution
The point-source solution can be shifted to a source at any location and then combined with other shifted solutions. For initial data u(0,x)=v(x), the resulting solution is the convolution
Here, the initial heat at each location y contributes to the heat at x at time t, weighted by the Gaussian distribution describing how heat spreads from y to x. This formula gives an explicit solution for a broad class of initial conditions.
Connection to the Black–Scholes equation
After an appropriate change of variables, the Black–Scholes equation can be transformed into a heat equation. The heat equation’s explicit solution can then be used to obtain a corresponding solution for the transformed financial problem.
In this interpretation, the terminal payoff plays the role of the initial data for a backward heat equation. Integrating that payoff against a Gaussian kernel produces the value at an earlier time. The connection illustrates how the heat equation’s solution method also applies to certain financial pricing problems.

Ask anything
We've read this whole study set, so questions about it get the best answers.