Ordinary linear differential equations can be solved as trajectories given some initial conditions. But what if your initial conditions are given as distributions of probability? It turns out that the problem is relatively simple to solve.
Transformation of Random Variables
If we have a random system described as
we can write this as
which is an algebraic transformation of a set of random variables into another representing a one-to-one mapping. Its inverse transform is written as
and the joint density function f(x,t) of X(t) is given by
where is the Jacobian
Solving Linear Systems
For a system of differential equations written as
a transfer matrix can be defined
which can be used to write the solution as
The inverse formulation of this solution is
Projectile Trajectory Example
Based on the formulations above we can now move on to a concrete example where a projectile is sent away in a vacuum. The differential equations to describe the motion are
where and are cartesian coordinates of the projectile in a two dimensional space while is the horizontal velocity and is the vertical velocity. We only have gravity as external force () and no wind resistance which means that the horizontal velocity will not change.
The matrix representation of this system becomes
The transfer matrix is (matrix exponential, not element-wise exponential)
Calculating the solution of the differential equation gives
where and . The parameters and are initial velocities of the projectile.
The solution becomes
and the time when the projectile hits the ground is given by
A visualization of the trajectory given and with gravity shows an example of the motion of the projectile:
Now, if assume that the initial state can be described by a joint Gaussian distribution we can use the formula shown earlier to say that
where , and
which means that we have high confidence in the firing position but less in the initial velocity.
We are only interested in where the projectile lands and we can marginalize the velocities to get:
which when plotted gives
Since we have used the landing time for the deterministic trajectory, we get a spread across the y-axis as well (the ground is located at ). We could marginalize the y-direction as well to end up with:
This shows the horizontal distribution of the projectile at the time when the deterministic trajectory of the projectile is expected to hit the ground.
Given a set of ordinary differential equations, it is possible to derive the uncertainty of the states given a probability distribution in the initial conditions. There are two other important cases to look into as well: stochastic input signals and random parameters.