DSolveValue
DSolveValue[eqn,expr,x]
gives the value of expr determined by a symbolic solution to the ordinary differential equation eqn with independent variable x.
DSolveValue[eqn,expr,{x,x_{min},x_{max}}]
uses a symbolic solution for x between x_{min} and x_{max}.
DSolveValue[{eqn_{1},eqn_{2},…},expr,…]
uses a symbolic solution for a list of differential equations.
DSolveValue[eqn,expr,{x_{1},x_{2},…}]
uses a solution for the partial differential equation eqn.
DSolveValue[eqn,expr,{x_{1},x_{2},…}∈Ω]
uses a solution of the partial differential equation eqn over the region Ω.
Details and Options
 DSolveValue can solve ordinary differential equations (ODEs), partial differential equations (PDEs), differential algebraic equations (DAEs), delay differential equations (DDEs), integral equations, integrodifferential equations and hybrid differential equations.
 The output from DSolveValue is controlled by the form of the dependent function, u or u[x]:

DSolveValue[eqn,u,x] f where f is a pure function DSolveValue[eqn,u[x],x] f[x] where f[x] is an expression in x  DSolveValue will return a single solution, whereas DSolve can return multiple solutions.
 DSolveValue can give solutions that include Inactive sums and integrals that cannot be carried out explicitly. Variables K[1], K[2], … are used in such cases.
 DSolveValue[eqn,y[Infinity],x] gives the limiting value of the solution y at Infinity.
 Different classes of equations solvable by DSolveValue include:

u'[x]f[x,u[x]] ordinary differential equation a ∂_{x}u[x,y]+b ∂_{y}u[x,y]f partial differential equation f[u'[x],u[x],x]0 differential algebraic equation u'[x]f[x,u[xx_{1}]] delay differential equation integrodifferential equation {…,WhenEvent[cond,u[x]g]} hybrid differential equation  Boundary conditions for ODEs and DAEs can be specified by giving equations at specific points such as u[x_{1}]a, u'[x_{2}]b, etc.
 Boundary conditions for PDEs can be given as equations u[x,y_{1}]a, Derivative[1,0][u][x,y_{1}]b, etc. or as DirichletCondition[u[x,y]g[x,y],cond].
 Initial conditions for DDEs can be given as a history function g[x] in the form u[x/;x<x_{0}]g[x].
 WhenEvent[event,action] may be included in the equations eqn to specify an action that occurs when event becomes True.
 The region Ω can be anything for which RegionQ[Ω] is True.
 N[DSolveValue[...]] calls NDSolveValue or ParametricNDSolveValue for differential equations that cannot be solved symbolically.
 The following options can be given:

Assumptions $Assumptions assumptions on parameters DiscreteVariables {} discrete variables for hybrid equations GeneratedParameters C how to name generated parameters Method Automatic what method to use  GeneratedParameters control the form of generated parameters; for ODEs and DAEs these are by default constants C[n] and for PDEs they are arbitrary functions C[n][…]. »
Examples
open allclose allBasic Examples (3)
Scope (97)
Basic Uses (13)
Compute the general solution of a firstorder differential equation:
Obtain a particular solution by adding an initial condition:
Plot the general solution of a differential equation:
Plot the solution curves for two different values of the arbitrary constant C[1]:
Plot the solution of a boundary value problem:
Verify the solution of a firstorder differential equation by using y in the second argument:
Obtain the general solution of a higherorder differential equation:
Solve a system of differential equations:
Solve a system of differentialalgebraic equations:
Solve a partial differential equation:
Use different names for the arbitrary constants in the general solution:
Solve a delay differential equation:
Plot the solution for different values of the parameter:
Solve a hybrid differential equation:
This system models a bouncing ball:
Apply N[DSolveValue[…]] to invoke NDSolveValue if symbolic solution fails:
Linear Differential Equations (4)
Nonlinear Differential Equations (3)
Systems of Differential Equations (4)
DifferentialAlgebraic Equations (3)
Delay Differential Equations (2)
Piecewise Differential Equations (4)
Using a piecewise forcing function:
A differential equation with a piecewise coefficient:
A nonlinear piecewisedefined differential equation:
Differential equations involving generalized functions:
A simple impulse response or Green's function:
Solve a piecewise differential equation on different subintervals of the real line:
Hybrid Differential Equations (8)
Solve a firstorder differential equation with a timedependent event:
Solve a secondorder differential equation with a timedependent event:
Solve a system of differential equations with a timedependent event:
Stop the integration when an event occurs:
Remove an event after it has occurred once:
Specify that a variable maintains its value between events:
SturmLiouville Problems (6)
Solve an eigenvalue problem with Dirichlet conditions:
Make a table of the first five eigenfunctions:
Solve an eigenvalue problem with Neumann conditions:
Make a table of the first five eigenfunctions:
Solve an eigenvalue problem with mixed boundary conditions:
Make a table of the first five eigenfunctions:
Solve an eigenvalue problem with a Robin condition at the left end of the interval:
Locate the roots of the transcendental eigenvalue equation in the range 10<λ<80:
Obtain the eigenfunctions within this range by using Assumptions:
Solve an eigenvalue problem with Robin boundary conditions at both ends:
Solve an eigenvalue problem for the Airy operator:
Integral Equations (6)
Solve a Volterra integral equation:
Solve a Fredholm integral equation:
Solve an integrodifferential equation:
Specify an initial condition to obtain a particular solution:
Solve a singular Abel integral equation:
Solve a weakly singular Volterra integral equation:
FirstOrder Partial Differential Equations (7)
General solution for a linear firstorder partial differential equation:
The solution with a particular choice of the arbitrary function C[1]:
Initial value problem for a linear firstorder partial differential equation:
Initialboundary value problem for a linear firstorder partial differential equation:
General solution for the transport equation:
Plot the traveling wave with speed c1:
General solution for a quasilinear firstorder partial differential equation:
Initial value problem for a scalar conservation law:
Complete integral for a nonlinear firstorder Clairaut equation:
Hyperbolic Partial Differential Equations (11)
Initial value problem for the wave equation:
The wave propagates along a pair of characteristic directions:
Initial value problem for the wave equation with piecewise initial data:
Discontinuities in the initial data are propagated along the characteristic directions:
Initial value problem with a pair of decaying exponential functions as initial data:
Initial value problem for an inhomogeneous wave equation:
Visualize the solution for different values of m:
Initial value problem for the wave equation with a Dirichlet condition on the halfline:
The wave bifurcates starting from the initial data:
Initial value problem for the wave equation with a Neumann condition on the halfline:
In this example, the wave evolves to a nonoscillating function:
Dirichlet problem for the wave equation on a finite interval:
The solution is an infinite trigonometric series:
Extract the first three terms from the Inactive sum:
The wave executes periodic motion in the vertical direction:
Dirichlet problem for the wave equation in a rectangle:
The solution is a doubly infinite trigonometric series:
Extract a few terms from the Inactive sum:
The twodimensional wave executes periodic motion in the vertical direction:
Dirichlet problem for the wave equation in a circular disk:
The solution is an infinite Bessel series:
Extract the first three terms from the Inactive sum:
General solution for a secondorder hyperbolic partial differential equation:
Hyperbolic partial differential equation with nonrational coefficients:
Inhomogeneous hyperbolic partial differential equation with constant coefficients:
Initial value problem for an inhomogeneous linear hyperbolic system with constant coefficients:
Parabolic Partial Differential Equations (8)
Initial value problem for the heat equation:
Visualize the diffusion of heat with the passage of time:
Initial value problem for the heat equation with piecewise initial data:
The solution is given in terms of the error function Erf:
Discontinuities in the initial data are smoothed instantly:
Initial value problem for an inhomogeneous heat equation:
Visualize the growth of the solution for different values of the parameter m:
Dirichlet problem for the heat equation on a finite interval:
The solution is a Fourier sine series:
Extract three terms from the Inactive sum:
Neumann problem for the heat equation on a finite interval:
The solution is a Fourier cosine series:
Extract a few terms from the Inactive sum:
Visualize the evolution of the solution to its steady state:
Dirichlet problem for the heat equation in a disk:
The solution is an infinite Bessel series:
Extract a few terms from the Inactive sum:
Visualize the individual terms of the solution at time t=0.1:
Elliptic Partial Differential Equations (9)
Dirichlet problem for the Laplace equation in the upper halfplane:
Discontinuities in the boundary data are smoothed out:
Dirichlet problem for the Laplace equation in the right halfplane:
Dirichlet problem for the Laplace equation in the first quadrant:
Neumann problem for the Laplace equation in the upper halfplane:
Dirichlet problem for the Laplace equation in a rectangle:
The solution is an infinite trigonometric series:
Extract a few terms from the Inactive sum:
Dirichlet problem for the Laplace equation in a disk:
Dirichlet problem for the Laplace equation in an annulus:
Dirichlet problem for the Poisson equation in a rectangle:
Dirichlet problem for the Helmholtz equation in a rectangle:
Extract a finite number of terms from the Inactive sum:
General Partial Differential Equations (6)
A potentialfree Schrödinger equation with Dirichlet boundary conditions:
Extract the first four terms in the solution:
For any choice of the four constants C[k], ψ obeys the equation and boundary conditions:
Initial value problem for a Schrödinger equation with Dirichlet boundary conditions:
Define a family of partial sums of the solution:
For each k, u_{k} satisfies the differential equation:
The boundary conditions are also satisfied:
The initial condition is only satisfied for u_{∞}, but there is rapid convergence at t==2:
Solve a Schrödinger equation with potential over the reals:
Extract the first two terms in the solution:
For any values of the constants C[0] and C[1], the equation is satisfied:
The conditions at infinity are also satisfied:
Although the function is time dependent, its norm is constant:
Initial value problem for Burgers' equation with viscosity ν:
Plot the solution at different times for ν=1/40:
Plot the solution for different values of ν:
Boundary value problem for the Tricomi equation:
Traveling wave solution for the Korteweg–de Vries (KdV) equation:
Obtain a particular solution for a fixed choice of arbitrary constants:
Partial Differential Equations over Regions (3)
Dirichlet problem for the Laplace equation in a rectangle:
Extract the first 100 terms from the Inactive sum:
Visualize the solution on the rectangle:
Dirichlet problem for the Laplace equation in a disk:
Visualize the solution in the disk:
Dirichlet problem for the Laplace equation in a right halfplane:
Generalizations & Extensions (2)
Options (5)
Assumptions (1)
Solve an eigenvalue problem for a linear secondorder differential equation:
Use Assumptions to specify a range for the parameter λ:
GeneratedParameters (2)
Use differently named constants:
Generate uniquely named constants of integration:
The constants of integration are unique across different invocations of DSolveValue:
Method (1)
Solve a linear ordinary differential equation:
Obtain a solution in terms of DifferentialRoot:
Applications (30)
Ordinary Differential Equations (6)
Solve a logistic (Riccati) equation:
Plot the solution for different initial values:
Solve a linear pendulum equation:
Displacement of a linear, damped pendulum:
Directly find the solution in phase space:
Study the phase portrait of a dynamical system:
Find a power series solution when the exact solution is known:
Compute the limiting value of the solution at Infinity:
Hybrid Differential Equations (8)
Model a damped oscillator that gets a kick at regular time intervals:
Model a ball bouncing down steps:
In a square box, model a ball that changes direction upon impact with the side walls:
Simulate the system stabilized with a discretetime controller :
Control a double integrator using a deadbeat discretetime controller:
Use a deadbeat digital feedback controller :
Model the position of a moving body with 1 kg mass:
Use a sampled proportionalderivative (PD) controller to keep the position constant:
Set the physical variable a to 0 whenever it becomes negative:
Delay Differential Equations (2)
Integral Equations (4)
The tautochrone problem requires finding the curve down which a bead placed anywhere will fall to the bottom in the same amount of time. Expressing the total fall time in terms of the arc length of the curve and the speed v yields the Abel integral equation . Defining the unknown function by the relationship and using the conservation of energy equation yields the explicit equation:
Use DSolveValue to solve the integral equation:
Using the relationship , solve for :
Starting the curve from the origin and integrating—with assumptions that ensure the integrand is realvalued—yields as a function of :
Substituting values for and , use ParametricPlot to display the maximal tautochrone curve:
Making the change of variables gives a simple, nonsingular parametrization of the curve with :
Combining the conservation of energy equation and the chain rule produces the following differential equation for as a function of :
This equation can be solved numerically for different starting points:
Plotting the solutions show that all reach the bottom, , at the 2 second mark:
Visualize the motion along the tautochrone:
A springmass system, with an attached mass of
, has a spring constant of and a damping coefficient of . At time , the mass is pushed down and then released with a velocity 28 cm/s downward. A force of acts downward on the mass for . Find the velocity of the system as a function of time. The integral equation for the velocity is given by the following:Initial value of the velocity:
Solve the integrodifferential equation using DSolveValue:
Plot the velocity as a function of time:
Visualize the motion of the physical springmass system:
An LRC circuit has a voltage source given by . The resistance in the circuit is
, the inductance is , and the capacitance is . Initially, the current in the resistor is . Find the current as a function of time:The integral equation for the current is given by:
Solve the integrodifferential equation using DSolveValue:
Plot the current as a function of time:
A linear Volterra integral equation is equivalent to an initial value problem for a linear differential equation. Verify this relationship for the following Volterra equation:
Solve the integral equation using DSolveValue:
Set up the corresponding differential equation:
Add two initial conditions since the differential equation is of second order:
The solution of the initial value problem agrees with that of the integral equation:
Classical Partial Differential Equations (5)
Model the vibrations of a string with fixed length, say π, using the wave equation:
Specify that the ends of the string remain fixed during the vibrations:
Obtain the fundamental and higher harmonic modes of oscillation:
Visualize the vibrations of the string for these modes:
In general, the solution is composed of an infinite number of harmonics:
Extract four terms from the Inactive sum:
Visualize the vibration of the string:
Model the oscillations of a circular membrane of radius 1 using the wave equation in 2D:
Specify that the boundary of the membrane remains fixed:
Initial condition for the problem:
Obtain a solution in terms of Bessel functions:
Extract a finite number of terms from the Inactive sum:
Visualize the oscillations of the membrane:
Model the flow of heat in a bar of length 1 using the heat equation:
Specify the fixed temperature at both ends of the bar:
Solve the heat equation subject to these conditions:
Extract a few terms from the Inactive sum:
Visualize the evolution of the temperature to a steady state:
Obtain the steadystate solution v[x], which is independent of time:
The steadystate solution is a linear function of x:
Model the flow of heat in a bar of length 1 that is insulated at both ends:
Specify that no heat flows through the ends of the bar:
Solve the heat equation subject to these conditions:
Extract a few terms from the Inactive sum:
Visualize the evolution of the temperature to the steady state value of 60°:
Construct a complex analytic function, starting from the values of its real and imaginary parts on the axis. The real and imaginary parts, u and v, satisfy the Cauchy–Riemann equations:
Prescribe the values of u and v on the axis:
Solve the Cauchy–Riemann equations:
Verify that the solutions are harmonic functions:
Visualize the streamlines and equipotentials generated by the solution:
General Partial Differential Equations (5)
Study the evolution of a smooth solution for Burgers' equation to a shock wave in the limit when the viscosity parameter becomes infinitely small:
The solution is smooth for any positive value of ϵ:
The solution develops a shock discontinuity in the limit when ϵ approaches 0:
An electron constrained to move in a onedimensional box of length d is governed by the free Schrödinger equation with Dirichlet conditions at the endpoints:
The general solution to this equation is a sum of trigonometricexponential terms:
Each term in the sum is called a stationary state as using the sine as initial conditions leads to the positional probability density being time independent. For example:
The resulting probability distribution is independent of time:
The normalization of the initial data was chosen so that the integral of the density (the total probability of finding the particle somewhere) is 1:
Using any other initial condition, even one as simple as a sum of two stationary states, will lead to a complicated, timedependent density:
This density is not stationary as t appears in the second and third cosines:
Although the probability density is time dependent, its integral is still the constant 1:
Entering the mass of the electron and the value of in SI units and setting d to a typical interatomic distance of 1 nm results in the following density function:
Visualize the function over the spatial domain and one period in time:
Viewing the graph as a movie of probability densities, it can be seen that "center" of the electron moves from side to side of the box:
Find the value of a European vanilla call option if the underlying asset price and the strike price are both $100, the riskfree rate is 5%, the volatility of the underlying asset is 20%, and the maturity period is 1 year, using the Black–Scholes model:
Solve the boundary value problem:
Compute the value of the European vanilla option:
Compare with the value given by FinancialDerivative:
Recover a function from its gradient vector:
The solution represents a family of parallel surfaces:
Properties & Relations (9)
DSolveValue returns an expression for the solution:
DSolve returns a rule for the solution:
Solutions satisfy the differential equation and boundary conditions:
Differential equation corresponding to Integrate:
Use NDSolveValue to find a numerical solution:
Use AsymptoticDSolveValue to find an asymptotic expansion:
Use DEigensystem to find eigenvalues and eigenfunctions:
Find the complete eigensystem:
Find eigenvalues and eigenfunctions:
Compute an impulse response using DSolveValue:
The same computation using InverseLaplaceTransform:
Apply N[DSolveValue[…]] to invoke NDSolveValue if symbolic solution fails:
Use system modeling for numerical solutions to larger hierarchical models:
Possible Issues (3)
DSolveValue returns only a single branch if the solution has multiple branches:
Use DSolve to get all of the solution branches:
Results may contain symbolic integrals:
Definitions for an unknown function may affect the evaluation:
Clearing the definition for the unknown function fixes the issue: