Algorithms for ODEs
When you call
odesolve in solve blocks,
PTC Mathcad solves the ODEs with one of the following methods:
• Adams/BDF—Calls the
Adams solver that uses Adams-Bashforth methods. If
odesolve discovers that the system of ODEs is stiff, it then switches to the
BDF solver, which uses backward differentiation formula (BDF) methods.
• Fixed—Calls the
rkfixed solver that uses a fixed-step Runge-Kutta method.
• Adaptive—Calls the
Rkadapt solver that uses a Runge-Kutta method with adaptive step-size.
• Radau—Calls the
Radau solver that uses a Radau algorithm for systems that are stiff or have algebraic constraints. Radau is the only method that solves systems with algebraic constraints.
Additional Information
• AdamsBDF is the default solver for
odesolve.
• Some ODE solvers accept tol as an optional argument. However, odesolve does not accept this argument. You must use the ODE solver directly if you want to specify tol when calling the solver. Otherwise, you can define the built-in variable TOL above the solve block region.
• odesolve returns the solution as a function of the independent variable. To evaluate this function,
odesolve saves solutions at a number of equally spaced points in the integration interval, and then interpolates between those points using the function
lspline. The number of points is specified by the optional argument
intvls+1 or by its default value of 1000. For the adaptive and the stiff methods, more intervals are added in regions of greater variation of the solution.
• The spline from odesolve is limited to the specified range for the independent variable. As a result, the numeric derivative is unable to operate at the ends of the range because it does not revert to a single sided derivative. The numeric derivative remains two sided, it must evaluate the function on both sides of the reference value before returning an answer.