# Anthony Zaleski. Math 640 HW1. 24 Jan 2014. #### 1. Some examples from the Maple booklet: (* #I turned all the command line stuff into a comment since otherwise I got an error when #reading this file into Maple. Is there a better way to write this up? p:=x^2+5*x+6; p := x^2+5*x+6: factor (p); (x+3)*(x+2) q:= x/abs(x); q := x/abs(x): assume (x>0): simplify(q); 1 x='x': readlib('rationalize'): q:= 1/(1+sqrt(x)): rationalize(%); (-1+x^(1/2))/(-1+x) subs(x=0, q); 1 solve(sin(z)=0, z); 0 solve(sin(z)= cos(z), z); (1/4)*Pi isprime(42); false ifactor(42); ``(2)*``(3)*``(7) gcd(42, floor(Pi*10^10))*6; 42 *) #### 2. Extending the M and K functions to work in base B: Mbase:=proc(a,b,B) local d,a1,a2,b1,b2: if a