exo10.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 10

question b)

> f:=(x,y)->piecewise(y>=0,exp(x),y<0,exp(x)*cos(y));

f := proc (x, y) options operator, arrow; piecewise(0 <= y, exp(x), y < 0, exp(x)*cos(y)) end proc

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

[Plot]

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

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

[Plot]

Continiuté en (x,0)

> Limit('f'(x,y),y=0)=limit(f(x,y), y=0);

Limit(f(x, y), y = 0) = exp(x)

Première dérivée en en (x,0)

>

> D_1(f)(x,0),"=",Limit(('f'(x+h,0)-'f'(x,0))/h,h=0)=limit((f(x+h,0)-f(x,0))/h,h=0);

D_1(f)(x, 0),

En effet

> Limit(('f'(x+h,0)-'f'(x,0))/h,h=0,right)=limit((f(x+h,0)-f(x,0))/h,h=0,right);Limit(('f'(x+h,0)-'f'(x,0))/h,h=0,left)=limit((f(x+h,0)-f(x,0))/h,h=0,left);

Limit((f(x+h, 0)-f(x, 0))/h, h = 0, right) = exp(x)

Limit((f(x+h, 0)-f(x, 0))/h, h = 0, left) = exp(x)

Exemple en (1,0) dans la direction (Ox)

> plot(f(1+t*1,0),t=-1..1);

[Plot]

>

Deuxième dérivée en en (x,0)

>

> D_2(f)(x,0),"=",Limit(('f'(x,h)-'f'(x,0))/h,h=0)=limit((f(x,h)-f(x,0))/h,h=0);

D_2(f)(x, 0),

En effet

> Limit(('f'(x,h)-'f'(x,0))/h,h=0,right)=limit((f(x,h)-f(x,0))/h,h=0,right);Limit(('f'(x,h)-'f'(x,0))/h,h=0,left)=limit((f(x,h)-f(x,0))/h,h=0,left);

Limit((f(x, h)-f(x, 0))/h, h = 0, right) = 0

Limit((f(x, h)-f(x, 0))/h, h = 0, left) = 0

Exemple en (1,0) dans la direction (Oy)

> plot(f(1,t*1),t=-1..1);

[Plot]

question c)

> f:=(x,y)->piecewise(x=0 and y=0,0,x<>0 or y<>0,(x^3+y^3)/(x^2+y^2));

f := proc (x, y) options operator, arrow; piecewise(x = 0 and y = 0, 0, x <> 0 or y <> 0, (x^3+y^3)/(x^2+y^2)) end proc

> 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); end:

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

[Plot]

Continiuté en (0,0)

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

Limit(f(x, y), {x = 0, y = 0}) = limit((x^3+y^3)/(x^2+y^2), {x = 0, y = 0})

Première dérivée en en (0,0)

>

> D_1(f)(0,0),"=",Limit(('f'(0+h,0)-'f'(x,0))/h,h=0)=limit((f(0+h,0)-f(0,0))/h,h=0);

D_1(f)(0, 0),

En effet en (0,0) dans la direction (Ox)

> plot(f(0+t*1,0),t=-1..1);

[Plot]

>

Deuxième dérivée en en (0,0)

>

> D_2(f)(0,0),"=",Limit(('f'(0,h)-'f'(0,0))/h,h=0)=limit((f(0,h)-f(0,0))/h,h=0);

D_2(f)(0, 0),

En effet (0,0) dans la direction (Oy)

> plot(f(0,t*1),t=-1..1);

[Plot]

question d)

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

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

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

[Plot]

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

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

[Plot]

Continiuté en (x,0)

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

Limit(f(x, y), {y = 0, x = 0}) = limit(PIECEWISE([x^2, x^2 <= y^2], [y^2, y^2 < x^2]), {y = 0, x = 0})

Première dérivée en en (x,x)

>

> D_1(f)(x,x),"=",Limit(('f'(x+h,x)-'f'(x,x))/h,h=0)=limit((f(x+h,x)-f(x,x))/h,h=0);

D_1(f)(x, x),

Or

> droite:=limit((f(x+h,x)-f(x,x))/h,h=0,right):gauche:=limit((f(x+h,x)-f(x,x))/h,h=0,left):

> Limit(('f'(x+h,x)-'f'(x,x))/h,h=0,right)=droite;plot(droite,x=-1..1,-1..0.5);

Limit((f(x+h, x)-f(x, x))/h, h = 0, right) = 2*x-2*x*Heaviside(x)

[Plot]

>

> Limit(('f'(x+h,x)-'f'(x,x))/h,h=0,left)=gauche;;plot(gauche,x=-1..1,-0.5..1);

Limit((f(x+h, x)-f(x, x))/h, h = 0, left) = 2*x-2*x*Heaviside(-x)

[Plot]

Exemple en (1,1) dans la direction (Ox)

> plot(f(1+t*1,1),t=-1..1);

[Plot]

Il n'y a donc pas de première dérivée en (x,x) sauf en (0,0)

>

Deuxième dérivée en en (x,x)

>

> D_2(f)(x,x),"=",Limit(('f'(x,x+h)-'f'(x,x))/h,h=0)=limit((f(x,x+h)-f(x,x))/h,h=0);

D_2(f)(x, x),

>

Or

> droite:=limit((f(x,x+h)-f(x,x))/h,h=0,right):gauche:=limit((f(x,x+h)-f(x,x))/h,h=0,left):

> Limit(('f'(x,x+h)-'f'(x,x))/h,h=0,right)=droite;plot(droite,x=-1..1,-1..0.5);

Limit((f(x, x+h)-f(x, x))/h, h = 0, right) = 2*x-2*x*Heaviside(x)

[Plot]

>

> Limit(('f'(x,x+h)-'f'(x,x))/h,h=0,left)=gauche;;plot(gauche,x=-1..1,-0.5..1);

Limit((f(x, x+h)-f(x, x))/h, h = 0, left) = 2*x-2*x*Heaviside(-x)

[Plot]

Exemple en (1,1) dans la direction (Oy)

> plot(f(1,1+t*1),t=-1..1);

[Plot]

Il n'y a donc pas de seconde dérivée en (x,x) sauf en (0,0)

>

Première dérivée en en (x,-x)

>

> D_1(f)(x,-x),"=",Limit(('f'(x+h,-x)-'f'(x,-x))/h,h=0)=limit((f(x+h,-x)-f(x,-x))/h,h=0);

D_1(f)(x, -x),

Or

> droite:=limit((f(x+h,-x)-f(x,-x))/h,h=0,right):gauche:=limit((f(x+h,-x)-f(x,-x))/h,h=0,left):

> Limit(('f'(x+h,-x)-'f'(x,-x))/h,h=0,right)=droite;plot(droite,x=-1..1,-1..0.5);

Limit((f(x+h, -x)-f(x, -x))/h, h = 0, right) = 2*x-2*x*Heaviside(x)

[Plot]

>

> Limit(('f'(x+h,-x)-'f'(x,-x))/h,h=0,left)=gauche;;plot(gauche,x=-1..1,-0.5..1);

Limit((f(x+h, -x)-f(x, -x))/h, h = 0, left) = 2*x-2*x*Heaviside(-x)

[Plot]

Exemple en (1,-1) dans la direction (Ox)

> plot(f(1+t*1,-1),t=-1..1);

[Plot]

Il n'y a donc pas de première dérivée en (x,-x) sauf en (0,0)

>

Deuxième dérivée en en (x,-x)

>

> D_2(f)(x,-x),"=",Limit(('f'(x,-x+h)-'f'(x,-x))/h,h=0)=limit((f(x,-x+h)-f(x,-x))/h,h=0);

D_2(f)(x, -x),

>

Or

> droite:=limit((f(x,-x+h)-f(x,-x))/h,h=0,right):gauche:=limit((f(x,-x+h)-f(x,-x))/h,h=0,left):

> Limit(('f'(x,-x+h)-'f'(x,-x))/h,h=0,right)=droite;plot(droite,x=-1..1,-1..0.5);

Limit((f(x, -x+h)-f(x, -x))/h, h = 0, right) = -2*x+2*x*Heaviside(-x)

[Plot]

>

> Limit(('f'(x,-x+h)-'f'(x,-x))/h,h=0,left)=gauche;;plot(gauche,x=-1..1,-0.5..1);

Limit((f(x, -x+h)-f(x, -x))/h, h = 0, left) = -2*x+2*x*Heaviside(x)

[Plot]

Exemple en (1-,1) dans la direction (Oy)

> plot(f(1,-1+t*1),t=-1..1);

[Plot]

Il n'y a donc pas de seconde dérivée en (x,-x) sauf en (0,0)

>

>

>