Luento viikolla 4

Lv4mws 25.1.2000

Pinta-aloja

> restart:

> setoptions(scaling=constrained);

[Maple Math]

> x:=r*cos(phi);y:=r*sin(phi);

[Maple Math]

[Maple Math]

> r:=1+cos(phi);

[Maple Math]

> plot([x,y,phi=0..2*Pi]);

Voidaan piirtää suoraan polarplot - funktiolla .

> x:='x': y:='y':r:=1+cos(phi);

[Maple Math]

> polarplot(r,phi=0..Pi,scaling=constrained);# Ei tarvittaisi, scaling=..., kun tehtiin setoptions, mutta olkoon opetuksen vuoksi.

[Maple Math]

> ala:=1/2*int(r^2,phi=0..2*Pi);

[Maple Math]

> restart:setoptions(scaling=constrained); # Piti toistaa restartin jälkeen.

[Maple Math]

> x:=a*(t-sin(t));
y:=a*(1-cos(t));

[Maple Math]

[Maple Math]

> a:=2:

> plot([x,y,t=0..4*Pi]);

> a:='a':

> dx:=diff(x,t);
dy:=diff(y,t);

[Maple Math]

[Maple Math]

> 1/2*Int(x*dy-y*dx,t=0..2*Pi);

[Maple Math]

> value(%);

[Maple Math]

>

Tilavuuksia

> restart:with(plots):

Torus:

> x:=cos(phi)*(b+a*cos(t));
y:=sin(phi)*(b+a*cos(t));
z:=a*sin(t);

[Maple Math]

[Maple Math]

[Maple Math]

> a:=1/2:b:=2:

> phi:=0: plot([x,z,t=0..2*Pi],-(a+b)..a+b,scaling=constrained);

Tämä ympyrä, kun pyörähtää z-akselin ympäri, syntyy tällainen pinta, torus : (Kannattaa tarttua hiirellä ja vähän pyöritellä.)

> phi:='phi':

> plot3d([x,y,z],phi=0..2*Pi,t=0..2*Pi,scaling=constrained);

> plot3d([x,y,z],phi=0..4*Pi/3,t=0..Pi,scaling=constrained,axes=none);

>

>

Taylorin lause

> restart:p5:=sum((D@@k)(f)(x0)*(x-x0)^k/k!,k=0..5);

[Maple Math]
[Maple Math]
[Maple Math]

> P:=n->sum((D@@k)(f)(x0)*(x-x0)^k/k!,k=0..n);

[Maple Math]

> f:='f':taylor(f(x),x=a,5);

[Maple Math]
[Maple Math]

> Q:=convert(%,polynom);

[Maple Math]
[Maple Math]

> x0:=0:f:=sin;P(7);

[Maple Math]

[Maple Math]

> plot([sin(x),P(1),P(3),P(5)],x=-Pi..Pi);

> f:=x->exp(-x)*sin(x);x0:=0;P(7);

[Maple Math]

[Maple Math]

[Maple Math]

> plot([f(x),P(1),P(2),P(3),P(4),P(5)],x=0..2);

> seq(evalf(3/(n+1)!),n=1..10);

[Maple Math]
[Maple Math]
[Maple Math]

> f:=x->exp(-x^2);

[Maple Math]

> plot((D@@10)(f),0..1);

> (D@@10)(f)(0);

[Maple Math]

> P(10);

[Maple Math]

>