exo4.mw

> restart;with(plots):with(plottools):with(linalg);

Warning, the name changecoords has been redefined

Warning, the assigned name arrow now has a global binding

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

[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...[BlockDiagonal, GramSchmidt, JordanBlock, LUdecomp, QRdecomp, Wronskian, addcol, addrow, adj, adjoint, angle, augment, backsub, band, basis, bezout, blockmatrix, charmat, charpoly, cholesky, col, cold...

>

Exercice 4

question b)

>

> f:=x->piecewise(x=0,0,x^2*sin(1/x));

f := proc (x) options operator, arrow; piecewise(x = 0, 0, x^2*sin(1/x)) end proc

> g:=(x,y)->piecewise(x=y,D(f)(x),(f(x)-f(y))/(x-y));

g := proc (x, y) options operator, arrow; piecewise(x = y, D(f)(x), (f(x)-f(y))/(x-y)) end proc

> f(0,0);

0

> plot3d(g(x,y),x=-0.5..0.5,y=-0.5..0.5,axes=normal);

[Plot]

>

Voici le profil de la section obtenu par une droite passant par l'origine et tournant au cours du temps

> profil_x:=theta->cos(theta)*t;profil_y:=theta->sin(theta)*t;t:='t':

profil_x := proc (theta) options operator, arrow; cos(theta)*t end proc

profil_y := proc (theta) options operator, arrow; sin(theta)*t end proc

> sect:=theta->cos(theta)*x+y*sin(theta);

sect := proc (theta) options operator, arrow; cos(theta)*x+y*sin(theta) end proc

> profil_courbe(g,profil_x,profil_y,[-1,1],[-Pi,Pi],-1);

[Plot]

>

Le même profil vu sur un plan fixe (courbe du paramétrage)

> F:=proc(theta)  plot(g(profil_x(theta),profil_y(theta)),t=-1..1 ); end:

> animate(F,[theta],theta=-Pi..Pi, axes=normal,frames=41);

[Plot]

Voici les courpes obtenues par les sections correspondantes à ces droites tournantes

> profil_section(g,[-1,1],[-1,1],sect,[-Pi,Pi],-1);

[Plot]

En particulier le profil de f selon la droite y=x, nous donne

> 'g'(x,x)=simplify(g(x,x));

g(x, x) = PIECEWISE([0, x = 0], [2*x*sin(1/x)-cos(1/x), otherwise])

> coupe(g,[-1,1],[-1,1],[t,t],[-1,1],y-x,-1,100);

[Plot]

> coupe_plan(g,[t,t],[-1,1]);

[Plot]

g n'est pas continue en (0,0) selon la droite y=x

> Limit('g'(x,x),x=0)=limit(g(x,x),x=0);

Limit(g(x, x), x = 0) = -1 .. 1

>

question b)

> 'f'(x,x+x^2)=f(x,x+x^2);

f(x, x+x^2) = -(x^2*sin(1/x)-(x+x^2)^2*sin(1/(x+x^2)))/x^2

> Limit('f'(x,x+x^2), x=0)=limit(f(x,x+x^2), x=0);

Limit(f(x, x+x^2), x = 0) = -2 .. 2

>

>

>

>

>

>

>

Exercice 5

question b)

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

f := proc (x, y) options operator, arrow; (x+y)/sin(x+y) end proc

> Limit('f'(x,k*x), x=0)=limit(f(x,k*x),x=0);Limit('f'(x,y), r=0)=limit(f(x,y),{x=0,y=0});

Limit(f(x, k*x), x = 0) = 1

Limit(f(x, y), r = 0) = limit((x+y)/sin(x+y), {y = 0, x = 0})

> plot3d(f(x,y),x=-3..3,y=-3..3,axes=normal);

[Plot]

> F:=proc(t)  plot(f(x,tan(t)*x),x=-3..3,y=-2..2 ); end:

> animate(F,[t],t=-1.5..1.5, axes=normal,frames=41);

[Plot]

question c)

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

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

> Limit('f'(x,k*x), x=0)=limit(f(x,k*x),x=0);Limit('f'(x,y), r=0)=limit(f(x,y),{x=0,y=0});

Limit(f(x, k*x), x = 0) = tanh(1/k^2)

Limit(f(x, y), r = 0) = undefined

> plot3d(f(x,y),x=-2..2,y=-2..2,axes=normal);

[Plot]

> F:=proc(t)  plot(f(x,tan(t)*x),x=-2..2 ); end:

> animate(F,[t],t=-1.5..1.5, axes=normal,frames=41);

[Plot]

question c)

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

f := proc (x, y) options operator, arrow; (x*sin(y)-y*sin(x))/(x^2+y^2) end proc

> Limit('f'(x,k*x), x=0)=limit(f(x,k*x),x=0);Limit('f'(x,y), r=0)=limit(f(x,y),{x=0,y=0});

Limit(f(x, k*x), x = 0) = 0

Limit(f(x, y), r = 0) = limit((x*sin(y)-y*sin(x))/(x^2+y^2), {x = 0, y = 0})

> plot3d(f(x,y),x=-1..1,y=-1..1,axes=normal);

[Plot]

> F:=proc(t)  plot(f(x,tan(t)*x),x=-1..1 ); end:

> animate(F,[t],t=-1.5..1.5, axes=normal,frames=41);

[Plot]