Chapter 9: Vector Calculus
Section 9.3: Differential Operators
Example 9.3.7
Derive the expression for the divergence in polar coordinates.
Solution
Mathematical Solution
Start with the general polar vector field F=fr,θ er+gr,θ eθ. Change this to Cartesian coordinates in which the expression for the divergence is known. Then restore polar coordinates.
Using the results of Example 9.2.13, the Cartesian form for F is the field
G=1x2+y2x f(r(x,y),θ(x,y))−y g(r(x,y),θ(x,y))y f(r(x,y),θ(x,y))+x g(r(x,y),θ(x,y))=G1G2
whose divergence is ∇·G=∂xG1+∂yG2, where ∂x and ∂y are short notations for ∂∂x and ∂∂y, respectively. If λ=x2+y2, the quotient and product rules of differentiation lead to
∇·G=λ ∂xG1−G1 λx+λ ∂yG2−G2 λy/λ2
The results in Table 9.3.3(a) and the chain rule lead to
∂xG1
=f+x fr rx+fθ θx−y gr rx+gθ θx
=f+x fr−y grrx+x fθ−y gθθx
=f+r cosθ fr−r sinθ grcosθ+r cosθ fθ−r sinθ gθ−sinθr
=f+r cos2θ fr−sinθcosθ gr−sinθcosθfθ−sin2θgθ
and
∂yG2
=f+y fr ry+fθ θy+x gr ry+gθ θy
=f+y fr+x grry+y fθ+x gθθy
=f+r sinθfr+r cosθgr sinθ+r sinθfθ+r cosθgθcosθr
=f+r sin2θfr+sinθcosθgr+sinθcosθfθ+cos2θgθ
Since λ=r, λx=cosθ and λy=sinθ. Hence, ∇·G now becomes
∇·G
=r ∂xG1−G1cosθ+r ∂yG2+G2sinθ/r2
=∂xG1+∂yG2/r−G1cosθ+G2sinθ/r2
=2 f+r fr+gθr−r cosθf−r sinθgcosθ+r sinθf+r cosθgsinθr2
=2 f+r fr+gθr−fr
=fr+fr+gθr
Maple Solution - Interactive
Initialize
Tools≻Load Package: Student Vector Calculus
Loading Student:-VectorCalculus
Tools≻Tasks≻Browse: Calculus - Vector≻ Vector Algebra and Settings≻ Display Format for Vectors
Press the Access Settings button and select "Display as Column Vector"
Display Format for Vectors
Define the polar field F
Enter a free vector with the components of F. Context Panel: Evaluate and Display Inline
Context Panel: Student Vector Calculus≻Conversions≻Apply Co-ordinate System (Complete the Choose Co-ordinate System" dialog as per figure to the right.)
Context Panel: Student Vector Calculus≻Conversions≻To Vector Field
Context Panel: Assign to a Name≻F
fr,θ,gr,θ = f⁡r,θg⁡r,θ→apply coordinatesf⁡r,θg⁡r,θ→to Vector Fieldf⁡r,θg⁡r,θ→assign to a nameF
Change F to Cartesian coordinates
Write the name F. Context Panel: Evaluate and Display Inline
Context Panel: Student Vector Calculus≻Conversions≻Change Co-ordinate System (Complete the Specify coordinates" dialog as per figure to the right.)
Context Panel: Assign to a Name≻G
F = f⁡r,θg⁡r,θ→change coordinatesf⁡x2+y2,arctan⁡y,x⁢xx2+y2−g⁡x2+y2,arctan⁡y,x⁢yx2+y2f⁡x2+y2,arctan⁡y,x⁢yx2+y2+g⁡x2+y2,arctan⁡y,x⁢xx2+y2→assign to a nameG
Obtain the divergence in Cartesian coordinates as ∇·G=∂xG1+∂yG2
Calculus palette: partial-differential operator Press the Enter key.
Context Panel: Simplify≻Simplify
Context Panel: Assign to a Name≻q
∂∂ x G1+∂∂ y G2
D1⁡f⁡x2+y2,arctan⁡y,x⁢xx2+y2−D2⁡f⁡x2+y2,arctan⁡y,x⁢yx2⁢1+y2x2⁢xx2+y2+2⁢f⁡x2+y2,arctan⁡y,xx2+y2−f⁡x2+y2,arctan⁡y,x⁢x2x2+y232−D1⁡g⁡x2+y2,arctan⁡y,x⁢xx2+y2−D2⁡g⁡x2+y2,arctan⁡y,x⁢yx2⁢1+y2x2⁢yx2+y2+D1⁡f⁡x2+y2,arctan⁡y,x⁢yx2+y2+D2⁡f⁡x2+y2,arctan⁡y,xx⁢1+y2x2⁢yx2+y2−f⁡x2+y2,arctan⁡y,x⁢y2x2+y232+D1⁡g⁡x2+y2,arctan⁡y,x⁢yx2+y2+D2⁡g⁡x2+y2,arctan⁡y,xx⁢1+y2x2⁢xx2+y2
= simplify
D1⁡f⁡x2+y2,arctan⁡y,x⁢x2+y2+f⁡x2+y2,arctan⁡y,x+D2⁡g⁡x2+y2,arctan⁡y,xx2+y2
→assign to a name
q
Return to polar coordinates
Expression palette: Evaluation template Press the Enter key.
Context Panel: Simplify≻Assuming Positive
Context Panel: Simplify≻Assuming Real Range≻Complete dialog as per Figure 9.3.7(a)
Context Panel: Expand≻Expand
Context Panel: Apply a Command≻Complete dialog as per Figure 9.3.7(b)
Figure 9.3.7(a) Real-Range dialog
Figure 9.3.7(b) Apply-command dialog
qx=a|f(x)x=r cosθ,y=r sinθ
D1⁡f⁡r2⁢cos⁡θ2+r2⁢sin⁡θ2,arctan⁡r⁢sin⁡θ,r⁢cos⁡θ⁢r2⁢cos⁡θ2+r2⁢sin⁡θ2+f⁡r2⁢cos⁡θ2+r2⁢sin⁡θ2,arctan⁡r⁢sin⁡θ,r⁢cos⁡θ+D2⁡g⁡r2⁢cos⁡θ2+r2⁢sin⁡θ2,arctan⁡r⁢sin⁡θ,r⁢cos⁡θr2⁢cos⁡θ2+r2⁢sin⁡θ2
→assuming positive
D1⁡f⁡r,arctan⁡sin⁡θ,cos⁡θ⁢r+f⁡r,arctan⁡sin⁡θ,cos⁡θ+D2⁡g⁡r,arctan⁡sin⁡θ,cos⁡θr
→assuming real range
D1⁡f⁡r,θ⁢r+f⁡r,θ+D2⁡g⁡r,θr
= expand
D1⁡f⁡r,θ+f⁡r,θr+D2⁡g⁡r,θr
→
∂∂rf⁡r,θ+f⁡r,θr+∂∂θg⁡r,θr
Compare to Maple's built-in divergence operator
Common Symbols palette: Del and dot product operators Context Panel: Evaluate and Display Inline
∇·F = f⁡r,θ+r⁢∂∂r⁢f⁡r,θ+∂∂θ⁢g⁡r,θr= expand f⁡r,θr+∂∂r⁢f⁡r,θ+∂∂θ⁢g⁡r,θr
Alternative access to divergence operator
Context Panel: Student Vector Calculus≻Divergence
F = →divergencef⁡r,θ+r⁢∂∂r⁢f⁡r,θ+∂∂θ⁢g⁡r,θr
Maple Solution - Coded
Load the Student VectorCalculus package and execute the BasisFormat command.
withStudent:-VectorCalculus:BasisFormatfalse:
Define the general polar field F
Invoke the VectorField command.
F≔VectorFieldfr,θ,gr,θ,polarr,θ:
Change coordinates in F to Cartesian
Apply the MapToBasis command.
G≔MapToBasisF,cartesianx,y
Take G as G=G1 i+G2 j, and obtain its divergence: ∇·G=∂xG1+∂yG2
Use the diff command and apply the simplify command to the result.
q≔simplifydiffG1,x+diffG2,y
Change back to polar coordinates
Use the eval command to replace the Cartesian coordinates with polar coordinates.
Apply the simplify command with appropriate assumptions on r and θ.
Change the D-notation to partial-derivative notation via the convert command.
Apply the expand command to split the result into three separate terms.
temp≔evalq,x=r cosθ,y=r sinθ:Temp≔simplifytemp assuming r>0,θ∷RealRangeOpen−π,π:expandconvertTemp,diff
∂∂r⁢f⁡r,θ+f⁡r,θr+∂∂θ⁢g⁡r,θr
Compare to Maple's expression for the divergence in polar coordinates
Apply the expand command to the result of the Divergence command.
expandDivergenceF
<< Previous Example Section 9.3 Next Example >>
© Maplesoft, a division of Waterloo Maple Inc., 2024. All rights reserved. This product is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation.
For more information on Maplesoft products and services, visit www.maplesoft.com
Download Help Document