WOLFRAM LANGUAGE TUTORIAL
Plotting the Solution
A plot of the solution given by DSolve can give useful information about the nature of the solution, for instance, whether it is oscillatory in nature. It can also serve as a means of solution verification if the shape of the graph is known from theory or from plotting the vector field associated with the differential equation. A few examples that use different Wolfram Language graphics functions follow.
Here is the general solution to a linear first-order equation.
The solution can be plotted for specific values of the constant C
. The use of Evaluate
reduces the time taken by Plot
and can also help in cases where the solution has discontinuities.
Here is the plot for a linear second-order ODE with initial values prescribed at 0.
This nonlinear equation has two solutions that can be plotted on the same graph.
The solution to this Abel ODE is given in implicit form.
A contour plot can be used to study the nature of the solution. Each contour line corresponds to a solution to the ODE for a fixed value of C
Here is the plot of the solutions to a system of two linear ODEs. The WorkingPrecision
option in Plot
is required because the solution is fairly complicated.
function can be used to trace the solution curve
in the plane.
Here is the plot for the solution to a DAE.
Here is the general solution to a linear PDE.
Here is a plot of the solution surface for a particular choice of the arbitrary function C