Common Maple TasksBelow are some common things we want to do in Maple- For example, how todefine expressions and functions, and how to plot these in Maple.1. To download and run a worksheet from the web: Use the right mousebutton on the link, and choose: Save link target as... In Maple,open the file as you would normally do in a Windows program.2. Be sure to save your worksheet often! You might have a problem whereMaple locks up- if you haven’t saved your worksheet, you could lose allyour work!3. Plot the function y = e−3xsin(2πx) over the interval −1 ≤ x ≤ 4. Adjustthe window size so that −2 ≤ y ≤ 2. The Maple commands:f:=exp(-3*x)*sin(2*Pi*x);plot(f,x=-1..4);plot(f,x=-1..4,y=-2..2);Notes:• The notation := is an “assignment” operator. In this case, we areassigning the expression to the letter f.• The mathematical function ef(x)is written in its functional form,exp(f(x)). If you want the number e, use exp(1)• The constant π in Maple must be written with a capital letter P .• The second plot command is how you can change the viewing window.• Remember that every line of Maple must end with a semi-colon.4. Plot the function f above together with sin(x) on the same axis:f:=exp(-3*x)*sin(2*Pi*x);g:=sin(x);plot({f,g},x=-1..4);Note that by clicking the mouse on the graph, you can change some of theaspects of the plot.5. Miscellaneous Algebra commands:• Expand the expression: (x − 2)(x − 3): expand((x-2)*(x-3));• Factor the polynomial: x3− 7x + 6: factor(x^3-7*x6)+• Write the fractionx2x+1in partial fraction form:convert( x^2/(x+1), parfrac, x);• Solve the e quation x2− 3x + 5 = 0 for x:1solve(x^2-3*x+5=0,x);• Solve the s ystem of equations 3a + 2b = 0, 2a − 4b = 1 for a, bsolve({3*a+2*b=0, 2*a+4*b=1},{a,b});6. Derivatives:• Have Maple compute the first and third derivative of the previouslydefined expression in f :df:=diff(f,x);d3f:=diff(f,x$3);• Have Maple compute∂f∂yif f (x, y) = x2y − sin(xy).f:=x^2*y-sin(x*y);dfdy:=diff(f,y);• If x2y − sin(xy) = 3, have Maple treat y perform implicit differenti-ation and solve for y0:Eqn:=x^2*y(x)-sin(x*y(x))=3;Eqn2:=diff(Eqn,x);solve(Eqn2, diff(y(x),x));7. Integrals: Have Maple compute the integralZbaf(x) dx. The genericMaple command is:int(f,x=a..b);For example,•Z∞11x2dx: int(1/x^2,x=1..infinity);• To get the generic antiderivative: int(1/x^2,x);• We can use the integral as a function: PlotZx0e−t2dt for −3 ≤ x ≤ 3F:=x->int(exp(-t^2),t=0..x);plot(F(x),x=-3..3);Note how we define a function versus an expression. Try evaluatingF (2) in Maple- To obtain a numerical approximation, use
View Full Document