Sunday, September 15, 2019

Retro Review: Radio Shack EC-2024

Retro Review:  Radio Shack EC-2024

Quick Facts



Company:  Radio Shack
Years in Production: Around 1994
Original Price: $24.99
Battery:  Solar with Battery backup  (RS 389A)
Type:  Desktop- Fold-able
Number of Digits: 10

Initial cost and year came from the CALCUSUEM web site:  http://www.calcuseum.com/SCRAPBOOK/BONUS/46394/1.htm  (retrieved August 4, 2019)

I paid $3 for this at a swap meet. 

Keyboard



The some of the keys are larger than the others.  The plus key has an L-shape, while the minus key is large, and the equals key, labeled the "ANSWER BAR".

The keyboard is alright.  If you type at a reasonable pace, the keys are responsive.  If you are speed typist, prepare to be disappointed. 

The EC-2024 works best when the calculator is under full light. 

Settings 

There are two settings switches:

Rounding:  always round up, always round down, or 5/4 (use the general rounding rules)

Decimal Setting:  float, 0 decimal places, 2 decimal places, 3 decimal places, or add mode.  In add mode, every number that is added or subtracted is automatically divided by 100.  This allows for rapid entry of dollars and cents without having to enter the decimal point. 

The Δ% Key

How the percent key [ Δ% ] depends on what arithmetic operation is used with it.

x [ + ] y [ Δ%] returns (x + y)/y * 100%

Example:  250 [ + ] 300 [ Δ% ] returns 183.3333333

x [ - ] y [ Δ% ] returns (x - y)/y * 100%

Example:  250 [ - ] 300 [ Δ% ] returns -16.66666666

(This is the true percent change function, x is new, y is old)

x [ * ] y [ Δ% ] returns x + x * y / 100

Example:  250 [ * ] 300 [ Δ% ] returns 1000

x [ ÷ ] y [ Δ% ] returns x/(1 - y/100)

Example:  250 [ ÷ ] 300 [ Δ% ] returns -125

Verdict

It's a nice calculator and will fulfill the basic needs.  The keyboard is nice and fold-able.  If you get it, spending a few dollars (like no more than $5) is good. 

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.

Saturday, September 14, 2019

TI-84 Plus CE and Casio fx-5800P: Highway Transition Spiral

TI-84 Plus CE and Casio fx-5800P:  Highway Transition Spiral

Introduction



For any given parameters of a highway transition spiral:

PI:  point of intersection of the vertices (X coordinate, Y coordinate; Program Variables A, B)
∆:  intersection angle  (Program variable I)
D_C:  degree of the curve (Program variable D)
L_S:  length of the spiral (Program variable L)

Outputs:

Z:  Angle between the radii of spiral at TS and SC
R:  radius of circular curve
TS:  point of intersection of main tangent and approach spiral   (Program Variables U, V)
SC:  point of intersection of main tangent and circular curve
ST:  short tangent

Formulas:

Z = L * D / 200

Z is in degrees
Convert Z to radians:  Q = Z * π /180

x = L * (1 - Q^2/10)
y = L * (Q/3 - Q^3/43)
k = x - R * sin Z
p = y - R * (1 - cos Z)
T = (R + P) tan (∆/2) + K
S = Y * csc Z = Y / sin Z

Coordinates of TS:
[ PI_X - intg(T/100),  PI_Y - 100 * frac(T/100)]

Coordinates of SC:
[ TS_X + intg(L/100), TS_Y + 100 * frac(L/100)]


TI-84 Plus CE Program HYSPIRAL
(program to be typed)

Degree
"EWS 2019-08-03"
Disp "HWY SPIRAL"
Input "PI X: ",A
Input "+ PI Y: ",B
Input "INT-ANGLE: ",I
Input "LENGTH: ",L
Input "DEGREE: ",D
L*D/200→Z
100/(D*π/180)→R
Zπ/180→Q
L(1-Q²/10)→X
L(Q/3-Q³/43)→Y
X-R sin(Z)→K
Y-R (1-cos(Z))→P
(R+P) tan(I/2)+K→T
Y/sin(Z)→S
Disp "ANGLE TS-SC:",Z,"RADIUS:",R
Pause
A-iPart(0.01T)→U
B-100 fPart(0.01T)→V
Disp "TS:",U,"+",V
Pause
Disp "SC:",U+iPart(0.01L),"+",V+100 fPart(0.01L)
Pause
Disp "ST:",S

Casio fx-5800P Program HWYSPIRAL

Deg
"HIGHWAY SPIRAL"
"PI X: "?→A
"PI Y: "?→B
"INT-ANGLE: "?→I
"LENGTH: "?→L
"DEGREE: "?→D
L*D÷200→Z
100÷(D*π÷180)→R
Z*π÷180→Q
L*(1-Q²÷10)→X
L*(Q÷3-Q^(3)÷43)→Y
X-R sin(Z)→K
Y-R (1-cos(Z))→P
(R+P) tan(I÷2)+K→T
Y÷sin(Z)→S
"ANGLE TS-SC:"
Z⊿
"RADIUS:"
R⊿
A-Int(0.01T)→U
B-100 Frac(0.01T)→V
"TS X:"
U⊿
"TS Y:"
V⊿
"SC X:"
U+Int(0.01L)⊿
"SC Y:"
V+100 Frac(0.01L)⊿
"ST:"
S

Example

A highway with a transition spiral is at station 50 + 64.84, with the intersection angle 50°, and the degree of the curve at 6°.  The length of the curve is said to be 360 ft.

Inputs:

PI X = 50
PI Y = 64.84
INT-ANGLE = 50
LENGTH = 360
DEGREE = 6

Outputs:

ANGLE TS-SC = 10.8
RADIUS = 954.9296586
TS:  (X + Y) = 44 + 37.12990632
SC:  (X + Y) = 47 + 97.12990632
ST = 120.4143341

Source:

Hicks, Tyler P.E.  Handbook of Civil Engineering Calculations McGraw Hill: New York.  2000  ISBN 0-07-028814-3


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.

Thursday, September 12, 2019

HP 32SII and TI-66: Curve Fitting

HP 32SII and TI-66:  Curve Fitting

Introduction

The curve fitting program uses the linear regression module to determine the parameters b ("intercept") and m ("slope") in non-linear curves using following transformations:

Logarithmic Regression:  y = b + m * ln x
Transformations:  ( ln x, y, b, m )

Inverse Regression:  y = b + m / x
Transformations:  ( 1/x, y, b, m )

Exponential Regression:  y = b * e^(m * x)
Transformation:  ( x, ln y, e^b, m )

Power Regression:  y = b * x^m
Transformation:  ( ln x, ln y, e^b, m )

Geometric (Exponent) Regression:  y = b * m^x
Transformation:  ( x, ln y, e^b, e^m )

Simple Logistic Regression:  y = 1 / (b + m * e^(-x))
Transformation:  ( e^(-x), 1/y, b, m )

HP 32SII Program:  Curve Fitting

Note:
1.  This can be adapted into the HP 35S under one label.  Just take note of the where the label points are.
2.  The total amount of bytes used is 90.
3.  Flags 1 and 2 are used.  If flag 1 is set, e^m is calculated as slope.  If flag 2 is set, e^b is calculated as intercept.

Program:
// Initialize - LBL X
LBL X
CF 1
CF 2
CLΣ
0
RTN

// Calculation - LBL Y
LBL Y

FS? 2
e^x
STO B
VIEW B
m
FS? 1
e^x
STO M
VIEW M

STO R
VIEW R
RTN

// Logarithmic Regression - LBL L
LBL L
LN 
R/S
GTO L

// Inverse Regression - LBL I
LBL I
1/x
R/S
GTO I

// Exponential Regression - LBL E
LBL E
SF 2
x<>y
LN 
x<>y
R/S
GTO E

// Power Regression - LBL P
LBL P
SF 2
LN 
x<>y
LN 
x<>y
R/S
GTO P

// Geometric/Exponent Regression - LBL G
LBL G
SF 1
SF 2
x<>y
LN
x<>y
R/S 
GTO G

// Simple Logistic Regression - LBL S
LBL S
+/-
e^x
x<>y
1/x 
x<>y
STOP 
GTO S

Instructions:
1.  Clear the statistics data and flags by pressing [XEQ] X.
2.  Enter data points, run the proper label, and press [ Σ+ ] or [ Σ- ].

For example, for Logarithmic fit:
y_data [ENTER] x_data [XEQ] L [ Σ+ ]

Subsequent Data:
y_data [ENTER] x_data [R/S] [ Σ+ ]

This scheme allows for undoing data:
y_data [ENTER] x_data [XEQ] L [ Σ- ]

3.  Calculate intercept (B), slope (M), and correlation (R), press [XEQ] Y.

TI-66 Program:  Curve Fitting

Notes:
1.  This program should be able to entered on a TI-58, TI-58C, or TI-59.  At the time of the posting, I have not done it, so I don't have the key codes.
2.  94 steps are used.  [INV] [SBR] is merged into the RTN step.
3.  Flags 1 and 2 are used.  If flag 1 is set, e^m is calculated as slope.  If flag 2 is set, e^b is calculated as intercept.

Program:
// Initialize - key [ A ]
000 LBL
001 A
002 INV
003 ST.F
004 01
005 INV
006 ST.F
007 02
008 CSR
009 0
010 RTN

// Calculation - key [ A' ]
011 LBL
012 A'
013 OP
014 12
015 INV
016 IF.F
017 02
018 (   // left parenthesis
019 INV
020 LN X
021 LBL
022 (  // left parenthesis
023 STO
024 08
025 R/S
026 X<>T
027 INV
028 IF.F
029 01
030 )  // right parenthesis
031 INV
032 LN X
033 LBL
034 )  // right parenthesis
035 STO 
036 07
037 R/S
038 OP
039 13
040 STO
041 09
042 RTN

// Logarithmic Regression - key [ B ]
043 LBL
044 B
045 LN X
046 X<>T
047 R/S
048 RTN

// Inverse Regression - key [ C ]
049 LBL 
050 C
051 1/X
052 X<>T
053 R/S
054 RTN

// Exponential Regression - [ D ]
055 LBL 
056 D
057 ST.F
058 02
059 X<>T
060 R/S
061 LN X
062 R/S
063 RTN

// Power Regression - [ B' ]
064 LBL
065 B'
066 ST.F
067 02
068 LN X
069 X<>T
070 R/S
071 LN X
072 R/S
073 RTN

// Geometric/Exponent Regression - [ C' ]
074 LBL
075 C'
076 ST.F
077 01
078 ST.F
079 02
080 X<>T
081 R/S
082 LN X
083 R/S
084 RTN

// Simple Logistic Regression - [ D' ]
085 LBL
086 D'
087 +/-
088 INV
089 LN X
090 X<>T
091 R/S
092 1/X
093 R/S
094 RTN

Instructions:
1.  Clear the statistics data and flags by pressing [  ].
2.  Enter data points: enter x, run the proper label, enter y, press [R/S] and press [2nd] ( Σ+ ) or [INV] [2nd] ( Σ+ )  (for  Σ- ).

For example, for Logarithmic fit:
x_data [ B ] y_data [R/S]  [2nd] (Σ+)

This scheme allows for undoing data:
x_data [B] y_data [R/S] [INV] [2nd] (Σ+)

3.  Calculate intercept (B), slope (M), and correlation (R), press [2nd] [ A' ].

Examples

All results are rounded.

Example 1: Logarithmic Regression
Data (x,y):
(33.8, 102.4)
(34.6, 103.8)
(36.1, 105.1)
(37.8, 106.9)

Results:
B:  -33.4580
M:  38.6498
R:  0.9941

y ≈ -33.4580 + 38.6498 ln x

Example 2:  Inverse Regression
Data (x,y):
(100, 425)
(105, 429)
(110, 444)
(115, 480)

B:  823.80396
M:  -40664.72143
R:  -0.91195

y ≈ 823.80396 - 40664.72143/x

Example 3: Simple Logistic Regression
Data (x,y):
(1, 11)
(1.3, 9.615)
(1.6, 8.75)
(1.9, 8.158)
(2.6, 7.308)

B: 0.14675
M: -0.15487
R:  -0.99733

y ≈ 1 / (0.14675 - 0.15487*e^(-x))


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.


Sunday, September 8, 2019

TI-84 Plus CE and Casio fx-5800P: Lateral Pressure of Cohesionless Soils

TI-84 Plus CE and Casio fx-5800P:  Lateral Pressure of Cohesionless Soils

Introduction

The following equations calculates the total thrust of soil against a wall.  The soil is assumed to be cohesionless, free running soil.  This applies to soils like sand and gravel, but not clay.

SI units (meters, seconds, kilograms) are assumed in these calculations.

Inputs:

Φ = angle of internal friction of soil.  For cohesionless soils, such as medium and coarse sands, the angle of internal friction typically ranges from 30° to 35°.  The program assigns Φ to the variable I.

H = the height of the wall (m).

γ = unit weight of soil (kg/m^3).  The program assigns γ to W.

Outputs:

K_A = pressure coefficient (unit-less).  The program assigns K_A to K.

P = total thrust of the soil (kg/m) of the wall.

Equations:

K_A = (tan(45° - Φ/2))^2

P = 1/2 * γ * H^2 * K_A  (kg/m)

TI-84 Plus CE Program SOILPRES

(this program needs to be typed in)

Degree
Disp "LATERAL PRESSURE","SAND/GRAVEL","ANGLE INTERNAL"
Input "FRICTION: ",I
tan(45-I/2)²→K
Disp "WALL HEIGHT"
Input "(M): ",H
Disp "SOIL WEIGHT"
Input "(KG/M³): ",W
0.5*W*H²*K→P
Disp "PRESSURE COEF: ",K,"SOIL THRUST: ",P

Casio fx-5800P Program SOILPRESSURE

Deg
"LATERAL PRESSURE"
"SAND OR GRAVEL"
"ANGLE INTERAL"
"FRICTION: "?→I
(tan(45-I÷2))²→K
"WALL HEIGHT"
"(M): "?→H
"SOIL HEIGHT"
"(KG÷M^(3)): "?→W
0.5*W*H²*K→P
"PRESSURE COEF:"
K⊿
"SOIL THRUST:"
P

Example

Input:
Φ = I = 37°
H = 15 m
γ = W = 0.64 kg/m^3

Output:

K_A = K = 0.2485836199
P = 17.89802063 (kg/m)

Source:

Hicks, Tyler P.E.  Civil Engineering Formulas 2nd Ed.   McGraw Hill: New York.  2000.   ISBN 978-0-07-161470-2

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.

Saturday, September 7, 2019

TI NSpire CX II: Animation Demo

TI NSpire CX II:  Animation Demo

Introduction 

This blog entry demonstrates the use of drawing commands from the TI Nspire CX II (and TI Nspire CX II CAS) to animate objects.  The main loop used in these animations used has the structure:

...
Local variables needed including coordinates
For coordinate 1, begin, end, step   
For coordinate 2, begin, end, step (if necessary)
UseBuffer
...
SetColor red, green, blue
draw objects
....
PaintBuffer
Wait  seconds
EndFor
EndFor (if a second for loop is used)
...

Demo 1:  Animation of a Circle Across the Screen

Define ani1()=
Prgm
:© animate a circle across the screen part 1
:Local x
:SetWindow 0,10,0,10
:For x,1,9,2
:  UseBuffer 
:  Clear 
:© cherry red
:  SetColor 255,27,34
:  FillCircle x,9,2
:  PaintBuffer 
:  Wait 1
:
:EndFor
:EndPrgm

Demo 2:  Animation of a Circle Across and Down the Screen

Define ani2()=
Prgm
:© 2019-07-29 EWS
:©  animate a circle
:Local x,y
:For y,10,190,20
:  For x,10,270,20
:    UseBuffer 
:    Clear 
:    SetColor 255,27,34
:    FillCircle x,y,20
:    PaintBuffer 
:    Wait 0.25
:  EndFor
:EndFor
:
:SetColor 0,0,0
:DrawText 10,10,"Done!"
:EndPrgm

Demo 3:  Animation of a Circle with Alternating Colors


Define ani3()=
Prgm
:© 2019-07-29 EWS
:©  animate a circle
:Local x,y,flag
:flag:=0
:For y,10,190,20
:  For x,10,270,20
:    UseBuffer 
:    Clear 
:    If flag=0 Then
:      SetColor 255,27,34
:      flag:=1
:    Else
:      SetColor 0,228,221
:      flag:=0
:    EndIf
:    FillCircle x,y,20
:    PaintBuffer 
:    Wait 0.175
:  EndFor
:EndFor
:
:SetColor 0,0,0
:DrawText 10,10,"Done!"
:EndPrgm

Demo 4:  Barbell Animation



Define ani4()=
Prgm
:© barbell animation
:© 2019-07-30 EWS
:Local x,y,xc,yc,θ
:
:© radians mode
:setMode(2,1)
:
:For θ,0,8*π,((π)/(12))
:  UseBuffer 
:  Clear 
:© the bar
:  xc:=60*cos(θ)+159
:  yc:=60*sin(θ)+106
:  SetColor 48,48,48
:  DrawLine 159,106,xc,yc
:  SetColor 205,127,50
:  FillCircle xc,yc,15
:  SetColor 0,0,0
:  FillCircle 159,106,15
:  PaintBuffer 
:  Wait 0.15
:EndFor
:DrawText 0,25,"Done!"
:EndPrgm

Demo 5:  Bouncing Box Animation

Define ani5()=
Prgm
:© bouncing box
:Local r,g,b,x,y,t,θ
:© use pixels
:x:=106
:y:=159
:© degrees
:setMode(2,2)
:
:© set initial angle
:θ:=randInt(1,359)
:
:For t,1,1000
:UseBuffer 
:Clear 
:r:=randInt(0,255)
:g:=randInt(0,255)
:b:=randInt(0,255)
:SetColor r,g,b
:FillRect x,y,10,10
:
:x:=10*cos(θ)+x
:y:=10*sin(θ)+y
:
:If x≥310 or x≤10 or y≥200 or y≤10 Then
: θ:=mod(θ+90,360)
:EndIf
:SetColor 0,15,96
:DrawPoly {10,10,310,310,10},{10,200,200,10,10}
: PaintBuffer 
: Wait 0.05
:EndFor
:EndPrgm

A copy of the tns document can be downloaded here:  https://drive.google.com/open?id=1bkKEsLxaOd4svqw-S-ftZ3CkUe_NUDOm

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.

Monday, September 2, 2019

Review: Texas Instruments TI-73 Explorer

Review:  Texas Instruments TI-73 Explorer



Basic Information for the TI-73 Explorer

Company: Texas Instruments
Production Years:  1998 - present(?)
New Cost:  originally $95, went down to $70
Battery:  4 AAA with CR1616 backup
Memory:  25,000 bytes, 128K Flash ROM
Type: Graphing

There are three variants of the TI-73

Variant 1:  1998 - 2003.  Gray keyboard, teal and blue keys. 

Variant 2:  2003 - 2009.  Renamed the TI-73 Explorer.  Periwinkle keyboard, red, blue, and white keys.  I have and am reviewing this variant.

Variant 3:  2009 - present.  Same colors as Variant 2, but the calculator is shaped like the 2004 Monochrome TI-84 Plus. 

All three variants have the same command set. 

I purchased mine on eBay (thank you, molecularbonds) for $12.75.  The best bet to buy one is to go online. 

I think new units of the TI-73 Explorer are still being sold despite the fact that I have never seen it being sold in office and electronic stores or one "in the wild".  If production has discontinued, it is a quiet discontinue. 

Background

The TI-73 and the TI-73 Explorer was designed for the middle school market.  The emphasis is on fractions, statistics, and basic algebra.

Dedicated Fraction Keys

There are five dedicated keys to fractions:

[UNIT]:  Assists the user in entering a mixed fraction.  Enter the whole number, press [UNIT], and a fraction bar comes up.  For example, to enter 5 2/3, press 5 [UNIT] 2 [ ↓ ] 3 [ENTER].

[SIMP]:  Simplifies fractions.  This key only works in Mansimp mode.  The key is non-function (a ERR:MODE error occurs in Autosimp mode). 

[ b/c ]:  Fraction bar.  Assists the user in entering a fraction. 

[F ←→ D]:  Fraction/Decimal Conversion.  On the TI-73, the maximum denominator is 1000.  Any number 1/1001 or less will automatically be shown as its decimal equivalent.

[A b/c ←→ d/e]:  Mixed Fraction/Improper Conversion.  If you enter a decimal equivalent, the form you get depends on what mode the calculator is in.

A_b/c mode:  The [A b/c ←→ d/e] converts the number in decimal form into an improper fraction.

b/c mode:  The [A b/c ←→ d/e] converts the number in decimal form into a mixed fraction. 

Statistics

The TI-73 performs one and two variable statistics.  The available regressions are:  Linear Regression (ax+b), Manual Fit (you set the line), Med-Med, Quad Regression (Quadratic Regression, ax^2 + bx + c), and Exp (Exponential Regression, a*b^x). 

Like the TI-84 family (TI-80, TI-82 series, TI-83 series, TI-84 Plus series), the TI-73 has three stat plots.  Unique to the TI-73, you can plot pie charts and horizontal and vertical bar charts with various symbols (such as people, trees, faces, pies, diamonds). 

Further unique to the TI-73 (outside the CAS and Nspire series), lists on the TI-73 can hold strings.  Each string can hold up to six characters.   The lists with strings are used as category lists for pie charts and bar charts.

Speaking of strings, there is only one key with a variable, [ x ], but where did all the alpha characters go?

The Text Facility:  [ 2nd ] [MATH]



Instead of an ALPHA key, the TI-73 has a text entry facility, which can be accessed by pressing [ 2nd ] [MATH].  The screen will allow you to write text strings.  The quote character is included.  You can use the keyboard to type numbers. 

The text facility also has the comparison operators (=, ≠, >, ≥, <, ≤, with Boolean operators and, or). 

When you are done, select DONE and press [ENTER].  Whatever is typed in copied to where your cursor was.

By the way, we can still use the variables A-Z to store values.   This does make storing and recalling variables cumbersome. 

The Constant Key [CONST]

The [CONST] key gives users four constant variables.  Pressing [ 2nd ] [CONST] sets the constants.  Unfortunately, we can not use the store key to store constants directly.



Where Did All the Scientific Functions Go?

Despite a keyboard that is simplified, the TI-73 has a range of mathematical functions.  For example, the logarithmic functions are in the MATH-LOG menu.  The trigonometric functions are in a separate menu.  The hyperbolic functions have to be constructed. 

[MATH]
MATH:  lcm, gcd, cube, cube root, general root, solver
NUM: abs, round, iPart, fPart,min, min, remainder
PRB:  rand, randInt, nPr, nCr, ! (factorial of integers), coin (toss a coin a number of times, results in a 0 or 1), dice (tosses any number of dice for a specific set of rolls)
LOG:  log, 10^, ln, e^

[ 2nd ] [DRAW] (TRIG):
TRIG: sin, sin⁻¹, cos, cos⁻¹, tan, tan⁻¹
ANGLE: °, ', ", ^r (radian angle symbol), >DMS (conversion to degrees, minutes, seconds)

We may not have any calculus functions (integrals, derivatives, summation), but we have a good range of scientific functions.

Graphing

The only graphing mode available on the TI-73 is Functions (y(x)).  Four graph slots are available. 

Programming

The TI-73 has 25,000 bytes.  All of the TI-BASIC commands are available, which includes If, For, While, Repeat, Input, Prompt, Output, IS>, and DS<. 

The use of the TEXT facility is need to create strings, prompts, and labels.  It will take getting used to since I'm used to an ALPHA key to work with.

Conversions

The [ 2nd ] [UNIT] (CONVERT) has many conversions of length, area, volume, time, temperature, mas, and speed.  Always a good thing to have. 

Verdict

I think the TI-73 could have been a great entry-level graphing calculator, like it a successor to the TI-81 or TI-80.  I think the ALPHA key would help greatly.

I was not sure about the marketing strategy that the TI-73 didn't sell well.  A lower price point would have helped too.

The TI-73 may be worth looking at getting, and if you do, I would try online sources like eBay to try to get it less than retail price. 

With the 73, I now have all of the models of Texas Instruments graphing calculators (73, 80, 81, 82, 83, 84, 85, 86, 89, 92, Voyage 200, Nspire). 


Source:
TI-73 and TI-73 Explorer.  Datamath.  Retrieved August 25, 2019

http://www.datamath.org/Graphing/TI-73.htm

http://www.datamath.org/Graphing/TI-73_Explorer.htm

http://www.datamath.org/Graphing/TI-73_Explorer_P1108.htm

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

Monday, August 26, 2019

Inverse Linear Regression

Inverse Linear Regression

Introduction

The goal:  fit bi-variate data (x,y) to the curve:

y = 1 / (a*x + b)

We will be able to use the linear regression model with the following transformation:

1/y = a* x + b

y' = 1/y
x' =  x
a' = a
b' = b

y' = a' * x' + b'

Let's illustrate this with an example.

Example

Fit the curve y = 1 / (a*x + b) to the data:

(-2, -1.43)
(-1, 0.4)
(0, 0.18)
(1, 0.11)
(2, 0.08)
(4, 0.05)

Transform the data to (x', y'): x' = x,  y' = 1/y

(-2, -1/1.43 = 0.6693006993)
(-1, 1/0.4 = 2.5)
(0, 1/0.18 = 5.555555556)
(1, 1/0.11 = 9.090909091)
(2, 1/0.08 = 12.5)
(4, 1/0.05 = 20)

Regression analysis with the transformed data:

Slope (a,m) = 3.443917194
Intercept (b) = 5.861915862
r^2 = 0.998386787

1/y = 3.443917194 * x + 5.861915862

y = 1 / (3.443917194 * x + 5.861915862)






Note:  My next blog entry will be posted on September 2, 2019, 12:00 AM Pacific Daylight Time on Labor Day. 

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.

Saturday, August 24, 2019

HP Prime and TI Nspire CX CAS: Solving Integral Equations

HP Prime and TI Nspire CX CAS:  Solving Integral Equations





Introduction

The program INTEGRALSOLVE solve the following equation:
(Format:  ∫( integrand dvar, lower, upper)

∫( f(t) dt, 0, x) = a

∫( f(t) dt, 0, x) - a = 0

It is assumed that x>0. 

We can use the Second Theorem of Calculus which takes the derivative of the integral:

d/dx  ∫( f(t) dt, a, x) = f(x)

We don't have to worry about lower limit a at all for the theorem to work. 

∫( f(t) dt, 0, x) - a

Take the derivative with respect to x on both sides (d/dx):

= d/dx ∫( f(t) dt, 0, x) - a

= d/dx ∫( f(t) dt, 0, x) - d/dx a

Let F(t) be the anti-derivative of f(t):

= d/dx (F(x) - F(0)) - 0

= d/dx F(x) -  d/dx F(0)

F(0) is a constant.

= f(x)


Newton's Method to find the roots of f(x) can be found by the iteration:

x_(n+1) = x_n - f(x_n) / f'(x_n)

Applying that to find the roots of ∫( f(t) dt, 0, x) - a:

x_(n+1) = x_n - (∫( f(t) dt, 0, x_n) - a) / f(x_n) 


HP Prime Program INTEGRALSOLVE

Enter f(X) as a string as it will be stored in Function App variable F0.  Use X as the independent variable. 

EXPORT INTEGRALSOLVE(f,a,x)
BEGIN
// f(X) as a string, area, guess
// ∫(f(X) dX,0,x) = a
// EWS 2019-07-26
// uses Function app
LOCAL x1,x2,s,i,w;
F0:=f;
s:=0;
x1:=x;
WHILE s==0 DO
i:=AREA(F0,0,x1)-a;
w:=F0(x1);
x2:=x1-i/w;
IF ABS(x1-x2)<1 font="" then="">
s:=1;
ELSE
x1:=x2;
END;
END;

RETURN approx(x2);
END;

TI NSpire CX CAS Program INTEGRALSOLVE
(Caution:  This program needs to be typed in)

Use t as the independent variable.

Define LibPub integralsolve(f,a,x)=
Func
:© f(x), area, guess: ∫(f(t) dt,0,x = a)
:Local x1,x2,s
:s:=0
:x1:=x
:While s=0
:  x2:=x1-((∫(f,t,0,x1)-a)/(f|t=x1))
:  If abs(x2-x1)≤1E−12 Then
:    s:=1
:  Else
:    x1:=x2
:  EndIf
:EndWhile
:Return approx(x2)
:EndFunc

Examples

Example 1: 

∫( 2*t^3 dt, 0, x) = 16
Guess = 2
Root ≈ 2.3784

Example 2:

∫( sin^2 t dt, 0, x) = 1.4897
Guess = 1
(Radians Mode)
Root ≈ 2.4999

Source:

Green, Larry.  "The Second Fundamental Theorem of Calculus"  Differential Calculus for Engineering and other Hard Sciences.  Lake Tahoe Community College. http://www.ltcconline.net/greenl/courses/105/Antiderivatives/SECFUND.HTM  Retrieved July 25, 2019

Happy Solving!

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.

Thursday, August 22, 2019

Integrals with the Error (erf) Function

Integrals with the Error (erf) Function

Introduction - Integrals Involving the Erf Function

erf(x) = 2 / √π * ∫( e^-(t^2), t, 0, x)   ** graphing calculator syntax


Problem 1:  ∫( e^-(t^2), t, a, x) with a > 0 and x > a

∫( e^-(t^2), t, 0, x) = ∫( e^-(t^2), t, 0, a)  + ∫( e^-(t^2), t, a, x)

 ∫( e^-(t^2), t, 0, x) - ∫( e^-(t^2), t, 0, a)  = ∫( e^-(t^2), t, a, x)

√π/2 * 2/√π * (  ∫( e^-(t^2), t, 0, x) - ∫( e^-(t^2), t, 0, a) ) =   √π/2 * 2/√π * ∫( e^-(t^2), t, a, x)

√π/2 * ( 2/√π *  ∫( e^-(t^2), t, 0, x) - 2/√π *  ∫( e^-(t^2), t, 0, a) ) =   ∫( e^-(t^2), t, a, x)

√π/2 * ( erf(x) - erf(a)  ) =   ∫( e^-(t^2), t, a, x)


 ∫( e^-(t^2), t, a, x) = √π/2 * (erf(x) - erf(a))

Problem 2:  ∫( e^-((t + b)^2), t, 0, x)

∫( e^-((t + b)^2), t, 0, x)

Substitutions:
u = t + b
u - b = t
du = dt

Limits:
t  = x, u = x + b
t = 0, u = b

∫( e^-((t + b)^2), t, 0, x)

= ∫( e^-(u^2), u, b, b+x)

Note √π/2  * 2 /√π  = 1

=  √π/2  * 2 /√π  * ∫( e^-(u^2), u, b, b+x)

Using problem 1 as an aid to help us get:

= √π/2  * (eft(x + b) - erf(x))

∫( e^-((t + b)^2), t, 0, x) = √π/2  * (eft(x + b) - erf(x))

Problem 3:   ∫( e^(-a*t^2 + b), t, 0, x)

∫( e^(-a*t^2 + b), t, 0, x)

= ∫( e^(-a*t^2) * e^b, t, 0, x)

e^b is a constant.

= e^b * ∫( e^(-a*t^2), t, 0, x)

Substitutions:
u = √a * t
u^2 = a * t^2

du = dt * √a
du / √a = dt

Limits:
t  = x, u = √a * x
t = 0, u = 0

= e^b * 1/√a  * ∫( e^(-u^2), u, 0, √a * x)

= e^b * 1/√a  * √π/2  * 2 /√π  * ∫( e^(-u^2), u, 0, √a * x)

= e^b * 1/√a  * √π/2  * erf(√a * x)

∫( e^(-a*t^2 + b), t, 0, x) = e^b * 1/√a  * √π/2  * erf(√a * x)

Problem 4:  ∫( e^-(ln^2 t)/t, t, 1, x)

∫( e^-(ln^2 t)/t, t, 1, x)

Substitutions:
u^2 = ln^2 t
u = ln t
du = 1/t dt
t  du = dt

1/t * t = 1

Limits:
 t = x, u = ln x
t = 1, u = ln 1 = 0

= ∫( e^-(u^2), u, 0, ln x)

= √π/2  * 2 /√π  * ∫( e^-(u^2), u, 0, ln x)

= √π/2  * erf(ln x)


∫( e^-(ln^2 t)/t, t, 1, x) = √π/2  * erf(ln x)

Problem 5:  2/√π * ∫(e^(t^2), t, 0, x)

2/√π * ∫(e^(t^2), t, 0, x)

Substitutions:
-u^2 = t^2
u^2 = -t^2
u = i * t   where i = √ -1
du = i dt
- i du = dt  because 1/i = -i

Limits:
t = x, u = i *x
t = 0, u = 0

= 2/√π * ∫(e^-(u^2) * -i, t, 0, i*x)

= 2/√π * -i * ∫(e^-(u^2), t, 0, i*x)

= -i * erf(i*x)

2/√π * ∫(e^(t^2), t, 0, x) = -i * erf(i * x)

Alternative substitution:
-u^2 = t^2
i * u = t
u = -i * t
du = -i dt
i du = dt

Limits:
t = x, u = -i *x
t = 0, u = 0

Then we get

2/√π * ∫(e^(t^2), t, 0, x)

= 2/√π * i * ∫(e^-(u^2), t, 0,- i*x)

= i * erf(-i * x)

In summary....

2/√π * ∫(e^(t^2), t, 0, x) = -i * erf(i * x) = i * erf(-i * x)

These are several of integrals using the erf function. - 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.

Monday, August 19, 2019

HP 41/DM41L and TI-60X: Exponentiation of Large Numbers

HP 41/DM41L  and TI-60X:  Exponentiation of Large Numbers

But Why a Program when we have Button?

This is true.  What this program does is allow for calculation of y^x when results in answers greater than 9.999999999 * 10^9.  The number is broken up into the form:

mantissa * 10^exponent

Let n = y^x.  Then:

n = y^x

Taking the logarithm of both sides:

log n = log (y^x)
log n = x log y

A number can be split into its fractional and integer part:

log n = frac(x log y) + int(x log y)

Take the antilog of both sides:

n = 10^( frac(x log y) + int(x log y) )
n = 10^( frac(x log y) ) * 10^( int(x log y) )

where
mantissa = 10^( frac(x log y) )
exponent = int(x log y)

HP 41/DM 41L Program BIGPOW

Input:
Y stack:  y
X stack:  x

Output:
Y:  mantissa (shown first)
X:  exponent

01 LBL T^BIGPOW
02 X<>Y
03 LOG
04 *
05 ENTER↑
06 FRC
07 10↑X
08 STOP
09 X<>Y
10 INT
11 RTN

TI-60 Program:  Big Powers

Input:
Store y in R1 and x in R2

Output:
R1 = mantissa (shown first), R2 = exponent

(Step,  Key Number, Key)
00, 71, RCL
01, 02, 2
02, 65, *
03, 71, RCL
04, 01, 1
05, 43, log
06, 95, =
07, 61, STO
08, 02, 2
09, 78, Frac
10, 12, INV
11, 43, log
12, 61, STO 
13, 01, 1
14, 13, R/S
15, 71, RCL
16, 02, 2
17, 79, Intg
18, 13, R/S
19, 22, RST

Examples

Example 1:  25^76.   y = 25, x = 76

Result: 
Mantissa = 1.75162308
Exponent = 106
25^76 ≈ 1.75162308 * 10^106

Example 2:  78^55.25,  y = 78, x = 55.25

Result:
Mantissa = 3.453240284
Exponent = 104
78^55.25 ≈ 3.543240284 * 10^104

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.

Saturday, August 17, 2019

HP Prime and HP 41C/DM 41L: Sum of Two Squares

HP Prime and HP 41C/DM 41L:  Sum of Two Squares 

Introduction

Given a positive integer n, can we find two non-negative integers x and y such that:

n = x^2 + y^2

(x and y can be 0, n is assumed to be greater than 0)



There are several theorems and lemmas that are connected to this famous problem.  As a point of interest, I will briefly describe them here. 

1.  n does not have a representation (n can't be written as x^2 + y^2) if any of n's prime factors is congruent to 3 mod 4 and is raised to an odd power.

2.  If n has a representation, then for an integer k, k^2*n also has a representation.

3.  If n is prime and congruent to 1 mod 4, then n has a representation.  (n has the form of n = 4w + 1 for some non-negative integer w).

The program presented here is the use of iterations to find all possible pairs which fit n = x^2 + y^2.   Some integers do not have representations, others have more than one.  The program will show all possible combinations. 

HP Prime Program SUM2SQ

EXPORT SUM2SQ(n)
BEGIN
// EWS 2019-07-21
// breaking n into a sum of 2 squares
LOCAL r,j,k,l;
// we can more than 1 representation
r:=IP((n/2)^0.5);
l:={};
FOR j FROM 0 TO r DO
k:=(n-j^2)^0.5;
IF FP(k)==0 THEN
l:=CONCAT(l,
{STRING(j)+"^2 + "+
STRING(k)+"^2 = "+
STRING(n)});
END;
END;

RETURN l;
END;


HP 41C/DM 41L Program SUMSQRS

Registers  used:
R00 = n
R01 = counter
R02 = temporary

01 LBL T^SUMSQRS
02 FIX 0
03 STO 00
04  2
05  /
06  SQRT
07  INT
08  1000
09  /
10  STO 01
11  LBL 00
12  RCL 00
13  RCL 01
14  INT
15  X↑2
16  -
17  SQRT
18  STO 02
19  FRC
20  X=0?
21  GTO 01
22 GTO 02
23 LBL 01
24 RCL 01
25 INT
26 T^X = 
27 ARCL X
28  AVIEW
29  STOP
30  RCL 02
31  T^Y = 
32 ARCL X
33 AVIEW
34 STOP
35 LBL 02
36  ISG 01
37  GTO 00
38  T^END
39  VIEW
40  FIX 4
41  RTN

Examples

Example 1:  n = 325
325 = 1^2 + 18^2
325 = 6^2 + 17^2
325 = 10^2 + 15^2





Example 2:  n = 530
530 = 1^2 + 23^2
530 = 13^2 + 19^2

Source:

Dudley, Underwood.  "Elementary Number Theory"  2nd Ed. Dover Publications: New York.  1978. ISBN 978-0-486-46931-7

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.

Thursday, August 15, 2019

TI Nspire CX II: Distributing Money Among Friends

TI Nspire CX II:  Distributing Money Among Friends

The Problem

This post is inspired from a Instagram post by @gercekboss at www.eylemmath.weebly.com.  The problem states that:

$100 is to be distributed among 100 friends:
1% is given to the 1st friend
2% is given to the 2nd friend
3% is given to the 3rd friend
and so on.

I have a TI Nspire CX II Document that covers this problem, which can be downloaded here:  https://drive.google.com/file/d/1aewZ-8wU2JjZxgGyBpNHivEYLU5QAt31/view?usp=sharing

Name of the document:  distribute percent.tns 

Using the TI Nspire CX II to set up two sequences to model this problem as two sequences:

Balance Sequence (Problem 1.3, plot is in green)

u1(n) = u1(n-1) - u1(n-1) * n%
Intial Terms: 100
0 ≤ n ≤ 99 step 1

Amount Sequence (Problem Page 1.7, plot is in red)

u2(n) = u1(n-1) *n%
Initial Terms: 0
0 ≤ n ≤ 99 step 1

By analysis, the 10th friend will get the biggest distribution under this plan, $6.28.  By the time we get to the 38th friends, the distribution becomes meaningless because the calculated amount will be less than one penny.



Regression Analysis

I performed curve fitting analysis for the balance and amount distributed on problems page 1.5 and 1.9, respectively.

Balance can be estimated by the logistic equation:

balance(n) ≈ 112.84/(1 + 0.1*e^(0.23n)) - 0.54  for 1 ≤ n ≤ 40

The maximum absolute error is 0.67. 

Amount can be estimated by the quartic polynomial:

amount(n) ≈ -4.01E-5*n^4 + 4.31E-3 * n^3 - 0.15 * n^2 + 1.89 * n - 1.26
for 1 ≤ n ≤ 40

I did slightly better, the maximum absolute error is 0.52.



Generalizing the Problem

Now, let's take any money of money and any amount of friends for whom to distribute that money.  The rate can increase per friend by at different rates:

a*n% + b%

If you want 2%, 4%, 6%, etc, let a = 2, b = 0



If you want each friend to get 1/2% more than the last, let a = 1/2, b = 0.

If you want the first friend to get 2%, second to get 3%, etc, let a = 1, b =  1.

The sequences are set up as:

Balance Sequence

u1(n) = u1(n-1) - u1(n-1) * (a*n% + b%)
Intial Terms: c
0 ≤ n ≤ l step 1

Amount Sequence

u2(n) = u1(n-1) *(a*n% + b%)
Initial Terms: 0
0 ≤ n ≤ l step 1

Variables:
a = rate parameter
b = rate parameter
c = initial amount of money
l = number of friends

You can customize the problem in Problem 2 of the document.  Change the variables on Problem Page 2.2 and see the results on Problem Pages 2.3 and 2.4. 

Source:

Question 251. eleymmath.    https://eylemmath.weebly.com/algebra/100-question  Retrieved July 21, 2019. 

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.

Retro Review: Radio Shack EC-2024

Retro Review:  Radio Shack EC-2024 Quick Facts Company:  Radio Shack Years in Production: Around 1994 Original Price: $24.99 Bat...