7.51 bug in dsolve with initial condition in Maple 6 (29.6.00)

7.51.1 Federico Rocchi

I have a problem with dsolve. I’m using version 6 under Windows 98. I’d like to solve the following simple equation:

> restart; 
> eq:=diff(f1(T),T)+diff(f0(T),T)=-k*f1(T); 
> dsolve({eq},f1(T)); 
 
        f1(T) = (Int(-diff(f0(T),T)*exp(k*T),T)+_C1)*exp(-k*T)
 

This solution seems indeed correct. I’d like now to impose the initial condition f1(T0)=0; the command

> dsolve({eq,f1(T0)=0},f1(T));
 

fails to give the answer; I waited about 20 minutes and then interrupted the calculation. Even if I understand that Maple doesn’t know the form of f0(T) I’d like at least to have the symbolic result f1(T) cast in the following form:

exp(-k*T)*(intat(exp(k*x)*diff(f0(x),x),x=T0) 
           -intat(exp(k*x)*diff(f0(x),x),x=T)
 

or other equivalent forms.

Am I missing anything, making errors in Maple or in the math? Or is there a bug?

7.51.2 Edgardo S. Cheb-Terrab (15.7.00)

The ODE problem you are showing is indeed easy and Maple’s failure is unexpected. Both the root of the failure and a workaround are as follows.

    > eq:=diff(f1(T),T)+diff(f0(T),T)=-k*f1(T); 
 
                       eq := f1' + f0' = -k f1
 

So: your unknown is f1(x). You also have the "derivative" of f0 - an unknown function somehow parameterizing your problem. The workaround is: represent f0'(x) as g0(x) (that is: not as a derivative):

    > diff(f1(T),T) + g0(T) = -k*f1(T); 
 
                         f1' + g0(T) = -k f1 
 
    > dsolve( { %, f1(T0)=0 }, f1(T) ); 
 
                        T 
                       / 
                      | 
                f1 =  |   -f0(u) exp(k u) du exp(-k T) 
                      | 
                     / 
                       T0
 

The answer above is correct. Now, where is the root of Maple’s failure? Try debug(limit) and you will see it. To compute the solution above, dsolve calls limit (this is reasonable), and when doing that with your original "eq", limit receives:

    > exp(-k*T)*(Int(-diff(f0(u),u)*exp(k*u),u = T0 .. T)+_C[1]); 
 
           /   T                                \ 
           |  /                                 | 
           | |    /d       \                    | 
           | |   -|-- f0(u)| exp(k u) du + _C[1]| exp(-k T) 
           | |    \du      /                    | 
           |/                                   | 
           \  T0                                / 
 
    > limit( %, T = T0);
 

In above, because of a bug, limit enters an infinite loop (routines below limit get into confusion due to the presence of a derivative in the integrand).

Of course this confusion below limit should not happen - a derivative in the integrand should not be a problem. Anyway, that is why the workaround consists of "avoid that derivative in your original eq, for instance representing diff(f0(T),T) by g0(T)".