After help from the experts on the Maxima list,
a "package function" diff1 (expr,u,z)
which takes an expression, the name of the dependent variable u,
and the name of the independent variable z , and produces a list
of solutions for dudz is given below. One can then extract the
expression wanted for a plot and use plot2d in its simplest
incarnation as shown.
I am using Xmaxima interface with display2d = false
since I find it easier to copy the output of Xmaxima into
a text file (without shifty exponents) and then insert it
into a mailing list message. A draw back is that instead
of dy/dx in 2d form, you get diff(y,x,1) but they mean the
same thing.
-----------------------------------------------------------
(%i1) display2d:false$
(%i2) diff1(expr,ydep,xindep) :=
block([dexpr],
depends(ydep,xindep),
dexpr : diff(expr,xindep),
apply('remove, [ ydep , 'dependency ] ),
solve (dexpr, 'diff (ydep,xindep)))$
(%i3) diff1(y+log(y)+x,y,x);
(%o3) ['diff(y,x,1) = -y/(y+1)]
(%i4) soln : %[1];
(%o4) 'diff(y,x,1) = -y/(y+1)
(%i5) soln : rhs(%);
(%o5) -y/(y+1)
(%i6) plot2d (soln,[y,-1.01,-0.99]);
plot2d: expression evaluates to non-numeric value somewhere in plotting
range.
(%o6) ""
--------------------------
The expression being plotted is singular at y = -1 and changes sign at the
same point. If solve produces a list of more than one solution, you can
use %o3[n] to extract the nth element of the solve list. A lot of
information
about plot2d is found in Ch. 2 of Maxima by Example.
An alternative approach is to use
soln : diff1(y+log(y)+x,y,x);
soln : soln[1];
soln : rhs (soln)
or combine all three steps as
soln : rhs (part (diff1(y+log(y)+x,y,x), 1));
The definition of diff1 given above has the drawback that
if the user has previously set depends(y,x) interactively, and
needs that dependency to remain over the course of the
work session, use of diff1 automatically removes that
dependency with no warning.
Ted