ParametricNDSolve

ParametricNDSolve[eqns,u,{x,xmin,xmax},pars]
finds a numerical solution to the ordinary differential equations eqns for the function u with the independent variable x in the range to with parameters pars.

ParametricNDSolve[eqns,u,{x,xmin,xmax},{y,ymin,ymax},pars]
solves the partial differential equations eqns over a rectangular region.

ParametricNDSolve[eqns,u,{x,y}Ω, pars]
solves the partial differential equations eqns over the region Ω.

ParametricNDSolve[eqns,u,{t,tmin,tmax},{x,y}Ω, pars]
solves the time-dependent partial differential equations eqns over the region Ω.

ParametricNDSolve[eqns,{u1,u2,},]
solves for the functions .

Details and OptionsDetails and Options

  • ParametricNDSolve gives results in terms of ParametricFunction objects.
  • A specification for the parameters pars of can be used to specify ranges.
  • Possible forms for are:
  • pp has range Reals or Complexes
    Element[p,Reals]p has range Reals
    Element[p,Complexes]p has range Complexes
    Element[p,{v1,}]p has discrete range
    {p,pmin,pmax}p has range
  • In ParametricNDSolve[eqns,{u1,u2,},], can be any expression. Typically, will depend on the parameters indirectly through the solution of the differential equations but may depend explicitly on the parameters. A ParametricFunction object that will return a list can be obtained using ParametricNDSolve[eqns,{{u1,u2,}},] or by using ParametricNDSolveValue[eqns,{u1,u2,},].
  • Derivatives of the resulting ParametricFunction objects with respect to the parameters are computed using a combination of symbolic and numerical sensitivity methods when possible.
  • ParametricNDSolve takes the same options and settings as NDSolve.
  • NDSolve and ParametricNDSolve typically solve differential equations by going through several different stages, depending on the type of equations. With Method->{s1->m1,s2->m2,}, stage is handled by method . The actual stages used and their order are determined by NDSolve, based on the problem to be solved.
  • Possible solution stages are the same as for NDSolve, with the addition of:
  • "ParametricCaching"caching of computed solutions
    "ParametricSensitivity"computation of derivatives with respect to parameters

ExamplesExamplesopen allclose all

Basic Examples  (3)Basic Examples  (3)

Get a parametric solution for :

In[1]:=
Click for copyable input
Out[1]=

Evaluating with a numerical value of gives an approximate function solution for :

In[2]:=
Click for copyable input
Out[2]=

Evaluate at a time :

In[3]:=
Click for copyable input
Out[3]=

Plot the solutions for several different values of the parameter:

In[4]:=
Click for copyable input
Out[4]=

Get a function of the parameter a that gives the function f at :

In[1]:=
Click for copyable input
Out[1]=

This plots the value of f[10] as a function of the parameter a:

In[2]:=
Click for copyable input
Out[2]=

Find a value of a for which :

In[3]:=
Click for copyable input
Out[3]=

Show the sensitivity of the solution of a differential equation to parameters:

In[1]:=
Click for copyable input
Out[1]=

The sensitivity with respect to a increases with t:

In[2]:=
Click for copyable input
Out[2]=

The sensitivity with respect to does not increase with t:

In[3]:=
Click for copyable input
Out[3]=
Introduced in 2012
(9.0)
| Updated in 2014
(10.0)