6.73 assume, help needed (22.2.99)

6.73.1 Kiat Huang

I’m using xmaple-VR5 on an Alpha DEC and I have the following recurring problem.

Once I do

> assume( A > 1/4 , L > 0 );

say which makes a particular ode possess complex eigenvectors,

> ode:= A*diff(u(x),x$4) + diff(u(x),x$2) + u(x) - 1 = 0;

then once I solve for the boundary conditions for the constants _Ci (produced by dsolve) and substitute back into the solution, using unapply, u(A,L,x) Maple is unable (or at least unwilling) to allow me to substitue for A or L. i.e.

> u(B,T,x);

produces the output u(A,L,x) for any B,T.

I’ve tried unassign and A:='A' but to no avail.

6.73.2 Helmut Kahovec (5.3.99)

At each assumption Maple generates a local name usually printed with a tilde. The original variable is assigned that local name and must not be assigned any other value explicitly.

If you want to assign that local variable a specific value then you have to use assign() with the original variable, though. assign() evaluates its arguments and thus assigns in fact the local variable that specific value. For more see online help or [1].

Anyway, I’d solve your problem as follows:

> restart; 
> assume(A>1/4,L>0);

IMO it’s not necessary to make assumptions about L.

> ode:=A*diff(u(x),x$4)+diff(u(x),x$2)+u(x)-1=0; 
                     / 4      \   / 2      \ 
                     |d       |   |d       | 
           ode := A~ |--- u(x)| + |--- u(x)| + u(x) - 1 = 0 
                     |  4     |   |  2     | 
                     \dx      /   \dx      / 
> sol:=dsolve({ode},{u(x)});

You didn’t tell us your specific boundary conditions, so let’s assume the following equations eq1, eq2, ... for example. Note the order of substituting into \(u(x)\):

> eq1:=eval(subs(sol,x=0,u(x)))=0; 
                 eq1 := 1 + _C1 + _C2 + _C3 + _C4 = 0 
> eq2:=eval(subs(sol,x=L,u(x)))=0; 
> eq3:=_C3=0; 
                            eq3 := _C3 = 0 
> eq4:=_C4=0; 
                            eq4 := _C4 = 0 
We don't want to have RootOf expressions in the solution: 
> _EnvExplicit:=true; 
                         _EnvExplicit := true 
> s:=solve({eq.(1..4)},{_C.(1..4)});

Let’s take the first set of s, substitute sol and s[1] into u(x) (in that order), simplify the expression, and establish \(u1()\) as a function of \(A,L,x\). Note that we do not call the solution function \(u\) since \(u(x)\) should remain an unevaluated function call:

> u1:=unapply(simplify(subs(sol,s[1],u(x)),symbolic),A,L,x);

Note that the formal parameters \(A,L,x\) of the solution function \(u1\) are different from A~,L~,x in earlier expressions. Now you get:

> u1(B,T,x);

You may repeat the last two steps for the remaining three sets s[2], s[3], and s[3] of s.


[1] Andre Heck, "Introduction to Maple" 2nd ed., Springer Verlag 1996, pp. 87-91