1340ShowB10.mws

1340ShowB10.mws
Thu Nov 10 13:42:07 MST 2005

>    restart; with(plots, display);

[display]

###############################################

Write a procedure to take a polynomial and an interval and plot the polynomial on the interval and give a list of the zeros for the polynomial on the interval.

>    EEE := proc(ff,XXX)
   description "Utah!";
   plot(ff,XXX);
   [fsolve( ff(t) = 0, t=XXX)];  
 end;

EEE := proc (ff, XXX) description
EEE := proc (ff, XXX) description
EEE := proc (ff, XXX) description
EEE := proc (ff, XXX) description

>   

>    EEE(w -> (w^2 - 5)*(w-3/2), 0..3);

[1.500000000, 2.236067977]

>    #2.236067977^2;

>   

>    FFF := proc(ff,XXX)
   description "Utah!";
   local P, Z;
   P := plot(ff,XXX);
   Z := [fsolve( ff(t) = 0, t=XXX)];
   return(P,Z, D(ff));
 end;

FFF := proc (ff, XXX) local P, Z; description
FFF := proc (ff, XXX) local P, Z; description
FFF := proc (ff, XXX) local P, Z; description
FFF := proc (ff, XXX) local P, Z; description
FFF := proc (ff, XXX) local P, Z; description
FFF := proc (ff, XXX) local P, Z; description
FFF := proc (ff, XXX) local P, Z; description

>   

>    #Z := 15; P := -3;

>    Pf, Zros, DDDD:= FFF(w -> (w^2 - 5)*(w-3/2), 0..3):

>    #Z; P; DDDD(u);

>    display(Pf);  Zros; DDDD(x);

[Maple Plot]

[1.500000000, 2.236067977]

2*x*(x-3/2)-5+x^2

>   

>    Pf, Zros, DDDD:= FFF(w -> w^4+9, -3..3):

>   

>    display(Pf);  Zros; DDDD(x);

[Maple Plot]

[]

4*x^3

########################################################

>    tyee := proc(N,K)
   local SS, n, k;
   SS := 0; n := N; k := K;
   while(k >= 0)
     do
       SS := SS + binomial(n,k);
       k := k - 1;
       #print(k);
     end do;
   return(SS);
end:

>   

>    x := tyee(4,4):

>    y := tyee(5,2):

>    x+y;

32

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

>    Sum( (-1)^k/(2*k+1), k = 0..infinity);

Sum((-1)^k/(2*k+1),k = 0 .. infinity)

>    value(%);

1/4*Pi

>    Sum( 1/k^2, k = 1..infinity);

Sum(1/(k^2),k = 1 .. infinity)

>    value(%);

1/6*Pi^2

>    ####################################################333

>    x := 'x';

x := 'x'

>    A := 1;  f := sqrt;

A := 1

f := sqrt

>    series( f(x), x=A, 5);

series(1+1/2*(x-1)-1/8*(x-1)^2+1/16*(x-1)^3-5/128*(x-1)^4+O((x-1)^5),x=-(-1),5)
series(1+1/2*(x-1)-1/8*(x-1)^2+1/16*(x-1)^3-5/128*(x-1)^4+O((x-1)^5),x=-(-1),5)

>    PPP := convert(%, polynom);

PPP := 1/2+1/2*x-1/8*(x-1)^2+1/16*(x-1)^3-5/128*(x-1)^4

>    display( plot(PPP, x=0..4), plot(f,0..4, color=BLACK));

[Maple Plot]

>   

>   

>