Notebook

Maths

In [23]:
% run maths_functions.py

Coodinates and Complex Numbers

Cartesian Coordinates

Cartesian coordinates are the typical coordinates (x,y) used for 2D and (x,y,z) used for 3D. For vector notation they can be described with the unit vectors pointing in their axes' direction as $(\hat{i}, \hat{j}, \hat{k})$.

A function in cartesian coordinates is often defined as $y=f(x)$ or $z=f(x,y)$.

Polar Coordinates

In a polar coordinate system, instead of the displacement cartesian coordinate measures x and y, a point is describe by the distance it is from the origin (0,0) and the angle at which the point is compared to the normal axis for x. The distance and angle are denoted with $r$ and $\theta$.

Conversion from Cartesian to Polar coordinates and vice versa is done the following way:

$r = x^2 + y^2, \phi = \tan ^{-1} \cfrac{y}{x}$

$x = r.\cos{\phi}, y = r.\sin{\phi}$

A polar function is usually defined as $r=f(\phi)$

These coordinates make it easier to define radial functions such as $r=3$ which is a function for a circle with radius 3. In comparison, cartesian coordinates are simpler for functions of lines, such as $y=3$ which defines a line at 3 units above the y=0 axis.

For 3D-polar coordinates, the variables are $(r,\phi,z)$ where z is equivalent to the cartesian coordinate. This makes this system suitabke for definitions of cyllindrical shapes as well.

Spherical Coordinates

Spherical Coordinates are the same as Polar with the exception that in 3D the third coordinate is $\theta$, not $z$. $\theta$ defines the angle between the z-axis and the positional vector to the point.

Complex Numbers

A complex number is a number in the form of $x+iy$, where x and y are real numbers and i is the square root of -1 and is the so-called imaginary unit. In many engineering disciplines, as well as in this book, the imaginary unit is often shown as $j$ to avoid confusion with other i's'such as the $i(t)$ denoting alternating current. Complex numbers are a useful abstract quantities and can be used to better visualise and understand many concepts in engineering such as vectors, real and imaginary power and others.

For y=0, all complex numbers contain the real numbers. Therefore, real number domain $R$ is a substed of the complex number domain $C$.

A complex number can be easily represented on a cartesian coordinate plot (Also called Argant diagram when used for complex numbers) where x and y are the values of their respective axes. They can also be represented as vectors to these points or as polar coordinates.

To represent a complex number in polar coordinates:

$z = x+iy= r.e^\theta$

This conversion is important because it shows that the power of a complex number can be beneficial. eg. $z^n = (r.e^\theta)^n = r^n.e^{n.\theta}$ where the magnitude $r^n$ and the angle $n.\theta$ can be calculated easily.

Table of Contents