Showing posts with label y-intercept. Show all posts
Showing posts with label y-intercept. Show all posts

Saturday, September 28, 2019

fx-260 Solar Algorithms Part I

fx-260 Solar Algorithms Part I

All results are shown to screen accuracy. 

Sphere:  Surface Area and Volume

With the radius r,
the surface area is S = 4 * π * r^2
the volume area is V = 4/3 * π * r^3

Algorithm:
r  [SHIFT] (Min) [ x² ] [ × ] [EXP](π) [ × ] 4 [ = ]    // surface area is displayed
[ × ] [ MR ] [ ÷ ] 3 [ = ]   // area is displayed

M = r

Example:
Input:
r = 3.86

Results:
3.86  [SHIFT] (Min) [ x² ] [ × ] [EXP](π) [ × ] 4 [ = ]   
Surface Area = 187.2338956

[ × ] [ MR ] [ ÷ ] 3 [ = ] 
Volume = 204.9076123

Monthly Payment of a Mortgage or Auto Loan

Input:
A = amount of the mortgage/loan
I = annual interest rate
N = number of months

The monthly payment can be found by:
PMT = ( 1 - (1 + I/1200)^-N) / (I/1200)

Algorithm:
I [ ÷ ] 1200 [ = ] [SHIFT] (Min)   // stores I/1200 into M
1 [ - ] [ ( ] 1 [ + ] [ MR ] [ ) ] [ x^y ] N [ +/- ] [ = ]
[SHIFT] (1/x) [ × ] [ MR ] [ × ] A [ = ]     // monthly payment

Example:
Input: 
I = 4  (4%)
N = 360
A = 85000

Result:
4 [ ÷ ] 1200 [ = ] [SHIFT] (Min)   // stores I/1200 into M
1 [ - ] [ ( ] 1 [ + ] [ MR ] [ ) ] [ x^y ] 360 [ +/- ] [ = ]
[SHIFT] (1/x) [ × ] [ MR ] [ × ] 85000 [ = ]     // monthly payment

PMT = 405.8030014   ($405.80)
(I/1200 = M = 3.333333333E-03)

Electromagnetic Field Strength 

Given the EIRP (effective isotropic radiated power) of a microwave (in Watts), we can calculate the following:

Power Flux Density: 
S = EIRP / (4 * π * d^2)   (W/m^2,  d = distance from the wave source in meters)

Electric Field:
E = √(30 * EIRP) /  d   (W/m)

Magnetic Field:
H = √(EIRP / (480 * π^2 * d^2) )  (A/m)

Algorithm:

Calculating Power Flux: 
EIRP [ ÷ ] [ ( ] 4 [ × ] [EXP](π) [ × ]  d [ x² ] [ ) ] [ = ]

Calculating Electric Field: 
[ ( ] EIRP [ × ] 30 [ ) ] [SHIFT] (√) [ ÷ ] 0.5 [ = ]

Calculating Magnetic Field:
[ ( ] EIRP [ ÷ ] [ ( ] 480 [ × ] [EXP](π) [ x² ] [ × ] d [ x² ] [ ) ] [ ) ] [ √ ] [ = ]

Example:
Input:
EIRP = 1800 W
d =  0.5 m   (distance)

Results:

Calculating Power Flux: 
1800 [ ÷ ] [ ( ] 4 [ × ] [EXP](π) [ × ]  0.5 [ x² ] [ ) ] [ = ]
Power Flux: 572.9577951 W/m^2

Calculating Electric Field: 
[ ( ] 1800 [ × ] 30 [ ) ] [SHIFT] (√) [ ÷ ] 0.5 [ = ]
Electric Field: 464.7580015 W/m

Calculating Magnetic Field:
[ ( ] 1800 [ ÷ ] [ ( ] 480 [ × ] [EXP](π) [ x² ] [ × ] 0.5  [ x² ] [ ) ] [ ) ] [ √ ] [ = ]
Magnetic Field: 1.232808888 A/m

Source:  Barue, Gerardo.  Microwave Engineering: Land & Space Radiocommunications John Wiley & Sons, Inc.  Hoboken, NJ  ISBN 978-0-470-08966-5 2008

Slope and Intercept with Two Points

Given two points of a line (x1, y1) and (x2, y2) we can find the slope (a) and y-intercept (b) of the general linear equation y = a*x + b.

The trick is to use the rectangular to polar conversion to find the slope:
θ = atan((y2 - y1)/(x2 -x1))
tan θ = (y2 - y1)/(x2 -x1) = slope = a

Once the slope is found, we can solve for the y-intercept:
y = a*x + b
b = y - a*x

Algorithm:
[ ( ] x1 [ - ] x2 [ ) ] [SHIFT] (R→P) [ ( ] y1 [ - ] y2 [ ) ] [ = ] [SHIFT] (X<>Y) [ tan ]
// slope is displayed

[ × ] x1* [ +/- ] [ + ] y1* [ = ]
// intercept is displayed

*x2 and y2 can be used instead

Example:
(x1, y1) = (8, 5.5)
(x2, y2) = (4, 9.5)

Result:
[ ( ] 8 [ - ] 4 [ ) ] [SHIFT] (R→P) [ ( ] 5.5 [ - ] 9.5 [ ) ] [ = ] [SHIFT] (X<>Y) [ tan ]

Slope: -1

[ × ] 8 [ +/- ] [ + ] 5.5 [ = ]

Slope: 13.5


Tomorrow will be Part II. 

Eddie

All original content copyright, © 2011-2019.  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.

Tuesday, March 6, 2012

Spirals


All About Spirals

This blog will about spirals. Why? I thought it would be fun. And I like spirals.


Regular Spirals

Source: http://www.mathematische-basteleien.de/spiral.htm

Equations:
Rectangular
x^2 + y^2 = a^2 (arctan y/x)^2

Polar
r = a θ

Parametric
x = a t cos t
y = a t sin t


Finding the y-intercept and x-intercept, as shown above, of a spiral, assuming 0 ≤ θ ≤ 2 π

We can use the rectangular equation to find these points.

x^2 + y^2 = a^2 (arctan y/x)^2

Y-Intercept - Point (0, y)

y^2 = a^2 (arctan y/0)^2

Note:
1. y/0 is undefined
2. tan (π /2) is undefined. So is tan (n π / 2) where n is an integer.

Use π / 2 as a solution.

Then:

y^2 = a^2 * (π / 2)^2

Take the square root of both sides, since y>0, use the positive root.

y = a * π / 2

The y-intercept is (0, a * π / 2)

X-Intercept - Point (x, 0)

x^2 = a^2 (arctan 0)^2

Note tan(n π.)=0 where n is an integer. Let's use π. (n = 1)

x^2 = a^2 π^2

Since the x-intercept lies left of 0, select the negative square roof. Therefore:

x = -a π.

The x-intercept is (-a π, 0).

Area of a Spiral (0 ≤ θ ≤ 2 π)

Use the polar equation: r = a θ

Using the general polar integral:

A = ∫ (1/2 * r^2 d θ , lower limit, upper limit)

A = ∫ (1/2 * a^2 * θ^2 d θ , 0, 2 π)
= a^2 / 2 * (8 π^3 / 3 - 0)
= 4 a^2 π^3 / 3

Slope of a Spiral

Polar Form:

∂r/∂θ = a

Parametric Form:

∂x/∂t = ∂/∂t (a * t * cos t)
= ∂/∂t (a * t) * cos t + a * t * ∂/∂t (cos t)
= a * cos t - a * t * sin t
= a * (cos t - t * sin t)

∂y/∂t = ∂/∂t (a * t * sin t)
= ∂/∂t (a * t) * sin t + a * t * ∂/∂t (sin t)
= a * sin t + a * t * cos t
= a * (sin t + t * cos t)

Stretch Spirals

What if we can "stretch" spirals? We can if alter the parameters of the parametric form:

x(t) = a * t * cos t
y(t) = b * t * sin t

Where a ≠ b.

Two graphical examples are shown below.


Finding the Intercepts of a Stretched Spiral

I will assume that both a ≠ 0 and b ≠ 0.

Y-Intercept: Point (0, y)

0 = a * t * cos t
y = b * t * sin t

Working with the first equation:

0 = a * t * cos t
0 = t * cos t,

which implies that either t = 0 or cos t = 0

We know that cos (n π / 2) = 0 where n is an integer. Choose t = π / 2.

Then y = b * π / 2 * sin(π / 2) = b * π / 2

Then the y-intercept is (0, π / 2).

X-Intercept: Point (x, 0)

x = a * t * cos t
0 = b * t * sin t

Working with the second equation:
0 = b * t * sin t
0 = t * sin t

which implies that t = 0 or sin t = 0. We know that sin(n π) = 0 where n is an integer, let's choose n = 1 and then t = π.

Hence x = a * π * cos π = -a * π.

The x-intercept is (-a * π, 0)

Area of a Stretched Spiral

We can find the area using the following:

∫ y dx = ∫ y(t) d[x(t)]

Note that:
1. y(t) = b * t * sin t
2. d[x(t)] = a * (cos t - t * sin t) dt
3. y(t) d[x(t)] = a * b * (t * sin t * cos t - t^2 * sin^2 t)

Let Φ = (t * sin t * cos t - t^2 * sin^2 t)

The integration is split into two intervals: [0, π] and [π, 2 π]. Due to the direction of the spiral, the limits are switched.

Then the area is:
A = a * b * ( ∫ (Φ dt, π , 0 ) + ∫ ( Φ dt, 2 π , π ) )
(via Hewlett Packard HP 50g and TI nSpire CX CAS)
= a * b * (π^3 / 6 + 7 * π^3 / 6)
= a * b * (4 π / 3)

Slope of a Stretched Spiral

The derivation is similar to the slope of a regular spiral.

∂x / ∂t = a * ( cos t - t * sin t )
∂y / ∂t = b * ( sin t + t * cos t )


Until next time, Eddie.



This blog is property of Edward Shore. (c) 2012

RPN: DM32 and DM42: Stopping Sight Distance (Metric)

RPN: DM32 and DM42: Stopping Sight Distance (Metric) The Stopping Sight Distance Formula – Derivation The stopping sight di...