# Maple Lab Test Solutions

Topics: Integral, Derivative, Calculus Pages: 8 (1371 words) Published: September 30, 2012
> #

Ho's Maple Lab Test Solution: Semester 1 2012
(1)

# Question 1; > evalf(100*sin(95),38); 68.326171473612098369957981656827095404 > # Queston 2; > f:=x->3*sin(1/4*x^4)-sin(3/4*x)^4;

(2) > # Find 1st derivative; > D(f); (3) > # Find turning/stationary point in the interval [1,2], 1st derivative expression = 0, 10 significant figures!; > evalf(fsolve(3*cos((1/4)*x^4)*x^3-3*sin((3/4)*x)^3*cos((3/4)*x)= 0,x=1..2),10); 1.562756908 (4) > # Find 2nd derivative at x= 1.562756908; 10 significant figures!; > evalf(D[1\$2](f)(1.562756908),10); (5) > # Remember to unassign variables/restart; > restart; > # Question 3; (same process as above) > f:=x-> 2^x + 2*cos(x); (6) > # Find 1st derivative; > D(f); (7) > # Find turning/stationary point in the interval [0,0.8], 1st derivative expression = 0, 10 significant figures!; > evalf(fsolve(2^x*ln(2)-2*sin(x)=0,x=0..0.8),10); 0.5201736748 (8) > # Find 2nd derivative at x= 0.5201736748; 10 significant figures! ; > evalf(D[1\$2](f)(0.5201736748),10); (9) > # Remember to unassign variables/restart; > restart; > # Question 4; > eqn := x^4 + x^2*(y-1)^2 + y^4 = 4; (10)

> # to find dy/dx; > implicitdiff(eqn,y,x); (11) > > > > > > # Question 5; # a) exp(x); # b) Pi; # c) infinity; # Note the above to evaluate the definite integral; int(exp(-x)*cos(1/4*x^2)/(4+x),x=0..infinity); (12) > # Remember, % means the previous result; 10 significant figures!; > evalf(%,10); 0.1778089225 (13) > # Remember to unassign variables/restart; > restart; # Question 6; # a) arctan(x); # b) Pi; # c) sqrt (-1) = I -> Note that this is the definition of complex numbers; > # Note the above to evaluate the definite integral; > int((2+2*x^5)/arctan(x),x=3..5); > > > > (14) > # Remember, % means the previous result; 10 significant figures!; > evalf(%,10); 3702.247623 (15) > # Remember to unassign variables/restart; > restart; > > > > > > # Question 7; # a) csc(x); # b) Pi; # c) exp(x); # Note the above to evaluate the definite integral; int(3*sec(x)/(2+exp(x^2)),x=0..1/4*Pi);

(16) > # Remember, % means the previous result; 10 significant figures!;

> evalf(%,10); 0.8118218567 > # Remember to unassign variables/restart; > restart; > > > > > > # Question 8; # a) arccot(x); # b) Pi; # c) infinity; # Note the above to evaluate the definite integral; int(cos(x/2)/(x^4+1*arccot(x)),x=-infinity..infinity); (18) > # Remember, % means the previous result; 10 significant figures!; > evalf(%,10); 1.484942350 (19) > # Remember to unassign variables/restart; > restart; > # Question 9; > # Product the sequence; > L:=product(2*k/(2*k+7),k=1..n); (20) > # Find the limit; > limit((n^(7/2))*L,n=infinity); (21) > # Remember to unassign variables/restart; > restart; > # Question 10; > # Sum the sequence; > L:=sum(1/(2*n+1/8*k),n=1..k); (22) > # Find the limit; > limit(L,k=infinity); (23) > # Remember to unassign variables/restart; > restart; > # Question 11; > # Assign p as the function of z; > p:=z->z^5+4*z^2-4*z-1; (24) (17)

(24) > # Find roots of the polynomial; NOTE: the square brackets are * important* because you need the rootlist to be in a list to apply the map function thereafter > rootlist:=[solve(p(z)=0)]; (25)

> # Find the numerical approximations for these roots; > map(evalf, rootlist); (26) > # Remember to unassign variables/restart; > restart; > # Question 12; > # Assign p as the function of z; > p:=z->z^5+z^4+4*z^3-1; (27) > # Find roots of the polynomial; NOTE: the square brackets are * important* because you need the rootlist to be in a list to apply the map function thereafter > rootlist:=[solve(p(z)=0)]; (28)

> # Find the numerical approximations for these roots; > S1:=map(evalf, rootlist); (29)

> # Find the arguments of the roots; > map(argument,S1); (30) > # OPTIONAL: Order this using a set (acending order) OR do this manually; > S2:={0., 1.81384413794955+0.*I, 2.07414608399337+0.*I, -2.07414608399337+0.*I, -1.81384413794955+0.*I}; (31) > # The answer is the one to the right, but they want...