In MATLAB, one can obtain solutions to differential equations in symbolic or numerical manner. For simple first order ODEs, one can use the command “dsolve” to solve solvable equations analytically. In particular, it can be used to obtain anti-derivatives. Numerically, one can assign numerical initial conditions, using “ode15″ for some stiff ODEs, where the stiffness is determined by the Jacobian of the ODE system, or other similar commands, depending on the type of equation. The steps usually includes defining functions/equations in M-files, setting numerical domains and step sizes for basic variables and initial conditions, applying suitable solver codes, and graphing the numerical results, and so forth.
For instance, one can build a model for simulating the coagulation of particles in aqua-environment. By the central limit theorem in classic probability theory, the distribution of particles in different sizes can be considered as a log-normal distribution, or a composition of log-normal distributions
(1)
where is the diameter of particle in ocean environment,
and
are parameters of different modes of log-normal distributions. By the theory from particle physics, the interaction of different particles has a coagulation kernel, such as Brownian kernel
(2)
for two particles with diameters and
. Now let us consider a single-mode model based on Koziol-Leighton’s result on aerosol dynamics, as the following ODE for this modeling,
where and similarly for
. Given initial data to
, we can solve out
by solver “ode23s” or “ode15s”, and obtain a simple simulation for particles coagulation.