Chapter 9: Vector Calculus
Section 9.3: Differential Operators
Example 9.3.3
Derive the expression for the gradient in polar coordinates.
Solution
Mathematical Solution
Starting with the definition of the gradient in Cartesian coordinates, there are two parts to the required derivation. First, the chain rule must be applied to obtain the polar-coordinate equivalents of the Cartesian derivatives with respect to x and y. Second, the Cartesian basis vectors i,j must be expressed in terms of the polar basis vectors er,eθ. Of course, once both these steps have been completed, it is a matter of algebraic simplification to pass from ∇F=Fx i+Fy j to the polar-coordinate equivalent fr er+fθr eθ.
To apply the chain rule, use the notation
fr,θ=frx,y,θx,y=Fx,y
where the function F , while related to the function f, is not the same! For example, if fr,θ=r θ, then Fx,y=x2+y2 arctany/x. For f, the two arguments are simply multiplied. That is not what happens with F. The two arguments x and y are not simply added. Hence, the use of a different name, a usage that is not always present in the literature.
The chain rule then gives Fx=fr rx+fθ θx and Fy=fr ry+fθ θy. Table 9.3.3(a) then provides the derivatives of r and θ with respect to x and y.
rx=xx2+y2=r cosθr=cosθ
ry=yx2+y2=r sinθr=sinθ
θx=−y/x21+y/x2=−yx2+y2=−r sinθr2=−sinθr
θy=1/x1+y/x2=xx2+y2=r cosθr2=cosθr
Table 9.3.3(a) Derivatives of r and θ with respect to x and y
From Example 9.2.8, i=cosθ⁢er−sinθ eθ,j=sinθ⁢er+cosθ eθ, so
Fx i+Fy j
=fr rx+fθ θxcosθ⁢er−sinθ eθ+fr ry+fθ θysinθ⁢er+cosθ eθ
=fr rx+fθ θxcos(θ)−sin(θ)+fr ry+fθ θysin(θ)cos(θ)
=fr cosθ+fθ −sinθrcos(θ)−sin(θ)+fr sinθ+fθ cosθrsin(θ)cos(θ)
=fr(cos2(θ)+sin2(θ))+fθ(sin(θ)cos(θ)−sin(θ)cos(θ))/rfr(sin(θ)cos(θ)−sin(θ)cos(θ))+fθ(sin2(θ)+cos2(θ))/r
=frfθ/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 polar coordinates
Context Panel: Assign to a Name≻Pc
x=r cosθ,y=r sinθ→assign to a namePc
Define i,j in terms of er,eθ
Copy and paste the set S from Example 9.2.8.
Context Panel: Assign to a Name≻S
i=cosθ⁢er−sinθ eθ,j=sinθ⁢er+cosθ eθ→assign to a nameS
Define F=frx,y,θx,y
Context Panel: Assign to a Name≻F
fx2+y2,arctany,x→assign to a nameF
Apply the chain rule to obtain Fx and Fy, convert to polar coordinates, and simplify.
Expression palette: Evaluation template Calculus palette: Partial-differentiation operator Press the Enter key.
Context Panel: Simplify≻Assuming Positive
Context Panel: Simplify≻Assuming Real Range (Complete dialog as shown to the right.)
Context Panel: Assign to a Name≻Fx (or Fy)
∂∂ x Fx=a|f(x)Pc
D1⁡f⁡r2⁢cos⁡θ2+r2⁢sin⁡θ2,arctan⁡r⁢sin⁡θ,r⁢cos⁡θ⁢r⁢cos⁡θr2⁢cos⁡θ2+r2⁢sin⁡θ2−D2⁡f⁡r2⁢cos⁡θ2+r2⁢sin⁡θ2,arctan⁡r⁢sin⁡θ,r⁢cos⁡θ⁢sin⁡θr⁢cos⁡θ2⁢1+sin⁡θ2cos⁡θ2
→assuming positive
D1⁡f⁡r,arctan⁡sin⁡θ,cos⁡θ⁢r⁢cos⁡θ−D2⁡f⁡r,arctan⁡sin⁡θ,cos⁡θ⁢sin⁡θr
→assuming real range
D1⁡f⁡r,θ⁢r⁢cos⁡θ−D2⁡f⁡r,θ⁢sin⁡θr
→assign to a name
Fx
∂∂ y Fx=a|f(x)Pc
D1⁡f⁡r2⁢cos⁡θ2+r2⁢sin⁡θ2,arctan⁡r⁢sin⁡θ,r⁢cos⁡θ⁢r⁢sin⁡θr2⁢cos⁡θ2+r2⁢sin⁡θ2+D2⁡f⁡r2⁢cos⁡θ2+r2⁢sin⁡θ2,arctan⁡r⁢sin⁡θ,r⁢cos⁡θr⁢cos⁡θ⁢1+sin⁡θ2cos⁡θ2
D1⁡f⁡r,arctan⁡sin⁡θ,cos⁡θ⁢r⁢sin⁡θ+cos⁡θ⁢D2⁡f⁡r,arctan⁡sin⁡θ,cos⁡θr
D1⁡f⁡r,θ⁢r⁢sin⁡θ+cos⁡θ⁢D2⁡f⁡r,θr
Fy
Complete the derivation of the gradient in polar coordinates.
Expression palette: Evaluation template Press the Enter key.
Context Panel: Simplify≻Simplify
Context Panel: Expand≻Expand
Context Panel: Apply a Command (Complete the dialog as per figure to the right.)
Fx i+Fy jx=a|f(x)S
D1⁡f⁡r,θ⁢r⁢cos⁡θ−D2⁡f⁡r,θ⁢sin⁡θ⁢cos⁡θ⁢er−sin⁡θ⁢eθr+D1⁡f⁡r,θ⁢r⁢sin⁡θ+cos⁡θ⁢D2⁡f⁡r,θ⁢sin⁡θ⁢er+cos⁡θ⁢eθr
= simplify
D1⁡f⁡r,θ⁢r⁢er+D2⁡f⁡r,θ⁢eθr
= expand
D1⁡f⁡r,θ⁢er+D2⁡f⁡r,θ⁢eθr
→
∂∂rf⁡r,θ⁢er+∂∂θf⁡r,θ⁢eθr
Unfortunately, the Context Panel does not provide for a conversion of the differential operator notation, so the last step is obtained by selecting from the Context Panel the option "Apply a Command", and applying the convert command as per the figure.
Maple Solution - Coded
Load the Student VectorCalculus package and execute the BasisFormat command.
withStudent:-VectorCalculus:BasisFormatfalse:
F≔fx2+y2,arctany,x:
Differentiate with respect to x, then with respect to y
Apply the diff command.
Apply the eval command to replace x and y with their equivalents in r and θ.
Apply the simplify command with appropriate assumptions on r and θ.
Finally, convert the differential operator notation to partial-derivative notation via convert.
temp≔diffF,x
D1⁡f⁡x2+y2,arctan⁡y,x⁢xx2+y2−D2⁡f⁡x2+y2,arctan⁡y,x⁢yx2⁢y2x2+1
Temp≔simplifyevaltemp,x=r cosθ,y=r sinθ assuming r>0,θ∷RealRangeOpen−π,π
D1⁡f⁡r,θ⁢r⁢cos⁡θ−D2⁡f⁡r,θ⁢sin⁡θr
Fx≔convertTemp,diff
∂∂r⁢f⁡r,θ⁢r⁢cos⁡θ−∂∂θ⁢f⁡r,θ⁢sin⁡θr
temp≔diffF,y
D1⁡f⁡x2+y2,arctan⁡y,x⁢yx2+y2+D2⁡f⁡x2+y2,arctan⁡y,xx⁢y2x2+1
Temp≔simplifyevaltemp,x=r cosθ,y=r sinθ assuming r>0, θ∷RealRangeOpen−π,π
D1⁡f⁡r,θ⁢r⁢sin⁡θ+D2⁡f⁡r,θ⁢cos⁡θr
Fy≔convertTemp,diff
∂∂r⁢f⁡r,θ⁢r⁢sin⁡θ+∂∂θ⁢f⁡r,θ⁢cos⁡θr
From Example 9.2.8, define i and j in terms of er and eθ
S≔i=cosθ⁢er−sinθ eθ,j=sinθ⁢er+cosθ eθ:
Apply the chain rule, writing Fx i+Fy j and simplifying
Make the substitutions in S via the eval command.
Apply the collect command to group the coefficients of er and eθ.
Use the collect command to apply both the simplify and expand commands to the expression.
collectevalFx i+Fy j,S,er,eθ,expand@simplify
∂∂r⁢f⁡r,θ⁢er+∂∂θ⁢f⁡r,θ⁢eθr
<< 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