ParametricNDSolveValue

ParametricNDSolveValue[eqns, expr, {t, tmin, tmax}, pars]
gives the value of expr with functions determined by a numerical solution to the ordinary differential equations eqns with the independent variable t in the range to with parameters pars.

ParametricNDSolveValue[eqns, expr, {t, tmin, tmax}, {x, xmin, xmax}]
uses a numerical solution to the partial differential equations eqns.

Details and OptionsDetails and Options

  • ParametricNDSolveValue 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
  • Typically expr will depend on the parameters indirectly, through the solution of the differential equations, but may depend explicitly on the parameters.
  • Derivatives of the resulting ParametricFunction object with respect to the parameters are computed using a combination of symbolic and numerical sensitivity methods when possible.
  • ParametricNDSolveValue takes the same options and settings as NDSolve.
  • NDSolve and ParametricNDSolveValue 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 function of the parameter for the value of :

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]=

Get the value at :

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 that gives the value of the function at :

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

This plots the value as a function of the parameter a:

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

Use the function with FindRoot to find a root:

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

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]=
New in 9
New to Mathematica? Find your learning path »
Have a question? Ask support »