Is the Problem Well-Posed?

DSolve returns a general solution for a problem if no initial or boundary conditions are specified.

The general solution to this equation is returned.
In[1]:=
Click for copyable input
Out[1]=

However, if initial or boundary conditions are specified, the output from DSolve must satisfy both the underlying differential equation as well as the given conditions.

Here is an example with a boundary condition.
In[2]:=
Click for copyable input
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

In such cases, it is useful to check whether DSolve has been asked a reasonable questionin other words, to check whether the problem is well-posed. An initial or boundary value problem is said to be well-posed if a solution for it is guaranteed to exist in some well-known class of functions (for example, analytic functions), if the solution is unique, and if the solution depends continuously on the data. Given an ODE of order (or a system of first-order equations) and initial conditions, there are standard existence and uniqueness theorems that show that the problem is well-posed under a specified set of conditions. The right-hand side of the first-order linear ODE in the previous example is a polynomial in and hence infinitely differentiable. This is sufficient to apply Picard's existence and uniqueness theorem, which only requires that the right-hand side be Lipschitz-continuous.

Most problems that arise in practice are well-posed since they are derived from sound theoretical principles. However, as a note of caution, the following are examples where DSolve might have difficulty finding a satisfactory solution to the problem.

Here is the solution to a first-order ODE in which the right-hand side fails to satisfy the Lipschitz condition around 0.
In[5]:=
Click for copyable input
Out[5]=
The general solution has two branches.
In[6]:=
Click for copyable input
Out[6]=
This initial value problem is well posed in a region around the initial condition and hence DSolve succeeds in picking out the correct branch for the given initial condition.
In[7]:=
Click for copyable input
Out[7]=
Here is a second-order ODE. The boundary conditions do not allow any solution to this problem.
In[8]:=
Click for copyable input
Out[8]=
In this example, DSolve returns a pair of solutions. As the table shows, the first solution is only valid for values of greater than or equal to 2.
In[9]:=
Click for copyable input
In[10]:=
Click for copyable input
Out[10]=
In[11]:=
Click for copyable input
Out[11]=

Finally, it is possible that a problem has a solution, but that DSolve fails to find it because the general solution is in implicit form or involves higher transcendental functions.

In this example, a solution is available only after inverting the roles of the dependent and independent variables.
In[12]:=
Click for copyable input
Out[12]=
In[13]:=
Click for copyable input
Out[13]=

This concludes the discussion of the basic principles for effectively working with DSolve. See the list of "references" that were found to be useful either during the development of DSolve or during the preparation of this documentation.