Example 1
Example 1
To calculate the line integral 2+ys where is the part of the unit circle +1 for , we first parameterize the curve .The parameterization of the unit circle for (upper semicircle) is as follows:
∫
C
2
x
C
2
x
2
y
y≥0
C
y≥0
xcos(t), ysin(t), 0≤t≤π
The differential arc length is given by:
The differential arc length
ds
ds+t(t)+(t)tdt
2
dx
dt
2
dy
dt
2
cos
2
sin
Thus, the line integral becomes:
Thus, the line integral becomes:
2+ys(2+(t)sin(t))t
∫
C
2
x
π
∫
0
2
cos
This integral can be split into two parts:
This integral can be split into two parts:
2t+(t)sin(t)t
π
∫
0
π
∫
0
2
cos
The first part is easy to calculate:
The first part is easy to calculate:
2t2t2π
π
∫
0
π
|
0
For the second part, we use the integration by substitution technique. Let , so or :
For the second part, we use the integration by substitution technique. Let
ucos(t)
du-sin(t)t
sin(t)t-du
(t)sin(t)t-u
π
∫
0
2
cos
-1
∫
1
2
u
Calculating the integral:
Calculating the integral:
-uu-
-1
∫
1
2
u
1
∫
-1
2
u
1
3
u
3
-1
3
1
3
3
(-1)
3
2
3
Combining the two parts, we get:
Combining the two parts, we get:
(2+(t)sin(t))t2π+
π
∫
0
2
cos
2
3
Therefore, the result of the line integral is .
2π+
2
3
In[]:=
(*ParameterizationofthecurveC*)x[t_]:=Cos[t]y[t_]:=Sin[t](*Functiontointegrate*)f[t_]:=2+x[t]^2*y[t](*LineintegraloverC*)integral=Integrate[f[t],{t,0,Pi}](*Plotthefunctionovertheinterval[0,Pi]*)plot=Plot[f[t],{t,0,Pi},PlotLabel->"Function 2 + x^2y along C",AxesLabel->{"t","f(t)"},PlotTheme->"Scientific"]
Out[]=
2
3
Out[]=
In[]:=
ParametricPlot3D[{Cos[t],Sin[t],2+Cos[t]^2*Sin[t]},{t,0,Pi},PlotRange->All,AxesLabel->{"x","y","z"},PlotLabel->"Surface above unit circle"]
Out[]=
Example 2
Example 2
To calculate the surface integral S where is the surface of the sphere ++4, we follow these steps:1. Convert to spherical coordinates: - - - For the sphere ++4 , the radius is .Therefore, 4(θ)(ϕ) .2. Determine the surface element : Since , for \( we have .3. Compute the surface integral: S4(θ)(ϕ)·4sin(θ)θϕ - The integral over is (ϕ)ϕπ. - The integral over is (θ)θ.Multiplying the results of the integrals by the factor 16 , we get:S16·π·Thus, the surface integral S over the surface of the sphere ++4 is .
∫
S
2
x
S
2
x
2
y
2
z
xrsin(θ)cos(ϕ)
yrsin(θ)sin(ϕ)
zrcos(θ)
2
x
2
y
2
z
r2
2
x
2
(2sin(θ)cos(ϕ))
2
sin
2
cos
dS
dSsin(θ)dθdϕ
2
r
r2
dS4sin(θ)dθdϕ
∫
S
2
x
2π
∫
0
π
∫
0
2
sin
2
cos
16(ϕ)ϕ(θ)θ
2π
∫
0
2
cos
π
∫
0
3
sin
ϕ
2π
∫
0
2
cos
θ
π
∫
0
3
sin
4
3
∫
S
2
x
4
3
64π
3
∫
S
2
x
2
x
2
y
2
z
64π
3
In[]:=
(*Definesphericalcoordinates*)x[r_,θ_,φ_]:=rSin[θ]Cos[φ]y[r_,θ_,φ_]:=rSin[θ]Sin[φ]z[r_,θ_,φ_]:=rCos[θ](*Definethefunctionforx^2*)f[r_,θ_,φ_]:=x[r,θ,φ]^2(*Computethedifferentialsurfaceelementinsphericalcoordinates*)dS[r_,θ_,φ_]:=r^2Sin[θ](*Performthesurfaceintegralcomputationinsphericalcoordinates*)r=2;(*Theradiusofthesphere*)surfaceIntegral=Integrate[f[r,θ,φ]dS[r,θ,φ],{φ,0,2π},{θ,0,π}](*Displaytheresultofthesurfaceintegral*)Print["The surface integral is: ",surfaceIntegral](*Generatetheplotofthespherewithradiusr=2*)SphericalPlot3D[r,{θ,0,π},{φ,0,2π},PlotStyle->Directive[Opacity[0.5],Blue],Mesh->None,PlotPoints->50,PlotLegends->Placed[{"r = 2"},{0.8,0.8}]]
Example 3
Example 3
Using the definition of the line integral :
Using the definition of the line integral :
Calculating the integral for each segment:
Calculating the integral for each segment:
Adding the integrals from all the segments to get the total line integral.
Overall, the line integral is:
Adding the integrals from all the segments to get the total line integral.
Overall, the line integral is:
or
Apply Green' s Theorem for the line integral
Apply Green' s Theorem for the line integral
So, the double integral becomes:
So, the double integral becomes: