Maple Professionel
Maple Académique
Maple Edition Étudiant
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professionel
MapleSim Académique
Maple T.A. - Suite d'examens de classement
Maple T.A. MAA Placement Test Suite
Möbius - Didacticiels de mathématiques en ligne
Machine Design / Industrial Automation
Aéronautique
Ingénierie des véhicules
Robotics
Energie
System Simulation and Analysis
Model development for HIL
Modélisation du procédé pour la conception de systèmes de contrôle
Robotics/Motion Control/Mechatronics
Other Application Areas
Enseignement des mathématiques
Enseignement de l’ingénierie
Enseignement secondaire et supérieur (CPGE, BTS)
Tests et évaluations
Etudiants
Modélisation financière
Recherche opérationnelle
Calcul haute performance
Physique
Webinaires en direct
Webinaires enregistrés
Agenda des évènements
Forum MaplePrimes
Blog Maplesoft
Membres Maplesoft
Maple Ambassador Program
MapleCloud
Livres blancs techniques
Bulletin électronique
Livres Maple
Math Matters
Portail des applications
Galerie de modèles MapleSim
Cas d'Etudes Utilisateur
Exploring Engineering Fundamentals
Concepts d’enseignement avec Maple
Centre d’accueil utilisateur Maplesoft
Centre de ressources pour enseignants
Centre d’assistance aux étudiants
Numerical Solution of Stiff IVPs in Maple
Description
If it takes too long to solve an initial value problem (IVP) with the default numerical solver rkf45 or ck45 or with the default 'adamsfunc' option in lsode, then the IVP might be "stiff". A stiff IVP can be solved efficiently with either the default solver using the 'stiff=true' option (rosenbrock) or any of the `back-' options in lsode.
rosenbrock is intended for modest accuracy, so by default it uses a relative tolerance of . You should use lsode if you need high accuracy. By default it uses a relative tolerance of . Numerical methods for stiff IVPs must form partial derivatives. rosenbrock does this analytically, but if this is not possible, you can use lsode because it approximates them with finite differences.
Stiffness is complicated because it involves both the IVP and the method used to solve it. A stiff IVP has a solution that is very stable (some solutions that start near it converge to it very quickly) and is slowly varying (other solutions change on much faster time scales). Special methods allow stiff problems to be solved efficiently, but they can be very inefficient for problems that are not stiff.
Unless you have reason to believe your IVP is stiff, you should try a method for nonstiff problems first, such as the default method of dsolve[numeric] or lsode with its default option. If that proves unsatisfactory, try the option 'stiff=true' in the call to dsolve[numeric], which invokes a Rosenbrock method. You might also try the one of the 'back-' options of lsode, which invoke backward differentiation methods (BDFs, also known as Gear's method).
Examples
A simple example of a stiff linear IVP:
Issue the following command to see a plot of the solution.
Trying to solve this IVP with the stiff=false option is too expensive. From the general solution of this equation, , we see that the solution of the IVP is very stable because all solutions come together exponentially fast. And, after an initial transient, the solution of the IVP approaches the slowly varying solution .
We can solve this same example with the backfull option for lsode, which by default asks for more accuracy than rosenbrock.
The van der Pol equation in relaxation oscillation is a famous example of a stiff nonlinear problem.
Issue the following command to see a plot of the solution that shows regions of sharp change.
If you experiment with other initial conditions, you will see that all non-trivial solutions converge very rapidly to this limit cycle. The IVP is stiff where the solution is slowly varying.
A stiff nonlinear system from reactor kinetics:
See Also
dsolve/Error_Control, dsolve[lsode], dsolve[numeric,IVP], dsolve[numeric], dsolve[rosenbrock]
References
Gear, C. W. Numerical Initial Value Problems in Ordinary Differential Equations. Prentice Hall, 1971.
Hairer, E., and Wanner, G. Solving Ordinary Differential Equations II, Stiff and Differential-Algebraic Problems. Springer, 1996.
Shampine, L. F., and Corless, R. M. "Initial Value Problems for ODEs in Problem Solving Environments." Journal of Computational and Applied Mathematics, Vol. 125 (2000): 31-40.
Download Help Document