Re: polar coordinates
- To: mathgroup at smc.vnet.net
- Subject: [mg13469] Re: polar coordinates
- From: Paul Abbott <paul at physics.uwa.edu.au>
- Date: Sun, 26 Jul 1998 02:33:32 -0400
- Organization: University of Western Australia
- References: <6p6pba$5g7@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Toshiyuki Meshii wrote: > Let me know the way to work with patial differentiation on polar > coordinates. > For examples, when > x = r Cos[q] and y = r Sin[q] > how can you obtain > du[x,y]/dx = Cos[q] * (du[x,y]/dr) - Sin[q] / r * (du[x,y]/dq) by > Mathematica? I see from my copy of the attached Notebook that it may have been corrupted (due to a problem with TraditionalForm notation). I have attached another copy which uses StandardForm. Cheers, Paul ____________________________________________________________________ Paul Abbott Phone: +61-8-9380-2734 Department of Physics Fax: +61-8-9380-1014 The University of Western Australia Nedlands WA 6907 mailto:paul at physics.uwa.edu.au AUSTRALIA http://www.pd.uwa.edu.au/~paul God IS a weakly left-handed dice player ____________________________________________________________________ (*********************************************************************** Mathematica-Compatible Notebook This notebook can be used on any computer system with Mathematica 3.0, MathReader 3.0, or any compatible application. The data for the notebook starts with the line containing stars above. To get the notebook into a Mathematica-compatible application, do one of the following: * Save the data starting with the line of stars above into a file with a name ending in .nb, then open the file inside the application; * Copy the data starting with the line of stars above to the clipboard, then use the Paste menu command inside the application. Data for notebooks contains only printable 7-bit ASCII and can be sent directly in email or through ftp in text mode. Newlines can be CR, LF or CRLF (Unix, Macintosh or MS-DOS style). NOTE: If you modify the data for this notebook not in a Mathematica- compatible application, you must delete the line below containing the word CacheID, otherwise Mathematica-compatible applications may try to use invalid cache data. For more information on notebooks and Mathematica-compatible applications, contact Wolfram Research: web: http://www.wolfram.com email: info at wolfram.com phone: +1-217-398-0700 (U.S.) Notebook reader applications are available free of charge from Wolfram Research. ***********************************************************************) (*CacheID: 232*) (*NotebookFileLineBreakTest NotebookFileLineBreakTest*) (*NotebookOptionsPosition[ 4287, 136]*) (*NotebookOutlinePosition[ 5131, 163]*) (* CellTagsIndexPosition[ 5087, 159]*) (*WindowFrame->Normal*) Notebook[{ Cell[CellGroupData[{ Cell["Polar Coordinates", "Section"], Cell[TextData[{ "For the change of variables, ", Cell[BoxData[ \(TraditionalForm \`{x, y} \[Rule] {r\ \(cos(\[Theta])\)\ , r\ \(sin(\[Theta])\)}\)]], ", first compute and save the matrix of partial derivatives:" }], "Text"], Cell[BoxData[ \(Clear[Derivative]\)], "Input"], Cell[BoxData[ \(\(Evaluate[Outer[D, {r[x, y], \[Theta][x, y]}, {x, y}]] = Simplify[Inverse[ Outer[D, {r\ Cos[\[Theta]], r\ Sin[\[Theta]]}, {r, \[Theta]}]] /. {r \[Rule] r[x, y], \[Theta] \[Rule] \[Theta][x, y]}]; \)\)], "Input"], Cell["The operator you are computing becomes", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Simplify[ \(Dt[u[r, \[Theta]], x] /. Literal[Dt[h_, t_]] \[RuleDelayed] \[PartialD]\_t h[x, y]\) /. {r[x, y] \[Rule] r, \[Theta][x, y] \[Rule] \[Theta]}]\)], "Input"], Cell[BoxData[ FormBox[ RowBox[{ RowBox[{\(cos(\[Theta])\), " ", RowBox[{ SuperscriptBox["u", TagBox[\((1, 0)\), Derivative], MultilineFunction->None], "(", \(r, \[Theta]\), ")"}]}], "-", FractionBox[ RowBox[{\(sin(\[Theta])\), " ", RowBox[{ SuperscriptBox["u", TagBox[\((0, 1)\), Derivative], MultilineFunction->None], "(", \(r, \[Theta]\), ")"}]}], "r"]} ], TraditionalForm]], "Output"] }, Open ]], Cell["Similarly, the Laplacian reads", "Text"], Cell[CellGroupData[{ Cell[BoxData[ \(Simplify[ \(Dt[u[r, \[Theta]], {x, 2}] + Dt[u[r, \[Theta]], {y, 2}] /. Literal[Dt[h_, t_]] \[RuleDelayed] \[PartialD]\_t h[x, y]\) /. {r[x, y] \[Rule] r, \[Theta][x, y] \[Rule] \[Theta]}]\)], "Input"], Cell[BoxData[ FormBox[ RowBox[{ FractionBox[ RowBox[{ SuperscriptBox["u", TagBox[\((0, 2)\), Derivative], MultilineFunction->None], "(", \(r, \[Theta]\), ")"}], \(r\^2\)], "+", FractionBox[ RowBox[{ SuperscriptBox["u", TagBox[\((1, 0)\), Derivative], MultilineFunction->None], "(", \(r, \[Theta]\), ")"}], "r"], "+", RowBox[{ SuperscriptBox["u", TagBox[\((2, 0)\), Derivative], MultilineFunction->None], "(", \(r, \[Theta]\), ")"}]}], TraditionalForm]], "Output"] }, Open ]] }, Open ]] }, FrontEndVersion->"3.5 for Macintosh", ScreenRectangle->{{0, 800}, {0, 580}}, WindowSize->{520, 485}, WindowMargins->{{60, Automatic}, {Automatic, 28}}, MacintoshSystemPageSetup->"\<\ 00<0001804P00000=j8W4?m0oeThGBNb0dL5N`?P0080001804P000000`d26P01 0000I00000400 at 410?l00BL?00400@0000000000000000P801T1T0000000H000 00000000004000000000000000000000\>" ] (*********************************************************************** Cached data follows. If you edit this Notebook file directly, not using Mathematica, you must remove the line containing CacheID at the top of the file. The cache data will then be recreated when you save this file from within Mathematica. ***********************************************************************) (*CellTagsOutline CellTagsIndex->{} *) (*CellTagsIndex CellTagsIndex->{} *) (*NotebookFileOutline Notebook[{ Cell[CellGroupData[{ Cell[1739, 51, 36, 0, 50, "Section"], Cell[1778, 53, 241, 6, 46, "Text"], Cell[2022, 61, 50, 1, 27, "Input"], Cell[2075, 64, 265, 5, 75, "Input"], Cell[2343, 71, 54, 0, 30, "Text"], Cell[CellGroupData[{ Cell[2422, 75, 212, 4, 59, "Input"], Cell[2637, 81, 578, 16, 46, "Output"] }, Open ]], Cell[3230, 100, 46, 0, 30, "Text"], Cell[CellGroupData[{ Cell[3301, 104, 246, 4, 75, "Input"], Cell[3550, 110, 709, 22, 47, "Output"] }, Open ]] }, Open ]] } ] *) (*********************************************************************** End of Mathematica Notebook file. ***********************************************************************)