ForClassA13_2.mws
Thu Oct 13 12:59:07 MDT 2005
| > | restart; |
| > | ######################################### |
# A #############################################
| > | eq := x^2 - y^2 = 7^2 - 3^2; |
| > | f := x -> eq; |
| > | f(1); f(2); f(3); f(4); |
| > | ################################## |
| > | f := x -> x^2 - y^2 = 7^2 - 3^2; |
| > | f(1); f(2); f(3); f(4); |
| > | f := (x,y) -> eq; |
| > | f(2,1); |
| > | f := unapply(eq, x,y); |
| > | f(1,2); |
| > | GIGO |
| > |
| > |
Warning, premature end of input
# B #############################################
| > | #Graph of the white-board function |
| > | f := x -> exp(-3*x) - arctan(x); |
| > | f(0); |
| > | f(ln(2)); evalf(%); |
| > | plot(f, -10..10, -10..10); |
# C ###############################################
| > |
| > |
| > | f := x -> (1/4)*(x^3-3/2*x^2-6*x+2); XRG := -2..10; |
| > | YRG := XRG; |
| > | fp := D(f); |
| > | fp(0); |
| > | fpp := D(fp); (D@@2)(f); |
| > | plot([f,fp,fpp],XRG, YRG,colour=[black,red,blue]); |
| > | fsolve( fp(x)=0, x=0..10); |
# D #############################################################
| > | g := x -> (1+2/x)^x; # For Positive x Values |
| > | plot(g, 0..5280); |
Maybe a horizontal asymptote:
| > | Limit( g(x), x=infinity); |
| > | HA := value(%); evalf(HA); |
| > | plot([g, HA], 0..50); |
# E ##########################################################
| > |
| > | f := x -> (x^2 - 3)/x^3; f(sqrt(3)); |
| > | fp := D(f); fpp := D(fp); |
| > | plot([f,fp,fpp], -4..4, -2..2, colour=[black,red,blue]); |
# F ###########################################################
| > | with(RealDomain); MATH 147 & MATH 170 |
Warning, these protected names have been redefined and unprotected: Im, Re, ^, arccos, arccosh, arccot, arccoth, arccsc, arccsch, arcsec, arcsech, arcsin, arcsinh, arctan, arctanh, cos, cosh, cot, coth, csc, csch, eval, exp, expand, limit, ln, log, sec, sech, signum, simplify, sin, sinh, solve, sqrt, surd, tan, tanh
| > | f := x -> 3/5*x^(5/3) - 3*x^(2/3): f(t); |
| > | #fp := D(f); fp(t); |
| > | fpexp := diff( f(x), x); |
| > | fp := unapply(fpexp, x); |
| > | plot([f,fp]); |
| > | f(-1); We expect f(-1) = -18/5 |
| > | evalf(%); |
| > |