Chapter 9: Vector Calculus
Section 9.3: Differential Operators
Example 9.3.12
Derive the expression for the curl in spherical coordinates.
Solution
Mathematical Solution
The required derivation can be obtained by writing a general vector in spherical coordinates, then changing coordinates to Cartesian, computing the curl in Cartesian coordinates, and changing coordinates back to spherical. However, while technically feasible, these calculations are far too tedious to implement by hand. They are left to the power of Maple.
Maple Solution - Interactive
Key functionalities are missing from the Context Panel, so this derivation cannot easily be done interactively. (Some essential simplifications possible in the Coded Solution are not yet implemented in the Context Panel.)
Maple Solution - Coded
Initialize
Load the Student VectorCalculus package and execute the BasisFormat command.
withStudent:-VectorCalculus:BasisFormatfalse:
Install a notation-improving device
Implement the declare command in the PDEtools package.
PDEtoolsdeclarefρ,φ,θ,gρ,φ,θ,hρ,φ,θ,quiet
At the present time, the Typesetting tools designed to simplify notation do not work in either of the two VectorCalculus packages. Hence, the resort to the alternate, and older, notational device that suppresses the display of the independent variables and displays partial derivatives as subscripts.
Use the VectorField command to define F as a vector field in spherical coordinates
F≔VectorFieldfρ,φ,θ,gρ,φ,θ,hρ,φ,θ,sphericalρ,φ,θ
f⁡ρ,φ,θg⁡ρ,φ,θh⁡ρ,φ,θ
Use the MapToBasis command to change to Cartesian coordinates
G≔MapToBasisF,cartesianx,y,z
f⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢xx2+y2+z2+g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢zx2+y2⁢x2+y2+z2−h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢yx2+y2f⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢yx2+y2+z2+g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢y⁢zx2+y2⁢x2+y2+z2+h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢xx2+y2f⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢zx2+y2+z2+g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢−x2−y2x2+y2⁢x2+y2+z2
Use the Curl command to obtain the curl of this Cartesian vector field
curlG≔simplifyCurlG
−D1⁡g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢y⁢x2+y2⁢x2+D1⁡g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2⁢y3+D1⁡g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2⁢y⁢z2+D1⁡h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢x2+y2+z2⁢x2+y2⁢z−D2⁡f⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2+z2⁢x2+y2⁢y−D3⁡f⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢x2+y2+z2⁢z+D3⁡g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢x2+y2+z2⁢x2+y2+g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢y⁢x2+y2+z2⁢x2+y2−D2⁡h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x3−D2⁡h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢y2x2+y2⁢x2+y2+z2D1⁡g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2⁢x3+D1⁡g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢x2+y2⁢y2+D1⁡g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢x2+y2⁢z2−D1⁡h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2+z2⁢x2+y2⁢y⁢z+D3⁡f⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2+z2⁢y⁢z−D3⁡g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢y⁢x2+y2+z2⁢x2+y2−D2⁡f⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢x2+y2+z2⁢x2+y2+g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢x2+y2+z2⁢x2+y2+D2⁡h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2⁢y+D2⁡h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢y3x2+y2⁢x2+y2+z2−−D1⁡h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x4−2⁢D1⁡h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2⁢y2−D1⁡h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2⁢z2−h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2+z2⁢x2+D3⁡g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2⁢z+D3⁡f⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2⁢x2−D1⁡h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢y4−D1⁡h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢y2⁢z2−h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2+z2⁢y2−h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2+z2⁢z2+D3⁡g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢y2⁢z+D3⁡g⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢z3+D3⁡f⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2⁢y2+D3⁡f⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2⁢z2−D2⁡h⁡x2+y2+z2,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2⁢x2+y2+z2⁢zx2+y2⁢x2+y2+z23/2
Use the eval command followed by the simplify command to replace x2+y2+z2 with ρ2.
curlGs≔simplifyevalcurlG,x2+y2+z2=ρ2 assuming ρ>0
−D1⁡g⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢y⁢x2+y2⁢x2+D1⁡g⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2⁢y3+D1⁡g⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2⁢y⁢z2+D1⁡h⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢ρ⁢x2+y2⁢z−D2⁡f⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢ρ⁢x2+y2⁢y+g⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢y⁢ρ⁢x2+y2+D3⁡g⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢ρ⁢x2+y2−D3⁡f⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢ρ⁢z−D2⁡h⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x3−D2⁡h⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢y2x2+y2⁢ρ2D1⁡g⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x2+y2⁢x3+D1⁡g⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢x2+y2⁢y2+D1⁡g⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢x2+y2⁢z2−D1⁡h⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢ρ⁢x2+y2⁢y⁢z+D3⁡f⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢ρ⁢y⁢z−D3⁡g⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢y⁢ρ⁢x2+y2−D2⁡f⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢ρ⁢x2+y2+g⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x⁢ρ⁢x2+y2+D2⁡h⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢x2⁢y+D2⁡h⁡ρ,arctan⁡x2+y2,z,arctan⁡y,x⁢y3x2+y2⁢ρ2D1⁡h⁡ρ,arctan⁡x2+y2,