SF1626 - Övning 9 - Code

Göran Andersson goeran@kth.se, 110427

7.8

a)

ClearAll["`*"]

𝒟[{x_,y_,z_}]:=(x^2)+(y^2)+(z^2)≤1;
𝕩={x,y,z};

(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)((x^2)+(y^2)+(z^2))Boole[𝒟[𝕩]]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x

b)

(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)(x^2)Boole[𝒟[𝕩]]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x

c)

(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)x Boole[𝒟[𝕩]]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x

7.11

ClearAll["`*"]

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

(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)z Boole[𝒟[𝕩]]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x

7.13

ClearAll["`*"]

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

f[{x_,y_,z_}]:=(Sqrt[(x^2)+(y^2)+(z^2)])

I detta fall ger inte direkt integration någon snabb lösning så vi inför rymdpolära koordinater. Först en numerisk integration för att kunna jämföra.

NIntegrate[f[𝕩] Boole[𝒟[𝕩]],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞}]

RegionPlot3D[𝒟[𝕩],{x,-1,1},{y,-1,1},{z,-1,1}]

Rymdpolära koordinater införs och funktionaldeterminanten beräknas.

Clear[𝕩];𝕣={r,θ,φ};
𝕩[{r_,θ_,φ_}]:={r Sin[θ]Cos[φ],r Sin[θ]Sin[φ],r Cos[θ]};
J[{r_,θ_,φ_}]=FullSimplify[Abs[Det[(∂_({𝕣}))𝕩[𝕣]]],r≥0&&0≤θ≤π]

Det nya integrationsområdet blir:

ℰ[{r_,θ_,φ_}]=FullSimplify[𝒟[𝕩[𝕣]],r≥0]

Den nya funktionen blir:

g[{r_,θ_,φ_}]=FullSimplify[f[𝕩[𝕣]],r≥0]

Integralen beräknas med:

(∫_0^∞)(∫_0^π)(∫_0^(2 π))g[𝕣] J[𝕣] Boole[ℰ[𝕣]]\[DifferentialD]φ\[DifferentialD]θ\[DifferentialD]r

-(1/4) (-2+(Sqrt[2])) π//Expand

(π/2)-(π/(2 (Sqrt[2])))

Numeriskt värde:

N[%]

7.14

ClearAll["`*"]

𝒟[{x_,y_,z_}]:=(x^2)+(y^2)+(z^2)≥1;
𝕩={x,y,z};

f[{x_,y_,z_}]:=(1/((((x^2)+(y^2)+(z^2)))^(α/2)))

I detta fall ger inte direkt integration någon snabb lösning så vi inför rymdpolära koordinater.

Clear[𝕩];𝕣={r,θ,φ};
𝕩[{r_,θ_,φ_}]:={r Sin[θ]Cos[φ],r Sin[θ]Sin[φ],r Cos[θ]};
J[{r_,θ_,φ_}]=FullSimplify[Abs[Det[(∂_({𝕣}))𝕩[𝕣]]],r≥0&&0≤θ≤π]

Den nya funktionen blir:

g[{r_,θ_,φ_}]=FullSimplify[f[𝕩[𝕣]],r≥0]

Integralen beräknas med:

(∫_1^∞)(∫_0^π)(∫_0^(2 π))g[𝕣] J[𝕣]\[DifferentialD]φ\[DifferentialD]θ\[DifferentialD]r

7.15

ClearAll["`*"]

r=(Sqrt[(x^2)+(y^2)+(z^2)]);

(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)((E^(-r))/r)\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x

7.17

(Underscript[∫∫∫, (ℝ^3)])((e^(-(((x+2 y+2 z))^2)))/((1+(((2 x-2 y+z))^2)) (1+(((2 x+y-2 z))^2))))dx dy dz

ClearAll["`*"]

Inför koordinaterna.

𝕩={x,y,z};
𝕦[{x_,y_,z_}]:={x+2y+2z,2x-2y+z,2x+y-2z};

Funktionaldeterminanten blir

J=1/Det[(∂_({𝕩}))𝕦[𝕩]]

Plot[ArcTan[x],{x,-5,5}]

(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)((E^(-(u^2)))/((1+(v^2)) (1+(w^2))))J\[DifferentialD]u\[DifferentialD]v\[DifferentialD]w

Integrate[E^(-x),{x,0,∞}]

8.2

ClearAll["`*"]

𝒟[{x_,y_,z_}]:=(x^2)+(y^2)≤z&&z≤(Sqrt[2-((x^2)+(y^2))]);
𝕩={x,y,z};

RegionPlot3D[𝒟[𝕩],{x,-1,1},{y,-1,1},{z,0,2},AxesLabel->Automatic]

V=(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)Boole[𝒟[𝕩]]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x

8.4

ClearAll["`*"]

𝒟[{x_,y_,z_}]:=(Sqrt[1+(x^2)+(y^2)])≤z&&z≤(Sqrt[(7^2)-((x^2)+(y^2))]);
𝕩={x,y,z};

RegionPlot3D[𝒟[𝕩],{x,-(Sqrt[24]),(Sqrt[24])},{y,-(Sqrt[24]),(Sqrt[24])},{z,0,8},AxesLabel->Automatic]

V=(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)Boole[𝒟[𝕩]]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x

8.8

ClearAll["`*"]

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

RegionPlot3D[𝒟[𝕩],{x,-2,2},{y,-2,2},{z,0,1},AxesLabel->Automatic,BoxRatios->Automatic,Mesh->False]

V=(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)Boole[𝒟[𝕩]]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x

8.11

ClearAll["`*"]

𝒟[{x_,y_,z_}]:=(x^2)+(y^2)-1≤z≤(Sqrt[(x^2)+(y^2)])+1;
𝕩={x,y,z};

V=(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)Boole[𝒟[𝕩]]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x

8.13

ClearAll["`*"]

𝒟[{x_,y_,z_}]:=((((x/a)))^2)+((((y/b)))^2)+((((z/c)))^2)≤1;
𝕩={x,y,z};

V=Integrate[Boole[𝒟[𝕩]],{x,-∞,∞},{y,-∞,∞},{z,-∞,∞},Assumptions->a>0&&b>0&&c>0]

8.28

ClearAll["`*"]

𝒦[{x_,y_,z_}]:=(Sqrt[(x^2)+(y^2)])≤z≤(Sqrt[1-((x^2)+(y^2))]);
𝕩={x,y,z};

mc=(((∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)𝕩 Boole[𝒦[𝕩]]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x)/((∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)Boole[𝒦[𝕩]]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x))

8.31

a)

ClearAll["`*"]

𝒦[{x_,y_,z_}]:=(y^2)≤z≤2-((x^2)+(y^2));
𝕩={x,y,z};

V=(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)Boole[𝒦[𝕩]]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x

b)

mc=(1/V)(∫_(-∞)^∞)(∫_(-∞)^∞)(∫_(-∞)^∞)𝕩 Boole[𝒦[𝕩]]\[DifferentialD]z\[DifferentialD]y\[DifferentialD]x