Showing posts with label rectangular to polar conversions. Show all posts
Showing posts with label rectangular to polar conversions. Show all posts

Sunday, November 14, 2021

Casio fx-CG 50: Functions as Polar Graphs

Casio fx-CG 50:  Functions as Polar Graphs


Introduction


The function y = f(x) and equations in the form f(x,y) = g(x,y) can be transformed into its polar form by applying the transformations:


x = r cos Θ

y = r sin Θ


It can be a challenge getting the transformed equation in the form r = w(Θ), but it seems to work best where f(x,y) and g(x,y) are polynomials.   


The following are graphs generated with a Casio fx-CG 50:


Function, y(x):   green with connected line

Polar Function, r(Θ):  blue with dots 


Graphs


# 1:

y = x^2, r = sin Θ ÷ (cos Θ)^2 and r = 0





# 2:

y = x^3, r = ±√(sin Θ) ÷ (cos Θ)^(2/3) and r = 0





# 3:

y = 3x - 4, r = 4 ÷ (3 cos Θ - sin Θ)





General:  y = ax + b, r = -b ÷ (a cos Θ - sin Θ)


# 4:

y = 1/3 * (x - 4), r = -4 ÷ (3 sin Θ - cos Θ)





General:  ay = x + b, r = b ÷ (a sin Θ - cos Θ)


# 5:

y = ±√x, r = cos Θ ÷ (sin Θ)^2





# 6:

y = x^2 + x, r = tan Θ ÷ cos Θ - 1 ÷ cos Θ





# 7:

y = 1/x, r = √(1 ÷ (cos Θ sin Θ))





Eddie 


All original content copyright, © 2011-2021.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author. 


Monday, February 8, 2021

An Alternative Way of Finding the Angle in a Rectangular to Polar Conversion

An Alternative Way of Finding the Angle in a Rectangular to Polar Conversion


Welcome to a special Monday edition of Eddie’s Math and Calculator Blog. 


The Traditional Method


Often we are required to find polar coordinates of a given point (x,y).   Finding the radius, r, is fairly simple:


r = √(x^2 + y^2) 


When talking about complex numbers, r represents the absolute value of x + yi where i = √-1.


Finding the angle, θ, often uses the formula:


θ = atan(y/x)


In complex numbers, θ represents the argument (arg) function.


On a scientific calculator the range of the arctangent function is ( -90°, 90° ).  (open interval).   In finding the true angle, adjustments will be required:





Let a = atan(y/x). Then: 


Quadrant I (x and y are both positive):  θ = a

Quadrant II (x is negative, y is positive): θ = a + 180°

Quadrant III (x and y are both negative):  θ = a - 180°

Quadrant IV (x is positive, y is negative):  θ = a 


If you are working with radian angle measures, know that 90° = π/2, and 180° = π.


This does not take into consideration situations where either x or y is 0:


If x > 0 and y = 0:  θ = 0°

If x = 0 and y > 0:  θ = 90°

If x < 0 and y = 0:  θ = 180°

If x = 0 and y < 0:  θ = -90°


Is there a shorter way to calculate θ?  


The Vector Method


Consider the point (x, y) as a vector [x, y].   Now draw another vector [x, 0].  In a regular Cartesian coordinate system, angles are measured from the x-axis counter clockwise.  





Let a and b represent two vectors.  Then the angle between two vectors are:


cos θ = (a ● b) / ( ||a|| ||b|| ) = dot(a,b) / ( norm(a) * norm(b) )


with:

dot(a,b) = a1 * b1 + a2 * b2

norm(a) = √(a1^2 + a2^2)

norm(b) = √(b1^2 + b2^2)


Let a = [x, y] and b = [x, 0].  Then:


cos θ = (x^2) / (√(x^2 + y^2) * √(x^2))

cos θ = (x^2) / (√(x^2 + y^2) * x)

cos θ = x / √(x^2 + y^2)

θ = acos( x / √(x^2 + y^2) )


The range of the arccosine function of a calculator is [ 0°, 180° ].  


If y < 0, the angle would be measured clockwise, and therefore I would make the adjustment:

θ = -acos( x / √(x^2 + y^2) )


In summary:

If y ≥ 0, θ = acos( x / √(x^2 + y^2) )

If y < 0, then θ = -acos( x / √(x^2 + y^2) )


Examples:


Find the angle, in degrees, in a rectangular to polar conversions:


Quadrant I  (2, 4):  y ≥ 0:   θ = acos( 2 / √(2^2 + 4^2) ) ≈ 63.43494882°


Quadrant II (-2, 4):  y ≥ 0:    θ = acos( -2 / √((-2)^2 + 4^2) ) ≈ 116.5650512°


Quadrant II (-2, -4):  y < 0:  θ = -acos( (-2) / √((-2)^2 + (-4)^2) ) ≈ -116.5650512°


Quadrant IV (2, -4):  y < 0:  θ = -acos( 2) / √(2^2 + (-4)^2) ) ≈ -63.43494882°


Vector Method for Navigation


In navigation, angles start from true North (up) and rotate clockwise towards East (right).  Angles are measured from 0° to 360°.


Use the vectors [0, N] and [E, N], then the angle between these vectors are:

If E ≥ 0,  θ = acos( N / √(E^2 + N^2))

If E < 0, θ = 360° - acos( N / √(E^2 + N^2))


Note:  This is the first blog entry that I have typed on Google Docs.  I have been using Windows app Wordpad for the last three years.   I am testing Google apps as I am considering buying a Chromebook.


Eddie


All original content copyright, © 2011-2021.  Edward Shore.   Unauthorized use and/or unauthorized distribution for commercial purposes without express and written permission from the author is strictly prohibited.  This blog entry may be distributed for noncommercial purposes, provided that full credit is given to the author.


DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues

DM42 and HP 42S: Quadratic Equation, Characteristic Polynomial, and Eigenvalues The programs are listed for the Swiss Micros DM42 an...