Talk:PlanetPhysics/Transformation Between Cartesian Coordinates and Polar Coordinates

Original TeX Content from PlanetPhysics Archive
%%% This file is part of PlanetPhysics snapshot of 2011-09-01 %%% Primary Title: transformation between cartesian coordinates and polar coordinates %%% Primary Category Code: 02.40.Hw %%% Filename: TransformationBetweenCartesianCoordinatesAndPolarCoordinates.tex %%% Version: 11 %%% Owner: bloftin %%% Author(s): bloftin %%% PlanetPhysics is released under the GNU Free Documentation License. %%% You should have received a file called fdl.txt along with this file. %%% If not, please write to gnu@gnu.org. \documentclass[12pt]{article} \pagestyle{empty} \setlength{\paperwidth}{8.5in} \setlength{\paperheight}{11in}

\setlength{\topmargin}{0.00in} \setlength{\headsep}{0.00in} \setlength{\headheight}{0.00in} \setlength{\evensidemargin}{0.00in} \setlength{\oddsidemargin}{0.00in} \setlength{\textwidth}{6.5in} \setlength{\textheight}{9.00in} \setlength{\voffset}{0.00in} \setlength{\hoffset}{0.00in} \setlength{\marginparwidth}{0.00in} \setlength{\marginparsep}{0.00in} \setlength{\parindent}{0.00in} \setlength{\parskip}{0.15in}

\usepackage{html}

% this is the default PlanetMath preamble. as your knowledge % of TeX increases, you will probably want to edit this, but % it should be fine as is for beginners.

% almost certainly you want these \usepackage{amssymb} \usepackage{amsmath} \usepackage{amsfonts}

% used for TeXing text within eps files %\usepackage{psfrag} % need this for including graphics (\includegraphics) %\usepackage{graphicx} % for neatly defining theorems and propositions %\usepackage{amsthm} % making logically defined graphics %\usepackage{xypic}

% there are many more packages, add them here as you need them

% define commands here

\begin{document}

From the definition of a contravariant \htmladdnormallink{vector}{http://planetphysics.us/encyclopedia/Vectors.html} (contravariant \htmladdnormallink{tensor}{http://planetphysics.us/encyclopedia/Tensor.html} of rank 1)

\begin{equation} \bar{T}^{i} = T^{j}\frac{\partial \bar{x}^{i}}{\partial x^{j}} \end{equation}

we get the transformation \htmladdnormallink{matrix}{http://planetphysics.us/encyclopedia/Matrix.html} from the partial derivatives

\begin{equation} A_{ij} = \frac{\partial \bar{x}^{i}}{\partial x^{j}} \end{equation}

In order to calculate the transformation matrix, we need the equations relating the two coordinates \htmladdnormallink{systems}{http://planetphysics.us/encyclopedia/SimilarityAndAnalogousSystemsDynamicAdjointnessAndTopologicalEquivalence.html}. For cartesian to polar, we have

$$ r = \sqrt{ x^2 + y^2 } $$ $$ \theta = tan^{-1}\left( \frac{y}{x} \right) $$

and for polar to cartesian

$$ x = r \cos \theta $$ $$ y = r \sin \theta $$

So if we designate $(x,y)$ as the bar coordinates, then the transformation components from polar coordinates $(r,\theta)$ to cartesian coordinates $(x,y)$ is calculted as

$$ A_{11} = \frac{\partial \bar{x}^{1}}{\partial x^{1}} = \frac{\partial x}{\partial r} = \cos \theta$$

$$ A_{12} = \frac{\partial \bar{x}^{1}}{\partial x^{2}} = \frac{\partial x}{\partial \theta} = -r \sin \theta$$

$$ A_{21} = \frac{\partial \bar{x}^{2}}{\partial x^{1}} = \frac{\partial y}{\partial r} = \sin \theta$$

$$ A_{22} = \frac{\partial \bar{x}^{2}}{\partial x^{2}} = \frac{\partial y}{\partial \theta} = r \cos \theta$$

The components from cartesian coordinates to polar coordinates transform the same way, but now the polar coordinates have the bar

$$ B_{11} = \frac{\partial \bar{x}^{1}}{\partial {x}^{1}} = \frac{\partial r}{\partial x} = \frac{x}{\sqrt{x^2 + y^2}}$$

$$ B_{12} = \frac{\partial \bar{x}^{1}}{\partial {x}^{2}} = \frac{\partial r}{\partial y} = \frac{y}{\sqrt{x^2 + y^2}}$$

$$ B_{21} = \frac{\partial \bar{x}^{2}}{\partial {x}^{1}} = \frac{\partial \theta}{\partial x} = -\frac{y}{x^2 + y^2}$$

$$ B_{22} = \frac{\partial \bar{x}^{2}}{\partial {x}^{2}} = \frac{\partial \theta}{\partial y} = \frac{x}{x^2 + y^2}$$

In summary, the {\bf components of contravariant vectors} in cartesian coordinates and polar coordinates transform between each other according to

$$ \left[ \begin{array}{c} x \\ y \end{array} \right] = \left[ \begin{array}{cc} \cos \theta & -r \sin \theta \\ \sin \theta & r \cos \theta \end{array} \right] \left[ \begin{array}{c} r \\ \theta \end{array} \right]$$

$$ \left[ \begin{array}{c} r \\ \theta \end{array} \right] = \left[ \begin{array}{cc} \frac{x}{\sqrt{x^2 + y^2}} & \frac{y}{\sqrt{x^2 + y^2}} \\ -\frac{y}{x^2 + y^2} & \frac{x}{x^2 + y^2} \end{array} \right] \left[ \begin{array}{c} x \\ y \end{array} \right]$$

\end{document}

There is an error in the last matrix equation in the page. The result for the $\theta$ is always zero
Daniel Volinski (discuss • contribs) 16:12, 5 August 2021 (UTC)