8
$\begingroup$

Sometimes DSolve returns the same solution twice. In this example, it is y[x] -> 0.

Why does it do that? Should not all generated solutions be different?

I am using version 14.3 on Windows 10.

ode = (3*x^2*y[x]^3 + y[x]^4) + (3*x^3*y[x]^2 + y[x]^4 + 
       4*x*y[x]^3)*D[y[x], x] == 0;

DSolve[ode, y[x], x, IncludeSingularSolutions -> True] // Column

enter image description here

ps. I do not have init.m, this is actually new PC and I only have V 14.3 on it.

$\endgroup$
10
  • 3
    $\begingroup$ 14.3.0 returns just one y[x]->0. If you factor your ode you will see y[x]^2 as its factor. So it is a double root and that is probably why your version returns it twice which in later version was corrected. $\endgroup$ Commented 2 days ago
  • $\begingroup$ I cannot reproduce your results in 14.3.0 on Windows. Have you tried in fresh kernel? Do you have any additional stuff in your init.m? $\endgroup$ Commented 2 days ago
  • 1
    $\begingroup$ Same output with 14.3.0 on Mac $\endgroup$ Commented 2 days ago
  • $\begingroup$ @Domen strange you get different result on your windows. May be it is winodws version. I am on version 10. No init.m. Never used it. Updated screen shot also now. $\endgroup$ Commented 2 days ago
  • 3
    $\begingroup$ What you say is true. However, the problem is that this differential equation is not in a normal form. The equation can be decomposed into an algebraic equation y[x]=0 (a zeroth-order differential equation) and a first-order differential equation y'[x]-x=0. I should have given the example of : DSolve[y[x] (y'[x] - 1) == 0, y[x], x, IncludeSingularSolutions -> True]. $\endgroup$ Commented yesterday

1 Answer 1

8
$\begingroup$

A long comment that may describe enough of what DSolve[] is doing to be considered an answer:

I'll use a set of related examples in which the questionably "spurious" solution is nontrivial:

(* 1. Reduced diff.eq. *)
   DSolve[(y''[x] + y[x]) == 0, y[x], x]
      (*  {{y[x] -> C[1] Cos[x] + C[2] Sin[x]}}  *)
(* 2. With extra factor *)
   DSolve[(y[x] - Cos[x]) (y''[x] + y[x]) == 0, y[x], x]
      (*  {{y[x] -> Cos[x]}, 
           {y[x] -> C[1] Cos[x] + C[2] Sin[x]}}  *)
(* 3. With extra factor and sing.sol. *)
   DSolve[(y[x] - Cos[x]) (y''[x] + y[x]) == 0, y[x], x, 
    IncludeSingularSolutions -> True]
      (*  {{y[x] -> Cos[x]},
           {y[x] -> C[1] Cos[x] + C[2] Sin[x]}, 
           {y[x] -> Cos[x]}}   *)
(* 4. Just the algebraic factor *)
   DSolve[(y[x] - Cos[x]) == 0, y[x], x]
      (*  {{y[x] -> Cos[x]}}  *)
(* 5. Two DE factors, solns. of one contained in the other *)
   DSolve[(y'''[x] + y'[x]) (y''[x] + y[x]) == 0, y[x], x]
      (*  {{y[x] -> C[3] - C[2] Cos[x] + C[1] Sin[x]}, 
           {y[x] -> C[1] Cos[x] + C[2] Sin[x]}}  *)
(* 6. Repeated factors *)
   DSolve[(y''[x] + y[x])^2 == 0, y[x], x]
      (*  {{y[x] -> C[1] Cos[x] + C[2] Sin[x]}}  *)
   DSolve[(y[x] - Cos[x])^2 (y''[x] + y[x]) == 0, y[x], x]
      (*  {{y[x] -> Cos[x]}, 
           {y[x] -> C[1] Cos[x] + C[2] Sin[x]}}  *)
   DSolve[(y[x] - Cos[x])^2 == 0, y[x], x]
      (*  {{y[x] -> Cos[x]},
           {y[x] -> Cos[x]}}  *)

There are a couple things to discuss here: (1) What DSolve[] does with an algebriac (zeroth differential order) factor of an equation; and (2) what it does when IncludeSingularSolutions points to True.

Recently (I forget which version), DSolve[] no longer balks at zero-order equations, as can be seen in examples 2, 3, and 4. I infer it does not check whether the solutions of the algebraic equation can be expressed by the general solution(s) to the other factor(s). Indeed, example 5 shows that it does not compare solutions of distinct differential equation factors. Example 6 shows that repeated factors that include a DE are not solved with multiplicity, whereas the equation that has only a repeated algebraic factor is solved with multiplicity. Probably Solve[] is used on it. That's what DSolve[] seems to do when equations have factors.

I infer that IncludeSingularSolutions -> True invokes a separate process, whose solutions are included in addition to the ones obtained from the given equation. As with separate factors, DSolve[] does not check the singular solutions produced against the solutions produced from its normal method. DSolve[] (AFAIK) considers two types of "singular solutions", the classical solutions, Solve[NestList[D[#, p] &, F[x, y, p] == 0, 1], y], where F[x, y, p] == 0 is the given ODE, and limits of the general solutions (as the C[] parameters approach infinity as well as they approach zero; but not other limits, I think, so some solutions may be missed). The "extra" singular solution y[x] -> 0 in the OP is of the first type. It occurs, as @azerbajdzan and @A.Kato have observed, because of the y[x]^2 factor in F[x, y[x], y'[x]] corresponding to the ODE in the OP.

$\endgroup$

Your Answer

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.