Sunday, March 11, 2018

Fun with the Texas Instruments TI-60


Fun with the Texas Instruments TI-60

Notes:

1.  I like to have the user input all the values into the registers before running the program.  This way, we can save program steps because the calculator doesn’t have to stop to ask for inputs.  Also, you don’t have to change all the values for different problems.  Finally, R/S can be used for only output.

2.  I keep register 0 (R0) out so that the user can have at least one register to store immediate results in further calculations.  I list the minimum partition for each program.


Great Circle Distance (in miles)

Formula:
D = acos (sin ϕ1 * sin ϕ2 + cos ϕ1 * cos ϕ2 * cos (λ1 – λ2)) * 3959 * π/180

Note: for kilometers, replace 3959 with 6371.

Where:
ϕ1, ϕ2:  Latitude of locations 1, 2; north is positive, south is negative
λ1, λ2:  Longitude of locations 1, 2:  east is positive, west is negative

Store before running:
R1:  ϕ1 as a decimal (convert from DMS if necessary)
R2:  λ1
R3: ϕ2
R4: λ2
Set the TI-60 in degrees mode.

Program (41 steps) – 2nd Part 5:
PG
OP
Key
PG
OP
Key
00
71
RCL
21
04
4
01
01
1
22
54
)
02
32
SIN
23
33
COS
03
65
*
24
95
=
04
71
RCL
25
12
INV
05
03
3
26
33
[COS]  (COS^-1)
06
32
SIN
27
65
*
07
85
+
28
03
3
08
71
RCL
29
09
9
09
01
1
30
05
5
10
33
COS
31
09
9
11
65
*
32
65
*
12
71
RCL
33
91
π
13
03
3
34
55
÷
14
33
COS
35
01
1
15
65
*
36
08
8
16
53
(
37
00
0
17
71
RCL
38
95
=
18
02
2
39
13
R/S
19
75
-
40
22
RST
20
71
RCL




Example:

Los Angeles:  ϕ = 34°13’ = 34.21666667°, λ = -(118°15’) = -(118.25°)
London:  ϕ = 51°30’26” = 51.50722222°, λ = -(0°7’39”) = -(0.1275°)

Result:  5431.617778 mi

Tip: For DMS-DD conversions: if you have a negative angle, enter the angle without the negative sign, do the conversion DMS-DD, then press [ +/- ].

Impedance of a Series Resonance Circuit

This program gives both the magnitude and phase angle. 

Impedance:   Z = R + j*(ω*L – 1/(ω*C))
Where:  ω = 2*π*F
Magnitude:  abs(Z)
Phase Angle:  arg(Z)

Variables:
R = resistance ( Ω )
C = capacitor ( farads )
L = inductor ( henrys )
F = Frequency (Hz)

Store before running:
R1:  R
R2:  C
R3:  L
R4:  F
Set the TI-60 in degrees mode.

Program (35 steps) – 2nd Part 5:
PG
OP
Key
PG
OP
Key
00
02
2
18
02
2
01
65
*
19
54
)
02
91
π
20
76
1/x
03
65
*
21
95
=
04
71
RCL
22
61
STO
05
04
4
23
05
5
06
95
=
24
71
RCL
07
61
STO
25
01
1
08
05
5
26
52
X<>Y
09
65
*
27
71
RCL
10
71
RCL
28
05
5
11
03
3
29
12
INV
12
75
-
30
38
[P-R]
(R-P)
13
53
(
31
13
R/S
14
71
RCL
32
52
X<>Y
15
05
5
33
13
R/S
16
65
*
34
22
RST
17
71
RCL




Example:

Input:
R1:  R = 11.56 Ω
R2:  C = 0.0002 F
R3:  L =  0.018 H
R4:  F = 72 Hz

Results:
Phase Angle (θ) = -14.12679136°
Magnitude = 11.92049981

Linear Interpolation

Given points (x0, y0) and (x1, y1) with x0 < x < x1, we can estimate y by linear interpolation by:

y = ((x1 – x)*y0 + (x – x0)*y1)/(x1 – x0)

How good of an approximation depends on how close x0 and x1 are, and whether the curve that is being approximated is close to linear.

Store before running:
R1:  x1
R2:  y1
R3:  x2
R4:  y2
R5:  x

Program (34 steps) – 2nd Part 5:
PG
OP
Key
PG
OP
Key
00
53
(
17
01
1
01
53
(
18
54
)
02
71
RCL
19
65
*
03
03
3
20
71
RCL
04
75
-
21
04
4
05
71
RCL
22
54
)
06
05
5
23
55
÷
07
54
)
24
53
(
08
65
*
25
71
RCL
09
71
RCL
26
03
3
10
02
2
27
75
-
11
85
+
28
71
RCL
12
53
(
29
01
1
13
71
RCL
30
54
)
14
05
5
31
95
=
15
75
-
32
13
R/S
16
71
RCL
33
22
RST


Example:

Input:
R1:  x1 = 2
R2:  y1 = 3
R3:  x2 = 4
R4:  y2 = 8
R5:  x = 3

Result:
y = 5.5

Purchase of a Car:  How much can I afford?

The program will calculate the sticker price (price before sales tax) of an automobile that you can afford.  You give the term you want, the interest rate you qualify for, the sales tax rate, and the maximum payment you can afford.  This assumes that you don’t put any money down.

Formulas:
A = P/I * (1 – (1 + I)^-N) / (1 + S)

A = sticker price of the car
P = monthly payment
I = monthly interest rate of the loan, in decimal.   I = rate/1200
N = number of months.  N = years*12
S = sales tax rate, in decimal.  S = sales tax rate/100

Input:
R1:  number of payments
R2:  monthly interest rate
R3:  payment
R4:  sales tax rate, in decimal

Program (30 steps), 2nd Part 4:
PG
OP
Key
PG
OP
Key
00
71
RCL
15
45
y^x
01
03
3
16
71
RCL
02
55
÷
17
01
1
03
71
RCL
18
94
+/-
04
02
2
19
54
)
05
65
*
20
55
÷
06
53
(
21
53
(
07
01
1
22
01
1
08
75
-
23
85
+
09
53
(
24
71
RCL
10
01
1
25
04
4
11
85
+
26
54
)
12
71
RCL
27
95
=
13
02
2
28
13
R/S
14
54
)
29
22
RST

Example:

Input:
R1:  number of payments = 60, (5 year term)
R2:  monthly interest rate = 0.05/12 = 0.004166667, (5% annual interest rate)
R3:  payment = 400
R4:  sales tax rate, in decimal = 0.095, (9.5%)


Result:  19357.34

In this example, the highest sticker price that can be afforded is $19,357.34 (before sales tax).

I enjoy programming with the TI-60, unlike most Texas Instruments calculators that have keystroke programming, the TI-60 shows the step and key code you have entered instead of advancing to the next step with code 00. 

Eddie

This blog is property of Edward Shore, 2018.

Forming a Quadratic Polynomial by Knowing its Roots



Forming a Quadratic Polynomial by Knowing its Roots

Introduction

We are given two roots of a quadratic equation x = A and x = B and asked to construct a quadratic polynomial.  Believe it or not, this is (almost) enough information to accomplish this task.

Since A and B are roots, that means:

0 = (x – A)*(x – B)

It’s now just a matter of some algebra:

0 = x^2 – A*x – B*x + A*B
0 = x^2 – (A+B)*x + A*B

Define this as the polynomial p(x) = x^2 – (A+B)*x + A*B

Example:  A quadratic polynomial p(x) with roots at x = 1 and x = 5.  A result is:

p(x) = x^2 – 6*x + 5

x^2 - 6*x + 5.  All screen shots are generated from the HP Prime Emulator

Note that this polynomial is concave up for all x in the real numbers.  In calculus, a function is concave up when the second derivative is positive.  We can imagine bucket holding water.

Another Quadratic Polynomial?

Yes, observe:

0 = (x – A)*(x – B)
0 = x^2 – (A+B)*x + A*B

Now multiply both sides by -1: 

0 = -x^2 + (A+B)*x – A*B

Note that 0 * -1 = 0. 

Let’s name this quadratic polynomial q(x) = -x^2 + (A+B)*x – A*B. 

Going back to our example, with roots x = 1 and x = 5, q(x) is defined as:
q(x) = -x^2 + 6*x – 5

-x^2 + 6*x - 5

In this case this polynomial is concave down for all x.  It’s like the bucket has been turned upside down and water is spilling.

Can there be any Other Polynomials?

0 = (x – A)*(x – B)

Multiply by sides by an amplifying factor C:

C * 0 = C * (x – A) * (x – B)
0 = C * (x^2 – (A + B)*x + A*B)
0 = C * x^2 – C*(A + B)*x + A*B*C

Name this polynomial r(x) = C * x^2 – C*(A + B)*x + A*B*C

Back to the example, where roots are located at x = 1 and x = 5, let’s assume an amplifying factor of C = 3.  The result is:

r(x) = 3*x^2 – 18*x + 15

3*x^2 - 18*x + 15
The following is a set of four quadratic polynomials that can be formed with roots x = 1 and x = 5:

Four quadratic polynomials with roots x = 1 and x = 5

Polynomial
Values
Color (see above)
p(x) = x^2 – 6*x + 5
A = 1, B = 5, C = 1; concave up
Blue
q(x) = -x^2 + 6*x – 5
A = 1, B = 5, C = -1; concave down
Red
r(x) = 3*x^2 – 18*x + 15
A = 1, B = 5, C = 3; concave up
Green
s(x) =
-1/2*x^2 + 3*x – 5/2
A = 1, B = 5, C = -1/2; concave down
Orange

Summary

Given the roots of the quadratic polynomial x = A and x = B, with its amplifying factor C, possible quadratic polynomials can be formed by:

f(x) = C * x^2 – C*(A + B)*x + A*B*C

If C = 1, this simplifies to:  f(x) = x^2 – (A + B)*x + A*B

If C = -1, this simplifies to:  f(x) = -x^2 + (A + B)*x - A*B

If C>0, the second derivative is positive (f’’(x) = 2*C) and the polynomial is concave up.

If C<0, the second derivative is negative (f’’(x) = -2*C) and the polynomial is concave down.

Eddie

This blog is property of Edward Shore, 2018.

Tuesday, March 6, 2018

Retro Review: TI-30 Stat

Retro Review: TI-30 Stat



Special thanks to Jon Neal, he has made my reunion with the TI-30 Stat possible.  This calculator was one of the first scientific calculators I ever used.  I owned a TI-30 Stat in the late 1980s and early 1990s.  The manual survives all this time. 

Quick Facts

Company: Texas Instruments
Type: Scientific
Battery:  2 x LR-44
Operating System: AOS
Number of Functions: 54
Years: 1985 - 1993, went through a number of revisions (Datamath)
Memory Registers: 1

Features

The TI-30 Stat is a basic, entry level scientific calculator.  You have the trigonometric functions and their inverses, logarithmic functions and their inverses, the reciprocal, powers and roots, percent arithmetic, and basic one variable statistics.  Missing from other TI-30 models are polar/rectangular conversions, degree/degree-minute-second conversions, and angular conversions.  So we are talking bare basic here, but the fundamental functions are here so a wide range of scientific calculations can be tackled. 

The display is a one line display holding up to 8 digits, or a 5 digit mantissa/2 digit exponent of power of 10.  Numbers go range between -9.9999 × 10^99 to 9.9999 x 10^99.  If you are in sceintific notation and the exponent is between -07 to 07, you can cancel scientific notation display by pressing [2nd] [EE] (EE).

 Memory

The TI-30 Stat has only one memory, but has two dedicated storage operations:

[SUM]:  adds the number in the display to the memory register, basically M+

[EXC]:  recalls the memory register while replavcong the contents of memory of what you had in the display.  Example:  5 [EXC] stores 5 in the memory while recalling what the memory register previously had

Clearing the memory register is as simple as: 0 [STO]

Let's Talk about K

There is a long standing feature on Texas Instruments non-graphing scientific calculators:  the constant key, [ K ]. 

For the TI-30 Stat, the constant key allows you to store a constant with an operation.  This allows for rapid calculations with repetitive calculations with just an entry and the equals key.  The order of the keystrokes can be not so intuitive at first. 

N [ + ] [ K ]:  adds N to each subsequent entry (A + N, B + N, etc)

N [ - ] [ K ]:  subtracts N from each subsequent entry (A - N, B - N, etc)

N [ x ] [ K ]:  multiplies N to each subsequent entry (A * N, B * N, etc)

N [ ÷ ] [ K ]:  divides each subsequent entry by N (A/N, B/N, etc)

N [ y^x ] [ K ]:  power (A^N, B^N, etc)

N [ x√y ] [ K ]:  roots (A^(1/N), B^(1/N), etc)

Statistics

The statistics mode is very basic:  mean, standard deviation (σn-1), and population deviation (σn).  

Verdict

This is a basic calculator, similar to the TI-30 SLR+. The manual is well written and the TI-30 Stat is good for quick calculations.  The keyboard is good and responsive.  If you are looking for entry level, this may be an option.

Eddie

This blog is property of Edward Shore, 2018. 

This is my first entry using a Kindle Fire.  










Sunday, March 4, 2018

Eddie Tackles the SAT – 23 Years Later


Eddie Tackles the SAT – 23 Years Later

For the week of February 26 to March 2, 2018, I tackled some of the problems from the SAT Math Level II practice tests.  I want to find out if I could still solve the problems that is presented to college hopefuls.  I took the SATs, I believe if memory serves me correctly, 23 years ago.

A lot has changed since.  When I took the SATs, graphing calculators were still in its early years.  Now, graphing calculators are a mainstay in mathematical education and mathematicians.  Just look at my blog, most of the posts concern programs for graphing calculators (HP Prime and TI-84 Plus CE mostly). 

I think the SAT is now designed with the expectation that students will use a graphing calculator. 

Since the College Board does not allow reproduction of material from the Official SAT Study Guide except to be used by students in an educational, noncommercial setting, I will exercise caution and not reproduce questions on this blog (though I do not make money off this blog).  (See this page for details:  https://www.collegeboard.org/request-form/instructions )

I will say that the Official SAT Subject Study Test Guide is an excellent source is to consider if you are a college-bound student who is considering taking the SAT.  I bought the guide at a local Barnes and Noble for $20.  The book I purchased has four practice tests of 50 questions.  Each test has an answer key, with detailed explanations for each answer. 

During a lunch break, I took a practice test.  The real test is 60 minutes, but I only could use 30 minutes.  I got 17 questions correct and 3 wrong (2 off of stupid mistakes because I was going too fast). After scaling the results, I got 690, no too bad for a 40 year old. 

To get an 800, a student will need to only answer 43 net questions correct.  Yes, the SAT still carries a 0.25 penalty for incorrect answers. 

Eddie

This blog is property of Edward Shore, 2018

HP 42S/DM42/Free 42: Two Functions Programmed Three Different Ways

HP 42S/DM42/Free 42: Two Functions Programmed Three Different Ways Introduction In 1979, Electro Scientific Industries (esi)...