Represents a one dimensional time-dependent differential equation.
Initialize a new one-dimensional differential equation.
Equation for d(n)x/dt(n) as a function of t, x, dx/dt, ..., d(n-1)x/dt(n-1)
d(n)x/dt(n)
t
x
dx/dt
d(n-1)x/dt(n-1)
Initial conditions ordered by x, dx/dt, ..., d(n-1)x/dt(n-1)
// y = e^x can be represented by dx/dt = x, at time t=0, x=1const exp = new DifferentialEquation((t, x) => x, 1); Copy
// y = e^x can be represented by dx/dt = x, at time t=0, x=1const exp = new DifferentialEquation((t, x) => x, 1);
Solve this differential equation from t=0 to t=tf with timestep dt.
t=0
t=tf
dt
The timestep
The final time
An array containing each timestep and all orders of derivatives
const data = exp.solve(1e-3, 4); Copy
const data = exp.solve(1e-3, 4);
Represents a one dimensional time-dependent differential equation.