Rename *ll* and *ul* to ll and ul in defint
[maxima.git] / share / diffequations / desoln.mac
blob6e0bd0960ba7376d837d512b24d2b39852ffe428
1 /* -*- Mode: MACSYMA; Package: CL-MAXIMA -*- */
3 load(pwilt);
5 desolve(eqns,vars):=block([teqns,tvars,ovar,lvar,flag,dispflag],
6         modedeclare(flag,boolean),
7         flag:false,
8         if not listp(vars) then (eqns:[eqns], vars:[vars], flag:true),
9         if length(ovar:vars[1])#1 then
10                 error(ovar,"contains more than one independent variable."),
11         ovar:inpart(ovar,1),dispflag:false,
12         teqns:map(lambda([z],laplace(z,ovar,lvar)),eqns),
13         tvars:map(lambda([z],'laplace(z,ovar,lvar)),vars),
14         /* if not freeof(nounify('diff),teqns) then return(false), */
15         teqns:errcatch(solve(teqns,tvars)),
16         if teqns=[] or teqns=[[]] 
17           then error("desolve can't handle this case.")
18           else teqns:first(teqns),
19         if flag#true then teqns:first(teqns),
20         teqns:map(lambda([z],pwilt(z,lvar,ovar)),teqns),
21         if flag and length(tvars)=1 then teqns[1] else teqns)$