SF1626 - Övning 13 - Code

Göran Andersson goeran@kth.se, 110511

10.8

ClearAll["`*"]

𝕥={θ,z};𝕩={x,y,z};
𝕣[{θ_,z_}]:={(Sqrt[2]) Cos[θ],(Sqrt[2]) Sin[θ],z};
𝔽[{x_,y_,z_}]:=(({x,y,z})/((x^2)+(y^2)))

𝕟[{θ_,z_}]=(∂_θ)𝕣[𝕥]\[Cross](∂_z)𝕣[𝕥]

Φ=Integrate[𝔽[𝕣[𝕥]].𝕟[𝕥],{θ,0,2π},{z,-2,2}]

Grafik

field=VectorPlot3D[𝔽[𝕩],{x,-2,2},{y,-2,2},{z,-2,2},VectorPoints->Coarse,VectorStyle->Arrowheads[0.025]];
surface=ParametricPlot3D[𝕣[𝕥],{θ,0,2π},{z,-2,2},PlotStyle->Opacity[0.5],Mesh->None];
Show[field,surface]

10.11

ClearAll["`*"]

𝕥={r,θ};
𝕦[𝕣_]:=𝕣+{0,0,1};
𝕣[{r_,θ_}]:={r Cos[θ],r Sin[θ],1-(r^2)};

𝕟[{r_,θ_}]=(∂_r)𝕣[𝕥]\[Cross](∂_θ)𝕣[𝕥]//Simplify

Φ=(∫_0^1)(∫_0^(2 π))𝕦[𝕣[𝕥]].𝕟[𝕥]\[DifferentialD]θ\[DifferentialD]r

10.13

ClearAll["`*"]

𝕥={θ,ϕ};
𝕣[{θ_,ϕ_}]:={(Sqrt[2]) Sin[θ] Cos[ϕ],(Sqrt[2]) Sin[θ] Sin[ϕ],(Sqrt[2]) Cos[θ]};
𝕦[𝕣_]:=((c 𝕣)/(((𝕣.𝕣))^(3/2)));

𝕟[{θ_,ϕ_}]=(∂_θ)𝕣[𝕥]\[Cross](∂_ϕ)𝕣[𝕥]//Simplify

Φ=(∫_(π/4)^π)(∫_0^(2 π))𝕦[𝕣[𝕥]].𝕟[𝕥]\[DifferentialD]ϕ\[DifferentialD]θ

10.16

ClearAll["`*"]

Needs["VectorAnalysis`"]

SetCoordinates[Cartesian[x,y,z]];
𝕣={x,y,z};
r=(Sqrt[𝕣.𝕣]);

a)

𝕦={(x^2),3y,(x^3)};
Div[𝕦]

b)

Div[𝕣]

c)

Div[(𝕣/(r^3))]

Simplify[%]

10.19

ClearAll["`*"]

Needs["VectorAnalysis`"]

SetCoordinates[Cartesian[x,y,z]];
𝕦={4x y,-2(y^2),(z^3)};
𝒟=(x^2)+(y^2)+(z^2)≤1;

Φ=(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)Div[𝕦] Boole[𝒟]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x

10.23

ClearAll["`*"]

Needs["VectorAnalysis`"]

SetCoordinates[Cartesian[x,y,z]];

𝕦[𝕣_]:=(𝕣/(𝕣.𝕣));
𝒟[𝕣_]:=2≤𝕣.𝕣≤3;
𝕣={x,y,z};

Enligt Gauss’ sats ska vi beräkna

NIntegrate[Div[𝕦[𝕣]] Boole[𝒟[𝕣]],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]//Chop

Direkt integrering ger inte något snabbt exakt resultat så vi provar sfäriska koordinater.

Simplify[Div[𝕦[𝕣]]]

div𝕦=(1/(r^2));
𝒥=(r^2) Sin[θ];

Φ=(∫_(Sqrt[2])^(Sqrt[3]))(∫_0^π)(∫_0^(2 π))div𝕦 𝒥\[DifferentialD]ϕ\[DifferentialD]θ\[DifferentialD]r

10.27

ClearAll["`*"]

Needs["VectorAnalysis`"]

SetCoordinates[Cartesian[x,y,z]];

𝔽[{x_,y_,z_}]:={x,y,(((z-1))^2)}
𝒟[{x_,y_,z_}]:=(x^2)+(y^2)+(z^2)≤1&&z≥0;
𝕣={x,y,z};

Direkt integrering ger inte något snabbt exakt resultat så vi provar sfäriska koordinater.

Simplify[Div[𝔽[𝕣]]]

div𝕦=2r Cos[θ];
𝒥=(r^2) Sin[θ];

Φ=(∫_(Sqrt[2])^(Sqrt[3]))(∫_0^π)(∫_0^(2 π))div𝕦 𝒥\[DifferentialD]ϕ\[DifferentialD]θ\[DifferentialD]r-

10.52

ClearAll["`*"]

Needs["VectorAnalysis`"]

SetCoordinates[Cartesian[x,y,z]];

𝔽={1,2,3}\[Cross]{x,y,z}

Curl[𝔽]

ℕ=(({1,1,1})/(Sqrt[{1,1,1}.{1,1,1}]))

Curl[𝔽].ℕ

W=Curl[𝔽].ℕ×π (1^2)

10.53

ClearAll["`*"]

Needs["VectorAnalysis`"]

SetCoordinates[Cartesian[x,y,z]];

𝔽={x y z,x (y^2) (z^3)-z,x (y^3) (z^2)};

Curl[𝔽]

ℕ={1,0,0}

Curl[𝔽].ℕ

W=Curl[𝔽].ℕ×π (1^2)