Linear IVPs and BVPs

To begin, consider an initial value problem for a linear first-order ODE.

This is a linear first-order ODE.
In[1]:=
Click for copyable input
Notice that the general solution is a linear function of the arbitrary constant C[1].
In[2]:=
Click for copyable input
Out[2]=
This finds a particular solution for the initial condition .
In[3]:=
Click for copyable input
Out[3]=
This verifies that the solution satisfies both the equation and the initial condition.
In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=
Here is the solution to the same problem with the general initial condition .
In[6]:=
Click for copyable input
Out[6]=
This plots several integral curves of the equation for different values of . The plot shows that the solutions have an inflection point if the parameter lies between and , while a global maximum or minimum arises for other values of .
In[7]:=
Click for copyable input
Out[7]=
Here is the solution to a linear second-order equation with initial values prescribed for and at .
In[8]:=
Click for copyable input
In[9]:=
Click for copyable input
Out[9]=
In[10]:=
Click for copyable input
Out[10]=
This verifies that the solution satisfies the equation and the initial conditions.
In[11]:=
Click for copyable input
Out[11]=
In[12]:=
Click for copyable input
Out[12]=
In[13]:=
Click for copyable input
Out[13]=
Here is a plot of the solution.
In[14]:=
Click for copyable input
Out[14]=
To get more information about the solutions for the problem, set .
In[15]:=
Click for copyable input
Out[15]=
Here is a plot of the solutions for different initial directions. The solution approaches or as according to whether the value of is less than or greater than , which is the largest root of the auxiliary equation for the ODE.
In[16]:=
Click for copyable input
Out[16]=
Here is a BVP for an inhomogeneous linear second-order equation.
In[17]:=
Click for copyable input
In[18]:=
Click for copyable input
Out[18]=
In[19]:=
Click for copyable input
Out[19]=

It should be noted that, in contrast to initial value problems, there are no general existence or uniqueness theorems when boundary values are prescribed, and there may be no solution in some cases.

This problem has no solution because the term with C[2] in the general solution vanishes at both and . Hence there are two inconsistent conditions for the parameter C[1] and the solution is an empty set.
In[20]:=
Click for copyable input
Out[20]=

The previous discussion of linear equations generalizes to the case of higher-order linear ODEs and linear systems of ODEs.

Here is the solution to an Initial Value Problem (IVP) for a linear ODE of order four.
In[21]:=
Click for copyable input
In[22]:=
Click for copyable input
Out[22]=
This verifies the solution and the initial conditions.
In[23]:=
Click for copyable input
Out[23]=
Since this is a fourth-order ODE, four independent conditions must be specified to find a particular solution for an IVP. If there is an insufficient number of conditions, the solution returned by DSolve may contain some of the arbitrary parameters, as follows.
In[24]:=
Click for copyable input
Out[24]=
Finally, here is the solution of an IVP for a linear system of ODEs.
In[25]:=
Click for copyable input
In[26]:=
Click for copyable input
In[27]:=
Click for copyable input
In[28]:=
Click for copyable input
Out[28]=
This verifies that the solution satisfies the system and the initial conditions.
In[29]:=
Click for copyable input
Out[29]=
The solutions , , and are parametrized by the variable and can be plotted separately in the plane or as a curve in space.
In[30]:=
Click for copyable input
Out[30]=
In[31]:=
Click for copyable input
Out[31]=