SF1626 - Övning 6 - Code

Göran Andersson goeran@kth.se, 110407

3.23

ClearAll["`*"]

F[x_,y_]:=(x^3)y+2(y^3)x

-((Derivative[1,0][F][1,1])/(Derivative[0,1][F][1,1]))

3.25

ClearAll["`*"]

F[x_,y_]:=Sin[x y]-Log[x+y]

-((Derivative[1,0][F][0,1])/(Derivative[0,1][F][0,1]))

3.26

a)

ClearAll["`*"]

𝕩={x,y,z};𝕡={0,1,1};

F[{x_,y_,z_}]:=(E^(z-1))+z y+x-2(y^3)

F[𝕡]

(∇F)[{x_,y_,z_}]=D[F[𝕩],{𝕩}]

(∇F)[𝕡]

Planets ekvation:

(∇F)[𝕡].(𝕩-𝕡)==0//Expand

b)

(∇F)[𝕡][[3]]≠0

3.31

a)

ClearAll["`*"]

𝕩={x,y};𝕠={0,0};

F[{x_,y_}]:=(y^3)-3y-x

Derivative[{0,1}][F][𝕠]≠0

b)

{x0,a0}=𝕠

ekvation1=Dt[F[𝕩]==0,x]

losning1=Solve[ekvation1,Dt[y,x]][[1]]

ekvation2=Dt[F[𝕩]==0,{x,2}]/.losning1

losning2=Solve[ekvation2,Dt[y,{x,2}]][[1]]

y1[{x_,y_}]=Dt[y,x]/.losning1

y2[{x_,y_}]=Dt[y,{x,2}]/.losning2

a1=y1[𝕠]

a2=y2[𝕠]

p[x_]=(1/(0!))a0 (((x-0))^0)+(1/(1!))a1 (((x-0))^1)+(1/(2!))a2 (((x-0))^2)

3.33

Funktionerna definieras:

ClearAll["`*"]

𝕩={x,y,z};𝕩0={1,1,1};

f[{x_,y_,z_}]:=(x^2)-(y^2)-(z^2);
g[{x_,y_,z_}]:=(x^2)+2(y^2)+3(z^2)

För att få en riktningsvektor till kurvan beräknas

𝕧=∇f×∇g

(∇f)[{x_,y_,z_}]=(∂_({𝕩}))f[𝕩]

(∇g)[{x_,y_,z_}]=(∂_({𝕩}))g[𝕩]

𝕧=(∇f)[𝕩0]\[Cross](∇g)[𝕩0]

𝕦=(𝕧/(Norm[𝕧]))

Tangentens ekvation i punkten (1,1,1) blir

𝕣[t_]=𝕩0+t 𝕦

Grafik

plot1=ContourPlot3D[{
f[𝕩]==-1,g[𝕩]==6},{x,-3,3},{y,-3,3},{z,-3,3},
ContourStyle->Opacity[0.5],Mesh->None,
AxesLabel->Automatic
];
plot2=Graphics3D[{
PointSize[0.015],Point[{1,1,1}],
Thickness[0.005],Line[{𝕣[-2],r[2]}]
}];
Show[plot1,plot2]