SF1626 - Övning 12 - Code

Göran Andersson goeran@kth.se, 110506

8.14

a)

ClearAll["`*"]

Plot3D[(x^2)+(y^2),{x,-1,1},{y,-1,1},AxesLabel->Automatic,RegionFunction->Function[{x,y,z},(x^2)+(y^2)≤1]]

𝕣[{x_,y_}]:={x,y,(x^2)+(y^2)}

𝕟=(∂_x)𝕣[{x,y}]\[Cross](∂_y)𝕣[{x,y}]

Alternativt

(∂_({{x,y,z}}))(z-((x^2)+(y^2)))

b)

A=(∫_(-∞)^∞)(∫_(-∞)^∞)Norm[𝕟] Boole[(x^2)+(y^2)≤1]\[DifferentialD]x\[DifferentialD]y

c)

m=(∫_(-∞)^∞)(∫_(-∞)^∞)(x^2)Norm[𝕟] Boole[(x^2)+(y^2)≤1]\[DifferentialD]x\[DifferentialD]y

8.15

a)

ClearAll["`*"]

𝕥={s,t};
𝕣[{s_,t_}]:={2 Cos[s],2Sin[s],t}

plota=ParametricPlot3D[𝕣[𝕥],{s,0,2π},{t,0,3},AxesLabel->{"x","y","z"},BoundaryStyle->Black]

b)

𝕟[{s_,t_}]=(∂_s)𝕣[𝕥]\[Cross](∂_t)𝕣[𝕥]

plotb=Graphics3D[Arrow[{𝕣[{1,1}],𝕣[{1,1}]+𝕟[{1,1}]}]];
Show[plota,plotb,PlotRange->All]

c)

A=(∫_0^3)(∫_0^(2 π))Norm[𝕟[𝕥]]\[DifferentialD]s\[DifferentialD]t

d)

Clear[𝕣,𝕟];
𝕣[{x_,z_}]:={x,(Sqrt[4-(x^2)]),z}

𝕟[{x_,z_}]=(∂_z)𝕣[{x,z}]\[Cross](∂_x)𝕣[{x,z}]

𝕟[{1,2}]

8.16

a)

ClearAll["`*"]

𝕩={x,y};
𝕣[{x_,y_}]:={x,y,(Sqrt[4-((x^2)+(y^2))])}

𝒟[{x_,y_}]:=(x^2)+(y^2)≤3

ParametricPlot3D[𝕣[𝕩],{x,-(Sqrt[3]),(Sqrt[3])},{y,-(Sqrt[3]),(Sqrt[3])},RegionFunction->Function[{x,y,z},𝒟[𝕩]],BoundaryStyle->Black]

Alternativ:

ParametricPlot3D[{2 Sin[θ] Cos[ϕ],2 Sin[θ] Sin[ϕ],2 Cos[θ]},{θ,0,π/3},{ϕ,0,2π},BoundaryStyle->Black]

b)

𝕟[{x_,y_}]=(∂_x)𝕣[𝕩]\[Cross](∂_y)𝕣[𝕩]

n[{x_,y_}]=Simplify[Norm[𝕟[𝕩]],𝒟[𝕩]]

c)

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

d)

𝕣[{x_,y_}]:={x,y,(Sqrt[(R^2)-((x^2)+(y^2))])}

𝒟[{x_,y_}]:=(x^2)+(y^2)≤(R^2)-(h^2)&&R>h>0

𝕟[{x_,y_}]=(∂_x)𝕣[𝕩]\[Cross](∂_y)𝕣[𝕩]

n[{x_,y_}]=Simplify[Norm[𝕟[𝕩]],𝒟[𝕩]]

A=Integrate[n[𝕩] Boole[𝒟[𝕩]],{y,-∞,∞},{x,-∞,∞},Assumptions->R>h>0]

8.18

ClearAll["`*"]

𝕥={θ,x};
𝕣[{θ_,x_}]:={x,4Cos[θ],4Sin[θ]}

ParametricPlot3D[𝕣[𝕥],{θ,0,2π},{x,-4,4},RegionFunction->Function[{x,y,z},z≥0&&(x^2)+(y^2)≤(4^2)]]

𝒟[{θ_,x_}]:=(x^2)+(((4Cos[θ]))^2)≤(4^2)&&-4≤x≤4&&0≤θ≤π

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

n[{x_,y_}]=Simplify[Norm[𝕟[𝕥]],𝒟[𝕥]]

A=(∫_0^π)(∫_(-∞)^∞)n[𝕥] Boole[𝒟[𝕥]]\[DifferentialD]x\[DifferentialD]θ

8.20

ClearAll["`*"]

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

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

𝕟[{x_,y_}]=(∂_x)𝕣[𝕩]\[Cross](∂_y)𝕣[𝕩]

n[{x_,y_}]=Simplify[Norm[𝕟[𝕩]],𝒟[𝕩]]

σ[{x_,y_}]:=c (Sqrt[1-((x^2)+(y^2))]) (Sqrt[(x^2)+(y^2)])

m=Integrate[σ[𝕩] n[𝕩] Boole[𝒟[𝕩]],{y,-∞,∞},{x,-∞,∞},Assumptions->c>0]

Grafik

I följande plot visas masstätheten som ogenomskinlighet (opacity).

ParametricPlot3D[𝕣[𝕩],{x,0,1},{y,0,1},Mesh->3,MeshFunctions->Function[{x,y,z},z],BoundaryStyle->Black,ColorFunction->Function[{x,y,z},Opacity[2z (Sqrt[(x^2)+(y^2)]),Blue]]]