6.70 Assume not handled (24.10.96)

6.70.1 Stephen M. Carr
6.70.2 Robert Israel

6.70.1 Stephen M. Carr

I’m forwarding this to the MUG from a local professor, for comments. The following shows some annoying behaviour in both R.3 and R.4., at least from a pedagogical perspective. While exp(-infinity) is nicely evaluated to zero by Maple, multiply the argument by an assumed postive constant and the exp is no longer evaluated. Any reasonable work-arounds or other comments about how to make Maple a little "smarter" about this?

Symbolic Evaluation of Limits at Infinity 
G.D. Stubley 
Mechanical Engineering Department 
University of  Waterloo 
Waterloo, ON, N2L 3G1 
email: stubley@sunwise.uwaterloo.ca
 

First example works as expected. In this short sample file we consider the application of boundary conditions at large values (infinite) of the independent variable in solutions to differential equations. As an example problem, let’s say that the general solution to the differential equation is:

> restart: 
> f := x -> c1*exp(-x) + c2*exp(+x); 
 
                   f := x -> c1 exp(-x) + c2 exp(x)
 

where c1 and c2 are constants to be determined. For this example assume that the boundary condtions are:

> bc1 := f(0) = 1; 
 
                          bc1 := c1 + c2 = 1 
and 
 
> bc2 := f(infinity) = 0; 
 
                     bc2 := c2 exp(infinity) = 0
 

Notice how the limit of exp(-infinity) is correctly set to 0 so that bc2 can be readily solved for c2.

> c2:=solve(bc2,c2); 
 
                               c2 := 0
 

This value for c2 is now substituted into bc1 which is solved for c1 which gives the expected final result for f(x).

> bc1 := subs(c2=c2,bc1); 
 
                            bc1 := c1 = 1 
 
> c1 := solve(bc1,c1); 
 
                               c1 := 1 
 
> f(x); 
 
                               exp(-x)
 

Second example illustrating the issue at hand. Now let’s consider a second example that differs only in that the argument of the exponential functions is

> Omega * x
 

where Omega is a positive real constant. Notice how we assume and check that Omega is a positive real number.

> restart: 
> assume(Omega,real); 
> additionally(Omega > 0); 
> additionally(Omega < 1.0e+50); 
> about(Omega); 
Originally Omega, renamed Omega~: 
  is assumed to be: RealRange(Open(0),Open(.10e51)) 
> f := x -> c1*exp(-Omega*x) + c2*exp(+Omega*x); 
 
             f := x -> c1 exp(-Omega x) + c2 exp(Omega x)
 

where c1 and c2 are constants to be determined. It is curious that Omega is not renamed Omega ~ ~ in this expression. Again assume that the boundary conditions are:

> bc1 := f(0) = 1; 
 
                          bc1 := c1 + c2 = 1 
and 
 
> bc2 := f(infinity) = 0; 
 
    bc2 := c1 exp(-Omega~ infinity) + c2 exp(Omega~ infinity) = 0
 

Notice how the limit of exp(-Omega*infinity) is not set to 0 so that bc2 is not readily solved for c2.

> c2:=solve(bc2,c2); 
 
                           c1 exp(-Omega~ infinity) 
                   c2 := - ------------------------ 
                             exp(Omega~ infinity)
 

This gets uglier when c2 is substituted into bc1 which is then solved for c1 to give the unnecessarily complicated final result for f(x).

> bc1 := subs(c2=c2,bc1); 
 
                           c1 exp(-Omega~ infinity) 
               bc1 := c1 - ------------------------ = 1 
                             exp(Omega~ infinity) 
 
> c1 := solve(bc1,c1); 
 
                            exp(Omega~ infinity) 
        c1 := - --------------------------------------------- 
                -exp(Omega~ infinity) + exp(-Omega~ infinity) 
 
> f(x); 
 
       exp(Omega~ infinity) exp(-Omega~ x) 
- --------------------------------------------- 
  -exp(Omega~ infinity) + exp(-Omega~ infinity) 
 
            exp(-Omega~ infinity) exp(Omega~ x) 
     + --------------------------------------------- 
       -exp(Omega~ infinity) + exp(-Omega~ infinity)
 

Does this simplify when we Omega an actual value?

> f := subs(Omega = 2,f(x)); 
 
f := 
 
          exp(infinity) exp(-2 x) 
    - ------------------------------- 
      -exp(infinity) + exp(-infinity) 
 
           exp(-infinity) exp(2 x) 
     + ------------------------------- 
       -exp(infinity) + exp(-infinity) 
 
> f := unapply(simplify(%),x); 
 
                         f := x -> exp(-2 x)
 

While it is reassuring that everything works out OK in the end when actual values are substituted, it does seem that some of the symbolic nature of the solution has been lost.

To my simple way of thinking I would have expected the second example to unfold just as the first example did. What has gone wrong?

6.70.2 Robert Israel

From a pedagogical perspective, I think it’s better to make the user a little smarter. First, instead of evaluating a function "at" x = -infinity you should be taking a limit as x -> -infinity, which is really what is going on.

Unfortunately, this doesn’t go completely smoothly either:

> assume(Omega > 0); 
> f:= x -> c1*exp(-Omega*x) + c2*exp(+Omega*x); 
> bc1:= f(0) = 1; 
> bc2:= limit(f(x), x=infinity) = 0; 
 
                      bc1 := c1 + c2 = 1 
 
                 bc2 := signum(c2) infinity = 0
 

And Maple can’t solve this for c2.

> solve(bc2, c2); 
 
                       RootOf(signum(_Z))
 

So it’s up to the user to recognize that this means \(c2 = 0\). The Maple user still requires some mathematical knowledge. This is not necessarily a bad thing...