Linear differential equation solver (lde.m)

version 1.6.1 (192 KB) by Kenneth Johnson
solves a linear, first-order, vector differential equation

359 Downloads

Updated Tue, 15 Jun 2021 06:54:56 +0000

View License

lde.m solves linear, vector differential equations, including nonhomogeneous equations with functional coefficients. For a constant square matrix A, lde(A) is functionally equivalent to expm(A) (exponential matrix), although lde can be faster (for large matrices) and can exhibit better numerical accuracy (e.g. by a factor of 10^-15 in one test case). Relative to MATLAB's ordinary differential solvers (e.g. ode45), an advantage of lde is that it can simultaneously obtain all independent solutions of a homogeneous differential equation, or can simultaneously process multiple forcing functions for a nonhomogeneous equation. A live script demo is included showing several practical applications: (1) exponential matrix, (2) resonantly forced harmonic oscillator, (3) harmonic oscillator with variable mass ("leaky bucket on a spring"), (4) Airy functions, and (5) Scorer functions.

Cite As

Kenneth Johnson (2022). Linear differential equation solver (lde.m) (https://www.mathworks.com/matlabcentral/fileexchange/60475-linear-differential-equation-solver-lde-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2016b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Acknowledgements

Inspired: pageexpm

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!