“Stitching” Solutions of an ODE

When the conditions of the existence and uniqueness theorem fail for an ODE, several different solutions may be defined on the same domain. In such situations a new solution can be stitched together by joining two different solutions at a suitable junction point \( x_0 \). For this we require that the function values agree at the junction,

\( y_1(x_0) = y_2(x_0), \)

and that the derivatives agree there as well:

\( y_1'(x_0) = y_2'(x_0). \)
The stitching conditions
The function value and the derivative must be equal on both sides of the stitching point. This method produces new solutions of the equation, as long as continuity and differentiability are preserved at the junction.

Example (Dr. Ofer Hadas)

Prove that every solution of the equation

\( y' = 2 e^x \sqrt{|y|} \)

is a weakly increasing function, and find three different solutions of the equation that are defined on the whole real line and satisfy \( y(0) = 0 \).

Solution. Since \( y' = 2 e^x \sqrt{|y|} \geq 0 \) everywhere, every solution is weakly increasing. Separating variables:

\( \frac{dy}{\sqrt{|y|}} = 2 e^x\, dx. \)

Integrating both sides:

\( 2\, \mathrm{sgn}(y) \sqrt{|y|} = 2 e^x + C, \)

and we obtain three families of solutions:

\( y(x) = (e^x - 1)^2, \)
\( y(x) = -(e^x - 1)^2, \)
\( y(x) = 0. \)

Near the point \( x = 0 \) (where \( y = 0 \)) the conditions of the existence and uniqueness theorem fail, so it can be used as a stitching point.

The three solution branches through \( (0,0) \), and a stitched solution: \( y = 0 \) for \( x < 0 \) joined to \( y = (e^x-1)^2 \) for \( x \geq 0 \)

For example, the stitched function

\( y(x) = \begin{cases} (e^x - 1)^2, & x \geq 0 \\ 0, & x < 0 \end{cases} \)

is continuous and differentiable on the whole real line — at \( x = 0 \) both pieces have value \( 0 \) and derivative \( 0 \) — so it is a solution on all of \( \mathbb{R} \).

Counting the solutions
In this way one obtains \( 9 \) different solutions: for each of the \( 3 \) possibilities for the lower branch there are \( 3 \) possibilities for the upper branch.