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 xmin to xmax 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 ui.

Details and Options

• ParametricNDSolve gives results in terms of ParametricFunction objects.
• A specification for the parameters pars of {pspec1,pspec2,} can be used to specify ranges.
• Possible forms for pspeci are:
•  p p 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 {v1,…} {p,pmin,pmax} p has range
• In ParametricNDSolve[eqns,{u1,u2,},], ui can be any expression. Typically, ui 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 si is handled by method mi. 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

Examples

open allclose all

Basic Examples(3)

Get a parametric solution for y:

 In[1]:=
 Out[1]=

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

 In[2]:=
 Out[2]=

Evaluate at a time :

 In[3]:=
 Out[3]=

Plot the solutions for several different values of the parameter:

 In[4]:=
 Out[4]=

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

 In[1]:=
 Out[1]=

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

 In[2]:=
 Out[2]=

Find a value of a for which y[10]=0:

 In[3]:=
 Out[3]=

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

 In[1]:=
 Out[1]=

The sensitivity with respect to a increases with t:

 In[2]:=
 Out[2]=

The sensitivity with respect to b does not increase with t:

 In[3]:=
 Out[3]=