7.53 Bug in dsolve, Maple V.4 (24.5.96)

7.53.1 Alain Leroux

I found a bug in Maple V-4: when you use dsolve with initial conditions, and when there are two or more values of the constants that can be found, Maple gives just one solution. Example

> A:=A0*(1-ksi(t)):Equ:=diff(A,t)=-k*sqrt(A): 
 
> dsolve({Equ,ksi(0)=0},ksi(t)); 
 
                                     2  2             1/2 
                                    t  k  + 4 t k A0 
                    ksi(t) = - 1/4 ------------------- 
                                            A0
 

But there are two solutions.

The workaround for this bug is to patch the end of `dsolve/consts`:

... 
    csol := solve(eqns, consts); 
    if csol = NULL then NULL 
    else 
        csol:={csol}; 
        if nops(csol)=1 then 
             Solns := subs(op(csol), Solns); 
        else Solns := map(subs,csol,op(Solns)); 
        fi; 
 
                 if (type(solns, 'set') or type(Solns,`set`)) then 
RETURN({Solns}); 
                 else RETURN(Solns); 
                 fi 
    fi end:
 

But to use this patch, you must unprotect dsolve.

>unprotect(dsolve);with(libphys): 
 
> dsolve({Equ,ksi(0)=0},ksi(t)); 
 
                   2  2            1/2                 2  2            1/2 
                  t  k  + 4 t k A0                    t  k  - 4 t k A0 
 {ksi(t) = - 1/4 -------------------, ksi(t) = - 1/4 -------------------} 
                          A0                                  A0
 

The bug is removed with Maple V Release 5. (U. Klein)

7.53.2 Preben Alsholm (29.5.96)

There is indeed a bug in dsolve (R4), but the problem is not that only one solution is reported for the initial value problem given by Alain Leroux. The problem is that the wrong solution is reported!

The initial value problem has a unique solution (locally, - by the general theorem on uniqueness).

Consider the following two simplified versions:

equ1:=diff(x(t),t)=sqrt(1-x(t)): 
 
dsolve( {equ1, x(0)=0}, x(t)); 
 
                   x(t)= -1/4*t^2+t 
 
# This solution is correct 
 
equ2:= -diff(x(t),t)= -sqrt(1-x(t)): 
 
dsolve( {equ2, x(0)=0}, x(t)); 
 
                   x(t)= -1/4*t^2-t
 

The last solution is obviously incorrect, as equ2 is equivalent to equ1. That the correct solution can be joined with the constant solution \(x=1\) at \(t=2\) is irrelevant in this context.

7.53.3 Yuri Muzychka (4.6.96)

Try this one

\[ y(x)''+2/x y(x)' - m^2 y(x)=0 \]

the solution in R4 is mixed exponentials and hyperbolics. Go figure! Why not just return hyperbolics or exponentials as R2 and R3 did.