dharr

Dr. David Harrington

7518 Reputation

21 Badges

20 years, 210 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are answers submitted by dharr

To get the output written with primes, try with(PDEtools): declare(y(t), prime=t); diff(y(t),t)+3*y(t);
The mtaylor commnad can probably do what you want, but you want to be careful about what you mean by nonlinear terms.
f:=sin(x^2/(x^10+2))*exp(2*x); eval(diff(f,x$8),x=0); Note that you need exp(2*x) instead of e^(2*x).
Not quite clear what you want here; an example of your equation would help. What do you mean by an equation that is a function of x,y,t - because f(x,y,t) requires a 4-D plot. Or is it f(x,y,t)=0, or y=f(x,t)? The last ones can be done with a series of spacecurves, if I understand correctly what you want, e.g., with(plots):spacecurve({[cos(t),sin(t),0],[2*cos(t),2*sin(t),1],[3*cos(t),3*sin(t),3]},t=0..8*Pi,axes=boxed);
I think you don't want to differentiate with respect to the Lagrange multiplier. Also, you want things in terms of x, so solve for lambda, y, z rather than x, y, z. Then you get your hand calculated answer: > L:= x*y*z + lambda* (U - (10-x)*(10-y)*(10-z)): > solve( {diff(L, x)=0, diff(L,y)=0, diff(L,z)=0},{lambda,y,z} ); gives {lambda = 0, y = 0, z = 0}, {y = x, lambda = -x^2/(100-20*x+x^2), z = x} Cheers, David.
The DEplot command has arrows=arrowtype with arrowtype equal to 'SMALL', 'MEDIUM', 'LARGE', 'LINE', or 'NONE'. I tried this with fieldplot and it can do at least the 'LARGE' ones, though they are kind of clunky. Cheers, David.
Not sure which equations you want to solve here, but x*y*z gives empty plot for me (v 9.5)(presumably meaning x*y*z=0). For x*y*z=1 it works and two plots can be combined: implicitplot3d({x*y*z=1,(10-x)*(10-y)*(10-z)^2=1}, x=0..10,y=0..10,z=0..10);
Use a list of functions rather than a set, e.g., plot([x^2,x^3,x^4],x=0..1,legend=["x^2","x^3","x^4"]);
Interesting question. I'm not sure if this is the exact answer, but I'm guessing it relates back to the following example assume(z,real); type(z,real); #error - type real does not exist is(z,real); #true So in your more complicated example, the is(f,complex(extended_numeric) checks that both the real and imaginary parts of f are real and finds this to be the case, but type fails to find this because neither are of type real. Not sure why real wouldn't be a type though.
A bit low tech, and not using the units package deg:=evalf(180/Pi); #force floating point (like your calculator) sin(15*deg)
These are described in the help for "procedure". Here is an example that illustrates all but the lexical table: f:=proc(a)::numeric; local b,sq; global c; options arrow; description "I add c+2"; b:=2; a+b+c; end proc; c:=3; f(2):="yuk"; #add to remember table op(f); # body of procedure op(0,eval(f)); # type (= procedure) op(1,eval(f)); # argseq of formal parameters; op(2,eval(f)); # nseq of local variables; op(3,eval(f)); # nseq of options; op(4,eval(f)); # remember table op(5,eval(f)); # description string; op(6,eval(f)); # nseq of global variables; op(7,eval(f)); # Lexical table - NULL output here op(8,eval(f)); # return type
The printf command has many formatting options, but I don't think you can get the comma for the thousands separator.
Interesting - right clicking on the plot and choosing a style of patch with contour only puts contours on one of the plots. for (a) To get contours on both plots use style=PATCHCONTOUR for each plot, but this gives different contours for each plot. To get common contours, you can specify what the contours are: contourlist:=[seq(2*i,i=0..10)]; F:=plot3d( min(x,30*y), x=0..20, y=0..20,style=PATCHCONTOUR,contours=contourlist): G:=plot3d( min(20*x,y), x=0..20, y=0..20,style=PATCHCONTOUR,contours=contourlist): display({F,G},axes=boxed); I assume this works for the three plot case. Not sure about the convex thing ...
dsolve({diff(x(t),t,t) + 2*diff(x(t),t) + 5*x(t) = 3 , x(0)=0, D(x)(0)=0}); gives me the required answer
odeplot allows you to plot multiple plots on the same graph.
First 73 74 75 76 Page 75 of 76