ForClassA13_2.mws

ForClassA13_2.mws
Thu Oct 13 12:59:07 MDT 2005

>    restart;

>    #########################################

# A #############################################

>    eq := x^2 - y^2 = 7^2 - 3^2;

eq := x^2-y^2 = 40

>    f := x -> eq;

f := proc (x) options operator, arrow; eq end proc

>    f(1); f(2); f(3); f(4);

x^2-y^2 = 40

x^2-y^2 = 40

x^2-y^2 = 40

x^2-y^2 = 40

>    ##################################

>    f := x -> x^2 - y^2 = 7^2 - 3^2;

f := proc (x) options operator, arrow; x^2-y^2 = 40 end proc

>    f(1); f(2); f(3); f(4);

1-y^2 = 40

4-y^2 = 40

9-y^2 = 40

16-y^2 = 40

>    f := (x,y) -> eq;

f := proc (x, y) options operator, arrow; eq end proc

>    f(2,1);

x^2-y^2 = 40

>    f := unapply(eq, x,y);

f := proc (x, y) options operator, arrow; x^2-y^2 = 40 end proc

>    f(1,2);

-3 = 40

>    GIGO

>   

>   

Warning, premature end of input

# B #############################################

>    #Graph of the white-board function

>    f := x -> exp(-3*x) -  arctan(x);

f := proc (x) options operator, arrow; exp(-3*x)-arctan(x) end proc

>    f(0);

1

>    f(ln(2));  evalf(%);

1/8-arctan(ln(2))

-.4811119348

>    plot(f, -10..10, -10..10);

[Maple Plot]

# C ###############################################

>   

>   

>    f := x -> (1/4)*(x^3-3/2*x^2-6*x+2);  XRG := -2..10;

f := proc (x) options operator, arrow; 1/4*x^3-3/8*x^2-3/2*x+1/2 end proc

XRG := -2 .. 10

>    YRG := XRG;

YRG := -2 .. 10

>    fp := D(f);

fp := proc (x) options operator, arrow; 3/4*x^2-3/4*x-3/2 end proc

>    fp(0);

-3/2

>    fpp := D(fp);  (D@@2)(f);

fpp := proc (x) options operator, arrow; 3/2*x-3/4 end proc

proc (x) options operator, arrow; 3/2*x-3/4 end proc

>    plot([f,fp,fpp],XRG, YRG,colour=[black,red,blue]);

[Maple Plot]

>    fsolve( fp(x)=0, x=0..10);

2.000000000

# D #############################################################

>    g := x -> (1+2/x)^x;   # For Positive x Values

g := proc (x) options operator, arrow; (1+2/x)^x end proc

>    plot(g, 0..5280);

[Maple Plot]

Maybe a horizontal asymptote:

>    Limit( g(x), x=infinity);

Limit((1+2/x)^x,x = infinity)

>    HA := value(%); evalf(HA);

HA := exp(2)

7.389056099

>    plot([g, HA], 0..50);

[Maple Plot]

# E ##########################################################

>   

>    f := x -> (x^2 - 3)/x^3;  f(sqrt(3));

f := proc (x) options operator, arrow; (x^2-3)/x^3 end proc

0

>    fp := D(f);  fpp := D(fp);

fp := proc (x) options operator, arrow; 2/x^2-3*(x^2-3)/x^4 end proc

fpp := proc (x) options operator, arrow; -10/x^3+12*(x^2-3)/x^5 end proc

>    plot([f,fp,fpp], -4..4, -2..2, colour=[black,red,blue]);

[Maple Plot]

# 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

[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...
[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...
[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...

>    f := x -> 3/5*x^(5/3) - 3*x^(2/3): f(t);

3/5*signum(t)^5*abs(t)^(5/3)-3*signum(t)^2*abs(t)^(2/3)

>    #fp := D(f);  fp(t);  

>    fpexp := diff( f(x), x);

fpexp := 3*signum(x)^4*abs(x)^(5/3)*signum(1,x)+signum(x)^5*abs(x)^(2/3)*abs(1,x)-6*signum(x)*abs(x)^(2/3)*signum(1,x)-2*signum(x)^2/abs(x)^(1/3)*abs(1,x)
fpexp := 3*signum(x)^4*abs(x)^(5/3)*signum(1,x)+signum(x)^5*abs(x)^(2/3)*abs(1,x)-6*signum(x)*abs(x)^(2/3)*signum(1,x)-2*signum(x)^2/abs(x)^(1/3)*abs(1,x)

>    fp := unapply(fpexp, x);

fp := proc (x) options operator, arrow; 3*signum(x)^4*abs(x)^(5/3)*signum(1,x)+signum(x)^5*abs(x)^(2/3)*abs(1,x)-6*signum(x)*abs(x)^(2/3)*signum(1,x)-2*signum(x)^2/abs(x)^(1/3)*abs(1,x) end proc
fp := proc (x) options operator, arrow; 3*signum(x)^4*abs(x)^(5/3)*signum(1,x)+signum(x)^5*abs(x)^(2/3)*abs(1,x)-6*signum(x)*abs(x)^(2/3)*signum(1,x)-2*signum(x)^2/abs(x)^(1/3)*abs(1,x) end proc

>    plot([f,fp]);

[Maple Plot]

>    f(-1);   We expect f(-1) = -18/5

-18/5

>    evalf(%);

-3.600000000

>