# Tema 10
10-5  Matriu jacobiana. Diferenciabilitat. 
          Regla de la cadena.

Exemple 10.5.1

kill(all)$

f(x,y):=2*x^2*y-3*x*y^3;

'Jf(x,y) = Jf: jacobian([f(x,y)],[x,y]);

'Jf(1,2) = subst([x=1,y=2], Jf);

Exemple 10.5.2

kill(all)$

f(x,y,z,t):=2*x^2*y-3*z*y^3+2*z^2*sin(t);

'Jf(x,y,z,t) = Jf: jacobian([f(x,y,z,t)],[x,y,z,t]);

'Jf(1,2,0,1) = subst([x=1,y=2,z=0,t=1], Jf);

Exemple 10.5.3

kill(all)$

f1(x,y):=2*x^2*y-3*x*y^3;       f2(x,y):=exp(x+y);      f3(x,y):=x*y-2*x^2*y;
f(x,y):= [f1(x,y) , f2(x,y) , f3(x,y)];

'Jf(x,y) = Jf: jacobian( f(x,y), [x,y]);

'Jf(1,-1) = subst([x=1,y=-1], Jf);

Exemple 10.5.4

kill(all)$

f(x,y):=x^2+2*y^2;

'u=u:[1,1];     modul:sqrt(1^2+1^2);        'u1=u/modul;

'u1=u1 : matrix( [1/sqrt(2)] , [1/sqrt(2)] );

'Jf(x,y)=Jfxy : jacobian([f(x,y)], [x,y]);

'Jf(3,2) = JfP : subst([x=3,y=2], Jfxy);

'Duf(3,2)=JfP.u1;

Exemple 10.5.5

kill(all)$

f1(x,y):=x^2 + y$     f2(x,y):=x * y^2$     f3(x,y):=x + y^2$
f(x,y):= [f1(x,y) , f2(x,y) , f3(x,y)];

g1(x,y,z):=%e^(x*y)$     g2(x,y,z):= y + z$
g(x,y,z):= [g1(x,y,z) , g2(x,y,z) ];

'Jf(x,y)=Jfxy : jacobian(f(x,y), [x,y]);

'Jg(x,y,z)=Jgxyz : jacobian(g(x,y,z), [x,y,z]);

'JF(x,y) = JFxy : Jgxyz.Jfxy;

'Jf(1,-1) = Jfa : subst([x=1,y=-1], Jfxy);

Exemple 10.5.6

kill(all)$

f1(t):=2*t + 1;     f2(t):= t^2+2;      f3(t):=sin(t);
g(x,y,z):=x*y^2 + exp(z);

F(t)=g(f1(t), f2(t), f3(t));

DF(t)=diff(g(f1(t), f2(t), f3(t)) , t);

expand(%);

Exemple 10.5.7

kill(all)$

g(t):=sin(t);
f(x,y,z):=sqrt( x*y^2 + exp(z)) ;

F(x,y,z)=g(f(x,y,z));

DxF(x,y,z)=diff(g(f(x,y,z)) , x);

DyF(x,y,z)=diff(g(f(x,y,z)) , y);

DzF(x,y,z)=diff(g(f(x,y,z)) , z);

Exemple 10.5.8

kill(all)$

f1(x,y):=x+y;     f2(x,y):= x-y;      f3(x,y):=2*x*y;
g(u,v,w):=log(u^2 + v^2 - 2*w) ;

F(x,y)=g(f1(x,y), f2(x,y), f3(x,y));

DxF(x,y)=diff(g(f1(x,y), f2(x,y), f3(x,y)) , x);

ratsimp(%);

DyF(x,y)=diff(g(f1(x,y), f2(x,y), f3(x,y)) , y);

ratsimp(%);