Zurück zum Inhaltsverzeichnis

Kapitel 27

Gradient, Divergenz und Rotation

> restart:

> sf := f(x,y,z):

> vf := [fx(x,y,z), fy(x,y,z), fz(x,y,z)]:

>

> with(linalg):

Warning, the protected names norm and trace have been redefined and unprotected

> grad( sf, [x,y,z] );

vector([diff(f(x,y,z),x), diff(f(x,y,z),y), diff(f(...

> grad( x+x*y*z^2, [x,y,z]);

vector([1+y*z^2, x*z^2, 2*x*y*z])

> diverge( vf, [x,y,z]);

diff(fx(x,y,z),x)+diff(fy(x,y,z),y)+diff(fz(x,y,z),...

> diverge( [y*sin(x), x*cos(y), z], [x,y,z] );

y*cos(x)-x*sin(y)+1

> curl( vf, [x,y,z] );

vector([diff(fz(x,y,z),y)-diff(fy(x,y,z),z), diff(f...

> convert(%, matrix);

matrix([[diff(fz(x,y,z),y)-diff(fy(x,y,z),z)], [dif...

> curl( [z*sin(x), z*sin(y), sqrt(x^2+y^2)], [x,y,z] ):

> convert(%,matrix);

matrix([[y/(sqrt(x^2+y^2))-sin(y)], [sin(x)-x/(sqrt...

> vf:=[r*cos(phi),r*sin(phi),r]:

> diverge(vf, [r,phi,z], coords=cylindrical);

3*cos(phi)

> alias(R=R(r,theta,phi), Theta=Theta(r,theta,phi), Phi=Phi(r,theta,phi)):

> curl( [R, Theta, Phi], [r,theta,phi], coords=spherical):

> convert(%,matrix);

matrix([[(r*cos(theta)*Phi+r*sin(theta)*diff(Phi,th...

> grad( f(u,v,z), [u,v,z], coords=ellcylindrical): convert(%,matrix);

matrix([[diff(f(u,v,z),u)/(sqrt(sinh(u)^2+sin(v)^2)...

Potential eines Vektorfelds

> potential( [x,y^2,z^3], [x,y,z], 'p');

true

> p;

1/2*x^2+1/3*y^3+1/4*z^4

> grad(p, [x,y,z]);

vector([x, y^2, z^3])

> vecpotent( [y^2+z^2, x^2+z^2, x^2+y^2], [x,y,z], 'v');

true

> convert( map(simplify,v), matrix );

matrix([[x^2*z+1/3*z^3-x^2*y-1/3*y^3], [-y^2*z-1/3*...

> curl(v, [x,y,z]);

vector([y^2+z^2, x^2+z^2, x^2+y^2])

Umformung von Integralen

> restart: with(linalg):

Warning, the protected names norm and trace have been redefined and unprotected

> f:=[exp(x), cosh(y), sinh(z)];

f := [exp(x), cosh(y), sinh(z)]

> int(int(int( diverge(f,[x,y,z]), x=0..a), y=0..a), z=0..a);

exp(a)*a^2+a^2*cosh(a)+a^2*sinh(a)-2*a^2

> simplify(%);

a^2*(exp(a)+cosh(a)+sinh(a)-2)

> convert(%,exp);

a^2*(2*exp(a)-2)

>

> f:=[-3*y,3*x,z];

f := [-3*y, 3*x, z]

> n:=[0,0,1];

n := [0, 0, 1]

> dotprod(n,curl(f,[x,y,z]));

6

> int( int( 6, x=-sqrt(1-y^2)..sqrt(1-y^2)), y=-1..1);

6*Pi

Zeichnen von Vektorfeldern

> with(plots):

Warning, the name changecoords has been redefined

> fieldplot( [x*y^2, y*x^2], x=-1..1, y=-1..1);

[Maple Plot]

> fieldplot( [ Re(sin(x+I*y)), Im(sin(x+I*y)) ], x=0..Pi, y=-1..1, axes=boxed);

[Maple Plot]

> gradplot( sin(x*y), x=-1..1, y=-1..1, arrows=SLIM);

[Maple Plot]

> fieldplot3d( [x,y,z], x=-1..1, y=0..Pi/2, z=0..Pi/2,

> orientation=[131,71], axes=boxed, grid=[5,5,5],

> arrows=SLIM, color=black);

[Maple Plot]

>

Zurück zum Inhaltsverzeichnis