# Exercici 10.16

## Apartat a)

kill(all)$

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

P=P:[2,1,4];

f(2,1,4)=x^2*y^2+x*z-2*y^3-10;

define (Dxf(x,y,z) , diff(f(x,y,z),x) );
define (Dyf(x,y,z) , diff(f(x,y,z),y) );
define (Dzf(x,y,z) , diff(f(x,y,z),z) );

'Dxf(2,1,4)=Dxf(2,1,4);
'Dyf(2,1,4)=Dyf(2,1,4);
'Dzf(2,1,4)=Dzf(2,1,4);

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

'Jf(2,1,4) = Jf214: subst( [x=2, y=1, z=4], Jf);

'h=h:matrix([x-2],[y-1],[z-4]);

Equació pla tangent:

0=Jf214.h;

Equació de la recta normal:        (x-2)/8 = (y-1)/2 = (z-4)/2  

## Apartat a)

kill(all)$

x^2+y^2+z^2-9=0;
f(x,y,z):=x^2+y^2+z^2-9;

P=P:[2,1,-2];

f(2,1,-2)=x^2+y^2+z^2-9;

define (Dxf(x,y,z) , diff(f(x,y,z),x) );
define (Dyf(x,y,z) , diff(f(x,y,z),y) );
define (Dzf(x,y,z) , diff(f(x,y,z),z) );

'Dxf(2,1,-2)=Dxf(2,1,-2);
'Dyf(2,1,-2)=Dyf(2,1,-2);
'Dzf(2,1,-2)=Dzf(2,1,-2);

Dfx(x,y,z)=diff(f(x,y,z),x,1);
Dfy(x,y,z)=diff(f(x,y,z),y,1);
Dfz(x,y,z)=diff(f(x,y,z),z,1);

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

'Jf(2,1,-2) = Jf212: subst( [x=2, y=1, z=-2], Jf);

'h=h:matrix([x-2],[y-1],[z+2]);

Equació del pla tangent:

0=Jf212.h;

Equació de la recta normal:      (x-2)/4 = (y-1)/2 = (z+2)/(-4)    