# DSolve & Wolfram|Alpha miss ODE solution?

**URL:** <https://community.wolfram.com/t/dsolve-wolfram-alpha-miss-ode-solution/20187>\
**Category:** Questions\
**Tags:** wolfram-alpha, calculus, equation-solving\
**Created:** [June 21, 2022, 5:19pm UTC](https://community.wolfram.com/t/dsolve-wolfram-alpha-miss-ode-solution/20187 "2022-06-21T17:19:27Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![volmike](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@volmike](https://community.wolfram.com/u/volmike)\
**Post date:** [June 21, 2022, 5:19pm UTC](https://community.wolfram.com/t/dsolve-wolfram-alpha-miss-ode-solution/20187/1 "2022-06-21T17:19:27Z")

</div>

While solving ODE `x^2*y'''[x] == (y''[x])^2`, DSolve and Wolfram|Alpha miss the solution `y(x)=(x^3)/ 6 + c1*x + c2`:

> **[x^2\*y'''\[x\] == (y''\[x\])^2 - Wolfram|Alpha](https://www.wolframalpha.com/input?i=x%5E2*y%27%27%27%5Bx%5D+%3D%3D+%28y%27%27%5Bx%5D%29%5E2)**
>
> Wolfram|Alpha brings expert-level knowledge and capabilities to the broadest possible range of people—spanning all professions and education levels.

Any idea why Wolfram|Alpha & DSolve lose the solution above?

---

<div class="post-metadata">

**Author:** ![njeromin](https://avatars.discourse-cdn.com/v4/letter/n/71c47a/32.png) [@njeromin](https://community.wolfram.com/u/njeromin)\
**Post date:** [June 21, 2022, 7:11pm UTC](https://community.wolfram.com/t/dsolve-wolfram-alpha-miss-ode-solution/20187/2 "2022-06-21T19:11:05Z")

</div>

This is a third order ODE. Shouldn’t it have three integration constants?

---

<div class="post-metadata">

**Author:** ![hdolhaine](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/hdolhaine/32/35924_2.png) [@hdolhaine](https://community.wolfram.com/u/hdolhaine)\
**Post date:** [June 21, 2022, 10:17pm UTC](https://community.wolfram.com/t/dsolve-wolfram-alpha-miss-ode-solution/20187/3 "2022-06-21T22:17:25Z")

</div>

Why? Good question? Because things are sometimes full of surprises?

```
dgl = D[y[x], x]^2 - x D[y[x], x] + y[x] == 0
lsg = DSolve[dgl, y[x], x][[1, 1]]
dgl /. {y[x] :> x^2/4, y'[x] :> x/2}

```

Two totally different solutions…  
Why doesn’t Mathematica find the solution (x^4) /2 ?

---

<div class="post-metadata">

**Author:** ![mroge02](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mroge02/32/28775_2.png) [@mroge02](https://community.wolfram.com/u/mroge02)\
**Post date:** [June 21, 2022, 11:51pm UTC](https://community.wolfram.com/t/dsolve-wolfram-alpha-miss-ode-solution/20187/4 "2022-06-21T23:51:33Z")

</div>

Sometimes it’s worth looking at what happens as the parameters approach the boundaries of their domains. For instance, the `DSolve` result, `C[1]` cannot be `0`. But the limit of the `DSolve` solution as `C[1] -> 0` yields the desired solution:

```
Limit[x/C[1]^2 - x^2/(2 C[1]) + C[2] + 
  x C[3] + ((1 - x C[1]) Log[1 - x C[1]])/C[1]^3, C[1] -> 0]

(* x^3/6 + C[2] + x C[3] *)

```

---

<div class="post-metadata">

**Author:** ![volmike](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@volmike](https://community.wolfram.com/u/volmike)\
**Post date:** [June 22, 2022, 6:50am UTC](https://community.wolfram.com/t/dsolve-wolfram-alpha-miss-ode-solution/20187/5 "2022-06-22T06:50:04Z")

</div>

Thanks for approach!

---

<div class="post-metadata">

**Author:** ![volmike](https://avatars.discourse-cdn.com/v4/letter/v/ea666f/32.png) [@volmike](https://community.wolfram.com/u/volmike)\
**Post date:** [June 22, 2022, 7:03am UTC](https://community.wolfram.com/t/dsolve-wolfram-alpha-miss-ode-solution/20187/6 "2022-06-22T07:03:21Z")

</div>

As Michael Rogers mentioned below, this solution occurs when c[1]-\>0, thus, it has 2 constants.

---

<div class="post-metadata">

**Author:** ![njeromin](https://avatars.discourse-cdn.com/v4/letter/n/71c47a/32.png) [@njeromin](https://community.wolfram.com/u/njeromin)\
**Post date:** [June 22, 2022, 4:36pm UTC](https://community.wolfram.com/t/dsolve-wolfram-alpha-miss-ode-solution/20187/7 "2022-06-22T16:36:51Z")

</div>

Yes, it has 2 constants.

However, it is not the general solution but a special case. I expect Mma to give the general solution. At least to me, your original question suggested that your solution is the general one. I just wanted to express that I do not believe that this can be the correct (general) solution.

---

<div class="post-metadata">

**Author:** ![mroge02](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/mroge02/32/28775_2.png) [@mroge02](https://community.wolfram.com/u/mroge02)\
**Post date:** [June 22, 2022, 11:08pm UTC](https://community.wolfram.com/t/dsolve-wolfram-alpha-miss-ode-solution/20187/8 "2022-06-22T23:08:56Z")

</div>

Hi Hans,

I will note that there are two ways that `DSolve` (currently) can miss solutions assuming the problem is generally solvable, or at least two ways I know. The OP’s example shows one way, and your example shows the other way.

In the OP’s example, the general solution is “generic”; that is, it is missing a component of its boundary (in a suitable function space), which may be found by taking a limit (`C[1] -> 0` in this case, but `C[..] -> Infinity` seems more common in my experience).

The other way is when there is a disconnected component, and in the case of a Clairaut equation like yours, it is traditional to call it the “singular solution,” which you probably know already. This is solution is not contain in the general solution or its limiting boundary (in function space), although it is the envelope of the general solution (in the xy plane). As you also may know, one can derive the singular solution without integration.

Here, as a supplement to `DSolve`, is a function for deriving singular solutions. It comes from a differential equations package I wrote; the function may also be found [here](https://mathematica.stackexchange.com/a/89385/4999):

```
singularSolve[de_Equal, form : y_[x_] | y_, x_] := 
 Module[{p, q, u, fn, rads, a, b, ode, discriminant}, 
  fn = de /. {y[x] -> y, y'[x] -> p, Equal -> Subtract};
  rads = DeleteDuplicates@Cases[fn, Power[a_, b_Rational], Infinity];
  ode = First@
    GroebnerBasis[
     Flatten@{fn /. Power[a_, b_Rational] :> u[a, b], 
       rads /. Power[a_, b_Rational] :> 
         u[a, b]^Denominator[b] - a^Numerator[b]}, 
     rads /. Power[a_, b_Rational] :> u[a, b]];
  discriminant = Solve[{ode == 0, D[ode, p] == 0}, {y}, {p}];
  Pick[Which[
      MatchQ[form, y[x]], {y[x] -> (y /. #)}, 
      MatchQ[form, y], {y -> Function @@ {{x}, y /. #}}, 
      True, # /. p -> y'[x]] & /@ discriminant, 
   TrueQ@Simplify[ode == 0 /. Flatten@{#, p -> D[y /. #, x]}] & /@ 
    discriminant]];

singularSolve[dgl, y[x], x]

```

> ```
> (* {{y\[x\] -> x^2/4}} *)
> 
> ```

The system for the envelope is given by the ODE and its partial derivative with respect to `y'` (Clairaut’s equation admits a simpler approach). The ode `dgl` is written in the function in terms of `p = y'[x]`, and the system to solve, eliminating `p`, is the following:

```
{p^2 - p x + y == 0, 2 p - x == 0}

```

---

<div class="post-metadata">

**Author:** ![gianlucagorni](https://avatars.discourse-cdn.com/v4/letter/g/ec9cab/32.png) [@gianlucagorni](https://community.wolfram.com/u/gianlucagorni)\
**Post date:** [June 23, 2022, 10:04am UTC](https://community.wolfram.com/t/dsolve-wolfram-alpha-miss-ode-solution/20187/9 "2022-06-23T10:04:31Z")

</div>

According to Live CEOing Ep 591, a new option called `SingularSolutions` is coming for `DSolve`. Hopefully it will take care of this example too.

---

<div class="post-metadata">

**Author:** ![hdolhaine](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/hdolhaine/32/35924_2.png) [@hdolhaine](https://community.wolfram.com/u/hdolhaine)\
**Post date:** [June 23, 2022, 4:13pm UTC](https://community.wolfram.com/t/dsolve-wolfram-alpha-miss-ode-solution/20187/10 "2022-06-23T16:13:40Z")

</div>

@Michael

> As you also may know, one can derive the singular solution without integration.  
> Blockquote

No, I didn’t know that.
