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ρ,φ,θ
Use the MapToBasis command to change to Cartesian coordinates
G≔MapToBasisF,cartesianx,y,z
Use the Curl command to obtain the curl of this Cartesian vector field
curlG≔simplifyCurlG
Use the eval command followed by the simplify command to replace x2+y2+z2 with ρ2.
curlGs≔simplifyevalcurlG,x2+y2+z2=ρ2 assuming ρ>0
Use the MapToBasis and simplify commands to change this vector to spherical coordinates
Q≔simplifyMapToBasiscurlGs,sphericalρ,φ,θassuming ρ>0,φ∷RealRange0,π,θ∷RealRangeOpen−π,π
Use the convert command to change to partial-derivative notation, then map an expand onto the result.
mapexpand,convertQ,diff
Apply the Curl command directly to the vector field F, then map an expand onto the result.
mapexpand,CurlF
<< 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