Harj. 5, ratkaisuja ti

21.3.2000

Tiistai 21.3.

> with(plots):

> plot(x,x=0..1,filled=true);

[Maple Plot]

>

>

2.

> plot3d(sin(x),x=0..2*Pi,y=0..1,axes=BOX,style=patchcontour);

[Maple Plot]

> plot3d(abs(x)+abs(y),y=-(2-abs(x))..2-abs(x),x=-2..2);

[Maple Plot]

> f:=(x,y)->4-x^2-y^2;

[Maple Math]

> x:='x':y:='y':pinta:=plot3d(f(x,y),x=0..2,y=0..sqrt(4-x^2)):

> x:=r*cos(Theta):y:=r*sin(Theta):Theta:=Pi/4:pystyleikkaus:=spacecurve({[x,y,f(x,y)],[x,y,0]},r=0..2,thickness=3,color=blue,axes=BOX):x:='x':y:='y':

> display([pinta,pystyleikkaus],style=patchcontour);

[Maple Plot]

> pystyleikkaus;

[Maple Plot]

>

3.

a)

> f:=x/(abs(x)+abs(y));

[Maple Math]

> plot3d(f,x=-1..1,y=-1..1,color=f,axes=BOX,style=patchcontour);

[Maple Plot]

b)

> f:=(x,y)->x^2/(abs(x)+abs(y));

[Maple Math]

> plot(abs(sin(phi))+abs(cos(phi)),phi=0..2*Pi);

[Maple Plot]

> plot([sin(phi),cos(phi)],phi=0..2*Pi);

[Maple Plot]

> f:=x^2/(abs(x)+abs(y));plot3d(f,x=-1..1,y=-1..1,color=f,axes=BOX,style=patchcontour);

[Maple Math]

[Maple Plot]

>

4

> yla:=plot3d(0,x=-2..2,y=2*x^2..2*2^2,color=red):

> vali:=plot3d(1,x=-2..2,y=x^2..2*x^2,color=blue):

> with(plots):

> ala:=plot3d(0,x=-2..2,y=0..x^2,color=red):

> display([yla,vali,ala],axes=BOX);

[Maple Plot]

>

5.

> fa:=x^3*y^2+x*ln(x+y);
diff(fa,x);diff(fa,y);

[Maple Math]

[Maple Math]

[Maple Math]

> x:='x':y:='y':z:='z':fb:=(x*z)/(x+y+z);diff(fb,x);diff(fb,y);diff(fb,z);

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

> fc:=ln(1+exp(x^2*y^3*z));diff(fc,x);diff(fc,y);diff(fc,z);

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

>

6.

> f:='f':Lap:=diff(f(x,y),x,x)+diff(f(x,y),y,y);

[Maple Math]

a)

> f:=(x,y)->ln(x^2+y^2);

[Maple Math]

> Lap;

[Maple Math]

> simplify(Lap);

[Maple Math]

b)

> f:=(x,y)->arctan(y/x);

[Maple Math]

> Lap;simplify(%);

[Maple Math]

[Maple Math]

c)

> f:=(x,y)->exp(a*x)*cos(a*y);

[Maple Math]

> Lap;simplify(%);

[Maple Math]

[Maple Math]

Katsotaan välivaiheita:

> f:=(x,y)->exp(a*x)*cos(a*y);D[1](f),D[2](f);

[Maple Math]

[Maple Math]

> D[1,1](f)(x,y)+D[2,2](f)(x,y);

[Maple Math]

>

> Delta:=D[1,1]+D[2,2];

[Maple Math]

> f:='f':Delta(f)(x,y);

[Maple Math]

> f:=(x,y)->exp(a*x)*cos(a*y);'Delta(f)(x,y)'=Delta(f)(x,y);

[Maple Math]

[Maple Math]

>