# Tema 11
11-2 El teorema de la funció implícita
         Derivació de funcions implícites

Exemple 11.2.1 

kill(all)$

Eq1 :  x+y+z+cos(x*y*z)=0;

f(x,y,z):=x+y+z+cos(x*y*z);     'f(0,0,-1)=f(0,0,-1);

Dzf(x,y,z)=diff(f(x,y,z), z);

Dzf(x,y,z):=1-x*y*sin(x*y*z)$
'Dzf(0,0,-1)=Dzf(0,0,-1);

depends([z], [x,y]);

Eq1b:  x+y+z(x,y)+cos(x*y*z(x,y))=0;

Dx_Eq1=diff(x+y+z(x,y)+cos(x*y*z(x,y)), x);
Dy_Eq1=diff(x+y+z(x,y)+cos(x*y*z(x,y)), y);

Dx_Eq1_P:-(0*Dxz(0,0)*0+(-1)*0)*sin(0)+Dxz(0,0)+1=0;
Dy_Eq1_P:-(0*Dyz(0,0)*0+(-1)*0)*sin(0)+Dyz(0,0)+1=0;

Dxz(0,0)=-1;   Dyz(0,0)=-1;

Exemple 11.2.2

kill(all)$

Eq1:  x^2 + y^2  -x*z^2 - 1 = 0;
Eq2:  x*z - x^2*y=0;

f1(x,y,z):=x^2 + y^2  -x*z^2 - 1;       f2(x,y,z):=x*z - x^2*y;
f(x,y,z):= [f1(x,y,z), f2(x,y,z)];

'f(1,1,1)=f(1,1,1);

Jf(x,y,z)=Jf:jacobian( [f1(x,y,z),f2(x,y,z)] , [x,y,z] );

Jf12=Jf12:submatrix(Jf, 3);

Jf12_a=Jf12_a:subst( [x=1,y=1,z=1] , Jf12);

'(detJf12_a)=determinant(Jf12_a);

Jf13=Jf13:submatrix(Jf, 2);

Jf13_a=Jf13_a:subst( [x=1,y=1,z=1] , Jf13);

'(detJf13_a)=determinant(Jf13_a);

Jf23=Jf23:submatrix(Jf, 1);

Jf23_a=Jf23_a:subst( [x=1,y=1,z=1] , Jf23);

'(detJf23_a)=determinant(Jf23_a);

Exemple 11.2.3 

kill(all)$

Eq1 :  x+y+z+cos(x*y*z)=0;

depends([z], [x,y]);

DxEq1 : diff(x+y+z+cos(x*y*z), x) = 0;
DyEq1 : diff(x+y+z+cos(x*y*z), y)  = 0;

DxEq1_P : -(0*Dxz(0,0)*0+(-1)*0)*sin(0)+Dxz(0,0)+1=0;
DyEq1_P : -(0*Dyz(0,0)*0+(-1)*0)*sin(0)+Dyz(0,0)+1=0;

Dxz(0,0)=-1;   Dyz(0,0)=-1;

Exemple 11.2.4

kill(all)$

Eq1:  x^2 + y^2  -x*z^2 - 1 = 0;
Eq2:  x*z - x^2*y=0;

depends( [x,y] , [z]);

DzEq1 : diff(x^2 + y^2  -x*z^2 - 1, z) = 0;
DzEq2 : diff(x*z - x^2*y, z)  = 0;

DzEq1_P : - 1*Dx(1) - 2*1*1 + 2*1*Dy(1) + 2*1*Dx(1) = 0;
DzEq2_P : 1*Dx(1) - 1*Dy(1) - 2*1*Dx(1)*1 + 1 = 0;

linsolve([DzEq1_P, DzEq2_P], [Dx(1), Dy(1)]);

DzzEq1 : diff(-('diff(x,z,1))*z^2-2*x*z+2*y*('diff(y,z,1))+2*x*('diff(x,z,1)), z) = 0;
DzzEq2 : diff(('diff(x,z,1))*z-x^2*('diff(y,z,1))-2*x*('diff(x,z,1))*y+x, z)  = 0;

DzzEq1_P : -D2x(1)*1 - 4*0*1 + 2*1*D2y(1) + 2*1 + 2*1*D2x(1) + 2*0 - 2*1 = 0;
DzzEq2_P :  D2x(1)*1 - 1*D2y(1) - 4*1*0*1 - 2*1*D2x(1)*1 - 2*0*1 + 2*0= 0;

linsolve([DzzEq1_P, DzzEq2_P], [D2x(1), D2y(1)]);