ParametricNDSolveValue
✖
ParametricNDSolveValue
gives the value of expr with functions determined by a numerical solution to the ordinary differential equations eqns with the independent variable x in the range xmin to xmax with parameters pars.
solves the partial differential equations eqns over a rectangular region.
solves the partial differential equations eqns over the region Ω.
solves the time-dependent partial differential equations eqns over the region Ω.
Details and Options


- ParametricNDSolveValue 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 - 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 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
List of all options

Examples
open allclose allBasic Examples (3)Summary of the most common use cases
Get a parametric function of the parameter a for the value of y:

https://wolfram.com/xid/0yv78vsgx7ga-9ofqzx

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

https://wolfram.com/xid/0yv78vsgx7ga-xubub


https://wolfram.com/xid/0yv78vsgx7ga-mf30av

Plot the solutions for several different values of the parameter:

https://wolfram.com/xid/0yv78vsgx7ga-e0upg4

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

https://wolfram.com/xid/0yv78vsgx7ga-4egbx

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

https://wolfram.com/xid/0yv78vsgx7ga-fl17ka

Use the function with FindRoot to find a root:

https://wolfram.com/xid/0yv78vsgx7ga-blgdzz

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

https://wolfram.com/xid/0yv78vsgx7ga-1cvjb
The sensitivity with respect to a increases with t:

https://wolfram.com/xid/0yv78vsgx7ga-ie4uv8

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

https://wolfram.com/xid/0yv78vsgx7ga-b3liub

Scope (6)Survey of the scope of standard use cases
Parameter Dependence (4)
ParametricNDSolveValue returns a ParametricFunction object:

https://wolfram.com/xid/0yv78vsgx7ga-zfh55g


https://wolfram.com/xid/0yv78vsgx7ga-djp5ax


https://wolfram.com/xid/0yv78vsgx7ga-bejqm

Plot solutions for values of ranging from
to
:

https://wolfram.com/xid/0yv78vsgx7ga-gpsnsc

Initial conditions can be specified as parameters:

https://wolfram.com/xid/0yv78vsgx7ga-7eiz8x

Plot solutions with with
for values of
ranging from
to
:

https://wolfram.com/xid/0yv78vsgx7ga-lzmhb1

Plot solutions with with
for values of
ranging from
to
:

https://wolfram.com/xid/0yv78vsgx7ga-nozxts

Return a function of the solution :

https://wolfram.com/xid/0yv78vsgx7ga-c4ykdz

https://wolfram.com/xid/0yv78vsgx7ga-u1nvpj

https://wolfram.com/xid/0yv78vsgx7ga-d5pejo


https://wolfram.com/xid/0yv78vsgx7ga-50cdym

https://wolfram.com/xid/0yv78vsgx7ga-yx8whm


https://wolfram.com/xid/0yv78vsgx7ga-cq7zvm

https://wolfram.com/xid/0yv78vsgx7ga-5092j


https://wolfram.com/xid/0yv78vsgx7ga-bslq9n

https://wolfram.com/xid/0yv78vsgx7ga-0cy5h


https://wolfram.com/xid/0yv78vsgx7ga-4mw5fm

https://wolfram.com/xid/0yv78vsgx7ga-osel5

Differential equation coefficients and boundary conditions can be specified as parameters:

https://wolfram.com/xid/0yv78vsgx7ga-lah9g5

Plot solutions with for values of
ranging from
to
and with
and
:

https://wolfram.com/xid/0yv78vsgx7ga-r3uqlm

Parameter Sensitivity (2)
Solve the classical harmonic oscillator with parametric amplitude a:

https://wolfram.com/xid/0yv78vsgx7ga-mre2ud
Plot the solution for and several nearby values of
:

https://wolfram.com/xid/0yv78vsgx7ga-u3oe4m

The sensitivity of with respect to
is by definition
. Plot the sensitivity at
:

https://wolfram.com/xid/0yv78vsgx7ga-tmuiqz

Plot the sensitivity as a band around the solution
for
:

https://wolfram.com/xid/0yv78vsgx7ga-2j0nt1

Sensitivity analysis of a differential equation with multiple parameters:

https://wolfram.com/xid/0yv78vsgx7ga-b1364h

https://wolfram.com/xid/0yv78vsgx7ga-ukeauf

Plot the sensitivity with respect to the initial condition at
,
:

https://wolfram.com/xid/0yv78vsgx7ga-gm8vih

https://wolfram.com/xid/0yv78vsgx7ga-06v5e8

Plot the sensitivity with respect to the initial condition at
,
:

https://wolfram.com/xid/0yv78vsgx7ga-i8bjzq

https://wolfram.com/xid/0yv78vsgx7ga-i34ytz

Generalizations & Extensions (2)Generalized and extended use cases
Solve ,
for various values of WorkingPrecision and plot the error:

https://wolfram.com/xid/0yv78vsgx7ga-c5ob98

https://wolfram.com/xid/0yv78vsgx7ga-ks1ou9

Consider finding a solution to a highly nonlinear problem that NDSolveValue cannot solve directly. Set up a boundary condition, a region and the equation that depends on a parameter :

https://wolfram.com/xid/0yv78vsgx7ga-rsbzzl
NDSolveValue cannot find a solution:

https://wolfram.com/xid/0yv78vsgx7ga-ek5hdg



Set up an initial seeding function:

https://wolfram.com/xid/0yv78vsgx7ga-b1r3fc
Create a ParametricNDSolveValue function based on the parameter :

https://wolfram.com/xid/0yv78vsgx7ga-bxj24s


https://wolfram.com/xid/0yv78vsgx7ga-xbduu1

Reset the seeding to use the solution from :

https://wolfram.com/xid/0yv78vsgx7ga-dgs70g
With the reset seeding, find the solution for :

https://wolfram.com/xid/0yv78vsgx7ga-kux87b


https://wolfram.com/xid/0yv78vsgx7ga-njcmvh

Options (2)Common values & functionality for each option
Method (2)
ParametricCaching (1)
Prevent caching of solutions to save memory:

https://wolfram.com/xid/0yv78vsgx7ga-nx48a1
With no caching, the only extra memory required is for the processed equations:

https://wolfram.com/xid/0yv78vsgx7ga-id8402
The default is to cache the most recently computed solution:

https://wolfram.com/xid/0yv78vsgx7ga-i6i594
With caching, the memory requirement is much greater:

https://wolfram.com/xid/0yv78vsgx7ga-k9lpy
ParametricSensitivity (1)
Applications (14)Sample problems that can be solved with this function
Parameter Sweeps (7)
Simulate bouncing balls being dropped from various heights:

https://wolfram.com/xid/0yv78vsgx7ga-fgr8l1

https://wolfram.com/xid/0yv78vsgx7ga-uwjq1y

Find an initial value for which the solution
of a differential equation will have
:

https://wolfram.com/xid/0yv78vsgx7ga-czre8w

https://wolfram.com/xid/0yv78vsgx7ga-ciwnwr


https://wolfram.com/xid/0yv78vsgx7ga-jb7t4u

https://wolfram.com/xid/0yv78vsgx7ga-hlktr

Compare to nearby values of the parameter s:

https://wolfram.com/xid/0yv78vsgx7ga-c6mlcd

https://wolfram.com/xid/0yv78vsgx7ga-fibgs1

Find several solutions to the boundary value problem ,
,
. First consider several possible values for
:

https://wolfram.com/xid/0yv78vsgx7ga-bbbwh5

https://wolfram.com/xid/0yv78vsgx7ga-e0ez5y

Run a parameter sweep to determine nontrivial solution values of :

https://wolfram.com/xid/0yv78vsgx7ga-jvi3g8

https://wolfram.com/xid/0yv78vsgx7ga-mh6wwi

Using approximate initial values from the graph above:

https://wolfram.com/xid/0yv78vsgx7ga-b1hi4j

Plot the solutions that were found:

https://wolfram.com/xid/0yv78vsgx7ga-d4p60

Find all eigenvalues and eigenfunctions
for the classical harmonic oscillator
with
. Start by exploring the possible parameter values:

https://wolfram.com/xid/0yv78vsgx7ga-bi1fzy

https://wolfram.com/xid/0yv78vsgx7ga-m3k6gv


https://wolfram.com/xid/0yv78vsgx7ga-2tgzz

https://wolfram.com/xid/0yv78vsgx7ga-lwug5


https://wolfram.com/xid/0yv78vsgx7ga-fyxm0


https://wolfram.com/xid/0yv78vsgx7ga-h7n1dm

Find the first three eigenfunctions of the quantum harmonic oscillator ,
,
. Start by plotting solutions of
for
:

https://wolfram.com/xid/0yv78vsgx7ga-zxvqc2

https://wolfram.com/xid/0yv78vsgx7ga-51ndvq


https://wolfram.com/xid/0yv78vsgx7ga-cwum7u

The roots are the approximate eigenvalues. Find the first three:

https://wolfram.com/xid/0yv78vsgx7ga-il5lvu

Plot the approximate eigenfunctions together with solutions for nearby :

https://wolfram.com/xid/0yv78vsgx7ga-j1he8f

These only differ from the exact eigenfunctions, the Hermite functions, by scaling factors:

https://wolfram.com/xid/0yv78vsgx7ga-zbbk8x

https://wolfram.com/xid/0yv78vsgx7ga-n1ae63

Find the value of for which the solution of
,
has minimal arc length from
to
. Begin by plotting the solutions for values of
ranging from 0 to 1:

https://wolfram.com/xid/0yv78vsgx7ga-6dq08b

https://wolfram.com/xid/0yv78vsgx7ga-l85qal

Plot versus the arc length of the solution:

https://wolfram.com/xid/0yv78vsgx7ga-tc7xy3

The minimum arc length solution for seems to occur at
:

https://wolfram.com/xid/0yv78vsgx7ga-hpj15o

Find the local minimum, which appears near :

https://wolfram.com/xid/0yv78vsgx7ga-c4gpl9

Plot the corresponding solution of (locally) minimal arc length together with some nearby solutions:

https://wolfram.com/xid/0yv78vsgx7ga-zylubx

Simulate the response of an RLC circuit to a step in the voltage v1 at time :

https://wolfram.com/xid/0yv78vsgx7ga-sacejk

https://wolfram.com/xid/0yv78vsgx7ga-64ijga

https://wolfram.com/xid/0yv78vsgx7ga-00vuam
Show the step response when varying component values:

https://wolfram.com/xid/0yv78vsgx7ga-glqebs


https://wolfram.com/xid/0yv78vsgx7ga-l8e9ek


https://wolfram.com/xid/0yv78vsgx7ga-bmr4z3


https://wolfram.com/xid/0yv78vsgx7ga-gqslli

Parameter Sensitivities (5)
Perturb a parameter in a differential equation and view several of the resulting perturbed solutions:

https://wolfram.com/xid/0yv78vsgx7ga-hvg8a6

https://wolfram.com/xid/0yv78vsgx7ga-vg4bhd

A plot of the solution with its sensitivity band is qualitatively similar:

https://wolfram.com/xid/0yv78vsgx7ga-yn7wmx

Simulate an inverted pendulum stabilized by a base oscillating with frequency ω and amplitude a:

https://wolfram.com/xid/0yv78vsgx7ga-dq1ieq
With ,
the pendulum is stabilized near an inverted position
, but the sensitivity increases:

https://wolfram.com/xid/0yv78vsgx7ga-qca8es

https://wolfram.com/xid/0yv78vsgx7ga-ebi95k

Find the sensitivity of the Lorenz equations to a parameter:

https://wolfram.com/xid/0yv78vsgx7ga-dxt8gt

https://wolfram.com/xid/0yv78vsgx7ga-9iy0r

Parametric dependence of the heat equation ,
:

https://wolfram.com/xid/0yv78vsgx7ga-gd4twp

https://wolfram.com/xid/0yv78vsgx7ga-uydjl4
Plot the corresponding sensitivity bands:

https://wolfram.com/xid/0yv78vsgx7ga-j2ighn

Indicate sensitivity to a and c by changing the color of the solution surface:

https://wolfram.com/xid/0yv78vsgx7ga-bob1jo

https://wolfram.com/xid/0yv78vsgx7ga-cms6oo

Parametric dependence of the wave equation ,
:

https://wolfram.com/xid/0yv78vsgx7ga-ibt8ar

https://wolfram.com/xid/0yv78vsgx7ga-dlav1e
Plot the corresponding sensitivity bands:

https://wolfram.com/xid/0yv78vsgx7ga-gh6skk

Indicate sensitivity to a and c by changing the color of the solution surface:

https://wolfram.com/xid/0yv78vsgx7ga-550brj

https://wolfram.com/xid/0yv78vsgx7ga-f1o9jg

Parameter Fitting (2)
Sample the solution of a differential equation and add noise:

https://wolfram.com/xid/0yv78vsgx7ga-0k356a

https://wolfram.com/xid/0yv78vsgx7ga-m4vr3k

Fit a trigonometric model to the noisy data:

https://wolfram.com/xid/0yv78vsgx7ga-dx6g6w

https://wolfram.com/xid/0yv78vsgx7ga-2aauvl


https://wolfram.com/xid/0yv78vsgx7ga-zepq1o

A quadratic model is a better fit:

https://wolfram.com/xid/0yv78vsgx7ga-hg2rw1

https://wolfram.com/xid/0yv78vsgx7ga-zftehu


https://wolfram.com/xid/0yv78vsgx7ga-jorips

Find the parameters that make the solution of a differential equation the best fit to data:

https://wolfram.com/xid/0yv78vsgx7ga-v47bs
Convert data to kelvins and find initial and final (ambient) temperatures:

https://wolfram.com/xid/0yv78vsgx7ga-nbzm45
Find solutions to Newton's law of cooling depending on parameters k1 and k2:

https://wolfram.com/xid/0yv78vsgx7ga-gwdpy

https://wolfram.com/xid/0yv78vsgx7ga-g8at25
Fit the parameters in the differential equation to the given data:

https://wolfram.com/xid/0yv78vsgx7ga-dctar9

https://wolfram.com/xid/0yv78vsgx7ga-eeyps5


https://wolfram.com/xid/0yv78vsgx7ga-dh6yyh

Properties & Relations (3)Properties of the function, and connections to other functions
Use NDSolveValue to solve differential equations with parameters:

https://wolfram.com/xid/0yv78vsgx7ga-dcqxze
For a given parameter value, each function call takes roughly the same amount of time:

https://wolfram.com/xid/0yv78vsgx7ga-ce29gz

ParametricNDSolve caches the solution and subsequently reuses the cached solution values:

https://wolfram.com/xid/0yv78vsgx7ga-ps3mt4

https://wolfram.com/xid/0yv78vsgx7ga-b6uk

DSolve can solve some differential equations with parameters in closed form:

https://wolfram.com/xid/0yv78vsgx7ga-zib9g0

Use ParametricNDSolveValue to solve the example numerically:

https://wolfram.com/xid/0yv78vsgx7ga-fh2l53
The sensitivity is the same from both paths:

https://wolfram.com/xid/0yv78vsgx7ga-briqet

Use SystemModelParametricSimulate to simulate larger hierarchical system models:

https://wolfram.com/xid/0yv78vsgx7ga-zi06e7

Simulate with two sets of resistor and spring damper parameters:

https://wolfram.com/xid/0yv78vsgx7ga-b6usds
Compare the resulting angular velocities:

https://wolfram.com/xid/0yv78vsgx7ga-5nu2jm

Possible Issues (1)Common pitfalls and unexpected behavior
Solution sampling with WhenEvent, Reap, and Sow only works on the first call for each parameter value:

https://wolfram.com/xid/0yv78vsgx7ga-teyrdw


https://wolfram.com/xid/0yv78vsgx7ga-eo642a


https://wolfram.com/xid/0yv78vsgx7ga-sho2oi

Values are not sown if the solution has already been cached:

https://wolfram.com/xid/0yv78vsgx7ga-0xl0wc


https://wolfram.com/xid/0yv78vsgx7ga-yrle11

Wolfram Research (2012), ParametricNDSolveValue, Wolfram Language function, https://reference.wolfram.com/language/ref/ParametricNDSolveValue.html (updated 2014).
Text
Wolfram Research (2012), ParametricNDSolveValue, Wolfram Language function, https://reference.wolfram.com/language/ref/ParametricNDSolveValue.html (updated 2014).
Wolfram Research (2012), ParametricNDSolveValue, Wolfram Language function, https://reference.wolfram.com/language/ref/ParametricNDSolveValue.html (updated 2014).
CMS
Wolfram Language. 2012. "ParametricNDSolveValue." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/ParametricNDSolveValue.html.
Wolfram Language. 2012. "ParametricNDSolveValue." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2014. https://reference.wolfram.com/language/ref/ParametricNDSolveValue.html.
APA
Wolfram Language. (2012). ParametricNDSolveValue. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ParametricNDSolveValue.html
Wolfram Language. (2012). ParametricNDSolveValue. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ParametricNDSolveValue.html
BibTeX
@misc{reference.wolfram_2025_parametricndsolvevalue, author="Wolfram Research", title="{ParametricNDSolveValue}", year="2014", howpublished="\url{https://reference.wolfram.com/language/ref/ParametricNDSolveValue.html}", note=[Accessed: 20-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_parametricndsolvevalue, organization={Wolfram Research}, title={ParametricNDSolveValue}, year={2014}, url={https://reference.wolfram.com/language/ref/ParametricNDSolveValue.html}, note=[Accessed: 20-May-2025
]}