6
$\begingroup$

I would like to solve:

$y - y' x - y'^2 = 0$.

One can guess a solution as $y = - x^2 / 4$.

However, with Mathematica, I have:

DSolve[y[x] - y'[x] x - (y'[x])^2 == 0, y[x], x]

which returns:

{{y[x] -> x C[1] + C[1]^2}}

that is also a correct solution.

How can I force Mathematica to return the former solution?

$\endgroup$
3
  • 1
    $\begingroup$ $y = -x^2/4$ the equilibrium manifold. A solution should have as many undetermined constants as the ODE degree. $\endgroup$
    – Cesareo
    Commented May 9, 2020 at 12:05
  • 1
    $\begingroup$ Same problem here: mathematica.stackexchange.com/questions/86152/… $\endgroup$
    – Michael E2
    Commented Jul 3, 2020 at 18:03
  • $\begingroup$ @MichaelE2 Thanks! Your answer to that question is some sort of a journal article! $\endgroup$
    – user72595
    Commented Jul 4, 2020 at 11:45

3 Answers 3

10
$\begingroup$

These are called singular solutions. Mathematica sometimes do not find them.

A singular solution, when it exists, is tangent to the family of the general solutions (parameterized be the constant of integration you see there, which is $c_1$). Singular solutions can not be obtained from the general solution by substituting any value for the constant of integration.

Mathematica graphics

For each specific value of $c_1$, we have one solution curve.

The tangent curve to all these solution curves (if it exists) is a singular solution. It exists at the max or min of the solution curves. Hence to find singular solution one way is to do the following (there can be more than one singular solution also)

 sol = y[x] /. First@DSolve[y[x] - y'[x] x - y'[x]^2 == 0, y[x], x]

Mathematica graphics

  envelope = y[x] - sol

Mathematica graphics

Now solve for y[x], the singular solution

Solve[{envelope == 0, D[envelope, C[1]] == 0}, {y[x], C[1]}]

Mathematica graphics

Verify it satisfies the ode

sol = {{y -> Function[{x}, -(x^2/4)]}};
ode /. sol

Mathematica graphics

second example

ode = 1 + y'[x]^2 == 1/y[x]^2;
sol = y[x] /. DSolve[ode, y[x], x]

Mathematica graphics

Mathematica does not find solution $y(x)=-1, y(x)=+1$. To find these

envelope = y[x] - sol[[1]];
Solve[{envelope == 0, D[envelope, C[1]] == 0}, {y[x], C[1]}];

Mathematica graphics

sol = {{y -> Function[{x}, -1]}};
ode /. sol

Mathematica graphics

envelope = y[x] - sol[[2]];
Solve[{envelope == 0, D[envelope, C[1]] == 0}, {y[x], C[1]}]

Mathematica graphics

Third example

ode = y'[x]^2 == 4 y[x];
sol = DSolve[ode, y[x], x]

Mathematica graphics

Mathematica does not give the solution $y=0$ which can't be obtained from the above for any values for $c_1$.

envelope = y[x] - (y[x] /. sol)[[1]]
Solve[{envelope == 0, D[envelope, C[1]] == 0}, {y[x], C[1]}]

Mathematica graphics

sol2 = {{y -> Function[{x}, 0]}};
ode /. sol2

Mathematica graphics

References

(1) https://www.math24.net/singular-solutions-differential-equations/

(2) https://www.britannica.com/science/singular-solution

(3) https://groups.google.com/forum/#!topic/comp.soft-sys.math.mathematica/rxO6yVz-_pk See answer in this link by Devendra Kapadia which the above is mostly based on.

There are other ways to find these singular solutions. Reference (1) above shows more formal methods.

$\endgroup$
1
  • 1
    $\begingroup$ It should be noticed the command of Maple dsolve(y(x) - diff(y(x), x)*x - diff(y(x), x)^2 = 0) produces y(x) = -x^2/4, y(x) = _C1^2 + _C1*x. $\endgroup$
    – user64494
    Commented May 9, 2020 at 13:36
6
$\begingroup$

The equilibrium manifold as well as a generic solution can be obtained thru

n = 2;
y[x_] := Sum[Subscript[a, k] x^k, {k, 0, n}]
A = Table[Subscript[a, k], {k, 0, n}]
dif = y[x] - x y'[x] - y'[x]^2
coef = Take[CoefficientList[dif, x], {1, n + 1}]
sols = NSolve[coef == 0, A, Reals]
y[x] /. sols
$\endgroup$
6
$\begingroup$

The new DSolve option IncludeSingularSolutions has been implemented in Mathematica 13.1. With this option, the singular solutions of all three examples can be easily found now.

First example:

DSolve[y[x] - y'[x] x - y'[x]^2 == 0, y[x], x, IncludeSingularSolutions -> True]

result

Second example:

ode = 1 + y'[x]^2 == 1/y[x]^2;
DSolve[ode, y[x], x, IncludeSingularSolutions -> True]

result

Third example:

ode = y'[x]^2 == 4 y[x];
DSolve[ode, y[x], x, IncludeSingularSolutions -> True]

result

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.