Monday, April 29, 2019

Four Function and Desktop Calculators: The [ TAX+ ] and [ TAX- ] Keys

Four Function and Desktop Calculators: The [ TAX+ ] and [ TAX- ] Keys

A good subject for a Monday (start off the work week for most of us, me included)

The TAX+ and TAX- keys up close and personal  (Casio SL-300VC)


What is needed:  a calculator with [ TAX+ ] and [ TAX- ]

Introduction

On a four function or desktop calculator with the [ TAX+ ] and [ TAX- ] keys, you can perform tax calculations and financial calculations.  The primary key purpose of these keys is for sales tax.  The procedure for these calculations are (almost) universal.  However, the procedure to set such tax varies by manufacturer.

Casio:  Hold [AC] until the display blanks and refreshes.  Enter the tax rate and press [ % ] (RATE SET). 

Texas Instruments (TI-1795SV):   Enter the tax rate, press [ rate ], [ tax+ ] (store)

Canon:  Press [AC], [ TAX+ ] (SET), enter the rate, and press [ TAX+ ]

Sharp: Press [ CE/C ], [ CE/C ] (twice), [ TAX+ ], enter the rate, press [ TAX+ ]

Printing Calculators (various):  Set tax setting switch to SET, enter the rate, set the tax setting switch back to calculator mode.  Check your manual because printing calculators may vary.

My focus will be on four function and desktop calculators.  Procedures for printing calculators will probably vary.

Note:  I did the procedures listed in today's blog entry on both the Casio SL-300VC and Casio LS-123K.  For using independent memory, check to see if you have either a combined memory recall/clear key [MRC] (or [RM/CM on the LS-123K) or two separate keys ([MR] for recall and [MC] for clear).  For illustration purposes I will use [MRC]  (once for recall, twice for clear).   Remember that you can press [AC] to clear memory. 

Left:  Canon LS-123K (Green), Right:  Casio SL-300VC (Blue)


Note:  Pressing [AC] or [MRC] [MRC] will only clear the memory register, not the tax rate.

Contents

1.  Testing What Tax Rate is Stored in Memory
2. Price After Sales Tax and the Amount of Tax
3. Adding Taxable and Non-taxable Amounts
4. Calculating Use Tax
5.  Find the Taxable Amount Given the Grand Total (Total Plus Tax)
6.  Finance: Using [ TAX+ ] to calculate Future Value
7.  Finance: Using [ TAX- ] to calculate Present Value

For all the examples today, I have the tax rate set to 9.5%.  Please see the Introduction section above on how to set the tax rate.

1.  Testing What Tax Rate is Stored in Memory

This procedure is for any calculator that does not have a recall tax feature, although it works for these calculators too.

Procedure:

100 [ TAX+ ] [ - ] 100 [ = ]

Example:  (remember I'm using the tax rate set at 9.5% for all examples on this blog entry)

100 [ TAX+ ] [ - ] 100 [ = ]
Result:  9.5

2. Price After Sales Tax and the Amount of Tax

The [ TAX+ ] key performs two operations:

Press [ TAX+ ] once to calculate the total plus tax
Press [ TAX+ ] again to calculate the tax amount

Example:

An invoice shows of a purchase of equipment totaling $250.00.  Find the total after tax and the sales tax.

250 [ TAX+ ]
Display:  273.75   (total invoice:  $273.75)

[ TAX+ ]
Display:  23.75   (sales tax:  $23.75)


3. Adding Taxable and Non-taxable Amounts

Sometimes an invoice has both taxable amount and non-taxable amounts (such as most services, installation fee, sometimes freight, some food).  We can calculate the total invoice accurately with both the TAX and memory keys.  Start by clearing out the memory. 

Procedure:

[MRC] [MRC] taxable amount [ TAX+ ] [ M+ ] n
non-taxable amount [ M+ ] 
[MRC]  (recall memory)

Example:

Suppose has the invoice has:

A scanner that subject to sales tax:  $69.99
Computer services not subject to sales tax: $34.95
Sales Tax Rate:  9.5%

[ MRC ] [ MRC ] 69.99 [ TAX+ ] [ M+ ] 34.95 [ M+ ] [MRC]

The total invoice is $111.59   (8-Digit display shows 111.58905)


4. Calculating Use Tax

In certain states, such as California, use tax on a purchase can occur.  Where you take delivery determines what sales tax rate you would pay.  If a vendor does not charge the required tax, the use tax kicks in, which constitutes the remaining amount required from the buyer.  How to pay the use tax is beyond the scope of this blog entry. 

Procedure:

taxable amount [ TAX+ ] [ TAX+ ] [ - ] sales tax charged [ = ]

Example:

A purchase of a printer from an online store has a retail price of $164.79.  Sales tax of 8% was charged on the printer in the amount of $13.18.  The purchaser lives in a tax district that has a sales tax rate of 9.5%.  What is the use tax?

164.79 [ TAX+ ] [ TAX+ ] [ - ] 13.18 [ = ]  

The use tax is $2.48  (8-Digit display shows 2.47505)


5.  Find the Taxable Amount Given the Grand Total (Total Plus Tax) 

Sometime you know only the grand total of the invoice, but you need to find what was the taxable amount and the tax applied to that amount.  That is what the key [ TAX- ] is for.

Press [ TAX- ] once to calculate the taxable amount
Press [ TAX- ] again to calculate the tax amount

This is the inverse of the [ TAX+ ] key.

Example:

During an audit, we find an invoice from an electronics retail store for a purchase of a video projector.  However, only the total invoice is readable, in the amount of $187.44.  What is the retail price and what was the sales tax charged?

187.44 [ TAX- ]
Display:  171.17809   (taxable amount:  $171.18)

[ TAX- ]
Display:  16.261917 (sales tax:  $16.26)


6.  Finance: Using [ TAX+ ] to calculate Future Value

Time for a little unorthodox use of the TAX keys to calculate simple compound interest problems.  If you have an investment and you want to know how much your account will be in n periods (usually year), you can use the [ TAX+ ] [ = ] combination.

FV = PV * (1 + r%)^n

FV = future value
PV = present value
r% = interest rate, stored as the TAX rate
n = number of periods

Procedure:

[ MRC ] [ MRC ] 
present value [ M- ]
Loop:  [ TAX+ ] [ = ]   (do this n times for n periods)
(display future value)
[ M+ ] [ MRC ] 
(display interest earned)

Example:

You deposit $1,000.00 in a moderate to aggressive investment account that pays an average of 9.5% per year.  What is the balance after 5 years?  How much interest is earned in those five years?

[ MRC] [ MRC ] 
1000 [ M- ]
[ TAX+ ] [ = ]
[ TAX+ ] [ = ]
[ TAX+ ] [ = ]
[ TAX+ ] [ = ]
[ TAX+ ] [ = ]    (loop the last two keys 5 times)
Future value:  $1,574.24  (8-Digit display: 1574.2385)

[ M+ ] [ MRC ]
Interest earned:  $574.24  (8-Digit display:  574.2385)


7.  Finance: Using [ TAX- ] to calculate Present Value

Similarly, we can use the [ TAX- ] [ = ] combination to calculate the present value of a discounted note. 

PV = FV / (1 + r%)^n

FV = future value
PV = present value
r% = interest rate, stored as the TAX rate
n = number of periods

Procedure:

[ MRC ] [ MRC ] 
future value [ M+ ]
Loop:  [ TAX- ] [ = ]   (do this n times for n periods)
(display future value)
[ M- ] [ MRC ] 
(display interest earned)

Example:

You want to save $10,000.00 in five years.  You find an account that pays 9.5% annual interest.  How much will you need to deposit today to get that $10,000.00 goal in five years?

[ MRC] [ MRC ] 
10000 [ M+ ]
[ TAX- ] [ = ]
[ TAX- ] [ = ]
[ TAX- ] [ = ]
[ TAX- ] [ = ]
[ TAX- ] [ = ]    (loop the last two keys 5 times)
Present value:  $6,352.28  (8-Digit display: 6352.2775)

[ M- ] [ MRC ]
Interest earned:  $3,647.72  (8-Digit display:  3647.723)

What the [ TAX+ ] and [ TAX- ] Keys Calculate

With the tax rate r set:

[ TAX+ ] calculates:   number in the display * ( 1 + r/100)

[ TAX- ] calculates:  number in the display / (1 + r/100 )

Happy calculating and may all your calculations, and work weeks, be successful,

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, April 27, 2019

HP Prime: Drawing 3D Lines and Boxes

HP Prime:  Drawing 3D Lines and Boxes

Introduction

I was sent an email from Carissa.  One of the questions was to explain the 3D features of LINE and TRIANGLE commands.  Confession:  I have never used to the 3D features of LINE and TRIANGLE before, time to learn something new.  Here is what I learned.


The Command LINE

In 3D drawing, you can connect as many points as you want.  In the most simple form, LINE takes three arguments:

*  Point Definition
*  Line Definition
*  Rotation Matrix

Point Definition

You define points of three dimensions (x, y, z) and if you want, a color.  The color attached to the point dominates any portion of the line that is nearest to the point.   The point definition is a nested list.

Syntax:  { {x, y, z, [color]}, {x, y, z, [color]}, {x, y, z, [color]}, ... }

Pay attention to the order you set your points.  Each point will be tied to an index.  For example, the first point in this list will have index 1, the second point in the list will have index 2, and so on.  Knowing the index number will be needed for the Line Definition.

Line Definition

This is where you assign which lines connect to which points.

Syntax:  { {index start, index end, [color], [alpha]}, {index start, index end, [color], [alpha]}, {index start, index end, [color], [alpha]},  ... }

Like the Point Definition, the Line Definition is a nested list.  You can make as many points as you want. 

Color and alpha in the List Definition overrides any color defined in the Point Definition list.

Rotation Matrix

This tells you the command how you want to rotate the matrix with the respect to the x, y, and z axis, respectively.  The acceptable size for the matrix is 2 x 2 (for x and y only), 3 x 3 (x, y, and z axis) and 3 x 4 (I'm not sure what the fourth column is for).  For this blog entry and in practice, I use the 3 x 3 rotation matrix.

In general:

Rx = [ [1, 0, 0],[0 cos a, -sin a],[0, sin a, cos a] ], rotation about the x axis at angle a
Ry = [ [cos b, 0, -sin b], [0, 1, 0], [sin b, 0, cos b ] ], rotation about the y axis at angle b
Rz = [ [cos c, -sin c, 0], [sin c, cos c, 0], [0, 0, 1] ], rotation about the z axis at angle c

Full Rotation matrix: r = Rx * Ry * Rz

You can create a program to calculate rotation matrix or copy the syntax to use in your drawing program, as shown here:

HP Program ROTMATRIX

EXPORT ROTMATRIX(a,b,c)
BEGIN
// rotate x axis
// rotate y axis
// rotate z axis
LOCAL x,y,z,r; 

x:=[[1,0,0],[0,COS(a),−SIN(a)],
[0,SIN(a),COS(a)]];
y:=[[COS(b),0,−SIN(b)],[0,1,0],
[SIN(b),0,COS(b)]];
z:=[[COS(c),−SIN(c),0],
[SIN(c),COS(c),0],[0,0,1]];
r:=x*y*z;

RETURN r;

END;

Drawing the Boxes

HP Prime Program:  DRAWBOX



The program DRAWBOX draws a simple box. 

EXPORT DRAWBOX()
BEGIN
// 3D line demo
// draw still box demo 
// 2019-04-23 EWS

// black background
RECT(0);

// colors - do this first
LOCAL c1:=#FFFF00h; // yellow
LOCAL c2:=#39FF14h; // neon green
LOCAL c3:=#FFFFFFh; // white


// points of the cube
LOCAL p:={{−3,0,0,c1},{0,−2,2,c1},
{3,0,0,c1},{0,2,−2,c2},
{−3,6,0,c1},{0,4,2,c1},
{3,6,0,c1},{0,8,−2,c2}};


// line definitions
// bottom
LOCAL d1:={{1,2},{2,3},
{3,4},{4,1}};
// top
LOCAL d2:={{5,6},{6,7},
{7,8},{8,5}};
// sides, override with white
LOCAL d3:={{1,5,c3},{2,6,c3},
{4,8,c3},{3,7,c3}};

// rotation matrix
LOCAL r:=[[1,0,0],[0,1,0],
[0,0,1]];

LINE(p,d1,r);
LINE(p,d2,r);
LINE(p,d3,r);

WAIT(0);

END;


HP Prime Program: DRAWBOX2



DRAWBOX2 takes three arguments, rotation of the x axis, rotation of the y axis, and rotation of the z axis.  The arguments are entered in degrees, as the calculator is set to Degrees mode in the program.

EXPORT DRAWBOX2(a,b,c)
BEGIN
// 3D line demo
// draw 3D box
// 2019-04-23 EWS
// rotate the cube

// set degrees mode
HAngle:=1;

// rotation calculation
// rotate x axis
// rotate y axis
// rotate z axis
LOCAL x,y,z,r; 

x:=[[1,0,0],[0,COS(a),−SIN(a)],
[0,SIN(a),COS(a)]];
y:=[[COS(b),0,−SIN(b)],[0,1,0],
[SIN(b),0,COS(b)]];
z:=[[COS(c),−SIN(c),0],
[SIN(c),COS(c),0],[0,0,1]];
r:=x*y*z;

// black background
RECT(0);

// colors - do this first
LOCAL c1:=#FFFF00h; // yellow
LOCAL c2:=#39FF14h; // neon green
LOCAL c3:=#FFFFFFh; // white


// points of the cube
LOCAL p:={{−3,0,0,c1},{0,−2,2,c1},
{3,0,0,c1},{0,2,−2,c2},
{−3,6,0,c1},{0,4,2,c1},
{3,6,0,c1},{0,8,−2,c2}};


// line definitions
// bottom
LOCAL d1:={{1,2},{2,3},
{3,4},{4,1}};
// top
LOCAL d2:={{5,6},{6,7},
{7,8},{8,5}};
// sides, override with white
LOCAL d3:={{1,5,c3},{2,6,c3},
{4,8,c3},{3,7,c3}};

// rotation matrix is already
// defined

LINE(p,d1,r);
LINE(p,d2,r);
LINE(p,d3,r);

WAIT(0);

END;

3D Triangles

The format for TRIANGLE is similar except the definition list has three points to make up the triangle instead of two. Format: {x, y, z, [ c ]}

Code:

EXPORT TEST6241()
BEGIN
// test 3D triangle
RECT_P();

//TRIANGLE({0,0,#0h,0},
//{2,2,#0000FFh,39},
//{1,5,#FF0000h,−2});

LOCAL c:=#400080h;
LOCAL p:={{0,0,0},{−10,−8,2},
{−6,4,3},{0,0,0}};
LOCAL d:={{1,2,3,c},{1,2,4,c},
{1,3,4,c},{2,3,4,c}};
local rotmat= [[1, .5, 0], [.5, 1, .5], [0, .5, 1]];   // Initial rotation matrix. No rotation but translate to middle of screen 
TRIANGLE(p,d,rotmat);

WAIT(0);
END;

Hope this helps and all of our drawing capabilities on the HP Prime are expanded.  Carissa, thank you for your email, much appreciated and I learned a great new skill.  All the best!

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.

Friday, April 26, 2019

TI-84 Plus CE: Time Plot of Two Parametric Equations

TI-84 Plus CE:  Time Plot of Two Parametric Equations

Introduction 

The program TIMEPLOT animates two parametric plots. 

TI-84 Plus Program TIMEPLOT
(237 bytes)

"EWS 2019-04-22"
Param
PlotsOff
FnOff
Input "T START:",A
Input "T STOP:", B
Input "T STEP:", S
int((B-A)/S) → N
A → T: {X1T} → L1 : {Y1T} → L2
{X2T} → L3: {Y2T} → L4
For(I,2,N)
A + S*(I-1) → T
augment(L1, {X1T}) → L1
augment(L2, {Y1T}) → L2
augment(L3, {X2T}) → L3
augment(L4, {Y2T}) → L4
Plot1(Scatter, L1, L2, □, BLUE)
Plot2(Scatter, L3, L4, □, GREEN)
DispGraph 
Wait 1
End



Example

X1T = 2 SIN T
Y1T = 3 SIN T

X2T = SIN (T^2/4)
Y2T = 1/2 * COS(T^2/8)

T START: 0
T STOP: 4 * π
T STEP: π / 24



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.

Wednesday, April 24, 2019

Casio fx-CG50: Animation of a Graph

Casio fx-CG50:  Animation of a Graph

Introduction

You can easily animate a graph with the Dynamic Graphing mode.   While I'm describing this procedure for the fx-CG50, I'm pretty sure it is available for the earlier models such as fx-CG10, fx-9750GII, and fx-9860GII.

Specifically, you can dynamically change a single variable between two points with a specified step.

For example:  y = A*x  where A varies from 0 to 5, and its step is 1.

General Procedure

1.  Enter Dynamic Graph mode.  On the fx-CG50, press [ MENU ], [ 6 ].

2.  Type and select an equation.  The equation can be a function, a set of parametric equations, a polar equation, or on newer calculators, a shaded inequality.

3.  Press [ F4 ] (VAR) to take you to the variable screen.   Select the variable you want to animate.  You can animate any variable A - Z and θ.  Keep in mind that X is used for functions equations, T is used for parametric equations, and θ is for polar equations.

4.  Set the Animation Speed by pressing [ F3 ] (SPEED).  The speeds that can be selected are:

F1:  Stop & Go  (you advance the slides with the right and left arrows)
F2:  Slow speed
F3:  Normal speed
F4:  Fast speed

5.  Press [ F6 ] (DYNA) to start the animation.  To stop it, press [ AC ].

Example 

x1(t) = 1.2 * A * cos T
y1(t) = A * sin (T + 1) * cos (Ï€/(3*T))
with Ï€/12 ≤ T ≤ 2 Ï€, step Ï€/12





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, April 21, 2019

App Review: SciPro Math - Campusano (Revisited)

App Review:  SciPro Math - Campusano (Revisited)

The Return of SciPro Math

If you want to see my review of my previous version, please check here:  http://edspi31415.blogspot.com/2018/01/app-review-scipro-math-campusano-apple.html

This review is for the current version (Version 4).  I was emailed by the programmer Roberto A. Campusano when the latest version is now available. 

Quick Facts:

Title:  SciPro Math
Author/Programmer:  Robert A. Campusano
Platform:  iOS
Price: $9.99
Version:  4.0
Website:  https://scipromath.com/







Introduction

The SciPro Math calculator app is a scientific calculator that features over 648 functions that features many applications, including:

*  U.S.-SI Conversions
*  Finance
* Geometry
* Fractions and Proportions
* Solving Linear Systems up to 4 x 4
* Solving Polynomials up the order 4

The SciPro Math has two modes.  If your Apple device (iPhone, iPad, or iPod Touch) is in the portrait position, it is a simple, four function calculator.  If your Apple device  is in the landscape position, it is in the scientific calculator.

The calculator runs in Chain mode.  Therefore, there is no algebraic preferences or parenthesis.  It could get a little used to if you are accustomed to traditional scientific calculators, but not a big deal once get a hang of it.  If you are used to regular four-function calculators, you should feel right at home with the operation of the SciPro Math.

The rest of this review and blog will assume that you are working in scientific calculator mode (landscape). 

The Modifier Toggle Keys

The calculator has five modifier keys:  [ 2nd ], [ 3rd ], [ rad (off), deg (on) ] (4th), [ 5th ], and [ 6th ].  The modifier keys act as toggles, and depending on whether they are turned on and off, determine what keyboard is present.  You can quickly access any keyboard by entering the keyboard's number and pressing the purple [SC] key on top of the app.

I'm going to give details on some of the keyboards later, but information for all the 24 keyboards can be found here:  https://scipromath.com/the-screens/

Think of the modifier keys as "binary powers of 2:"

[2nd] is the 1 flag
[3nd] is the 2 flag
[rad/deg (4th)] is the 4 flag
[5th] is the 8 flag
[6th] is the 16 flag

Any total of flags that exceed 24 shows the 24th keyboard:  Storage Space keyboard.  Here you can access 26 memory registers Av through Zv.

Storing and Calculating

A lot of the keyboards is a dedicated solver for a specific application.  I will go over some of the details later but in general, the keys that belong to a calculation are all grouped by colors. 

In general, in a color group if the key has the format [ var.app ], that is an input variable.  Input the value by typing it, pressing the indigo [ →(X)v ] store button. 

If a key has an equal sign at the end, [ var.app= ], that is an output variable.  Press this button to get the answer. 

Documentation

One of the things that I wasn't crazy about in my previous review was the lack of documentation.  Thankfully, this has greatly improved.

First, the app will give prompts of what each key does.  The prompt will appear in indigo on the upper right hand screen.  I find this super helpful when learning how to use the app. 

Second, the app has its own YouTube channel, SciPro math.  The videos, by Roberto Campusano  explain on how to use some of the applications in a clear, concise fashion.  If you are using this app for the first time, I recommend going over the videos. 

SciPro Math's YouTube channel:  https://www.youtube.com/channel/UCKHZdGBoHBUazE--0CDn4aQ/videos

Some Keyboard Details

Keyboard 0:  Basic Operations - Angles are in Degrees
Modifiers:  None

Variable Registers:  Av, Bv, Cv
Trig Functions:  sin, cos, tan, sci, csi, bta, sihn, cosh, tanh
Functions:  log, ln, 10^x, e^x, x^2, x^3, √, x^1/3, x^-1
Constants:  Ï€, e, Φ

The functions of sci, csi, and bta are specialized. 

Keyboard 1:  Basic Operations - Angles are in Degrees 
Modifiers:  [ 2nd ]

Variable Registers: Dv, Ev, Fv
Trig functions: sec, sec, cot, bsc, bcs, bct, csch, sech, coth
Functions: ln(x+1), x! (x must be an integer), power, roots, log base 2, e^(x-1)
Constants:  γ

Note:  bsc x = 1/sci x,  bct x = 1/csi x, bct x = 1/bta x

Keyboard 2:  Pythagorean Theorem (and Inverse Trig Functions) - Angles are in Degrees

Variable Registers: Gv, Hv, Iv
Inverse Trig Functions: sin^-1, cos^-1,  tan^-1, sinh^-1, cosh^-1, tanh^-1
Constants:  Ï€/2, Ï€/3, Ï€/4, √2, ln 2
Angle Conversions:  r-deg (radians to degrees), d-rad (degrees to radians)

Hypotenuse Function:
x  [hyp] y [ = ] returns √(x^2 + y^2)

Side Function:
x [side] y [ = ] returns √|x^2 - y^x|    ( | n | = abs(n))

Keyboard 3:  Probability
Modifiers: [ 2nd ], [ 3rd ]

Variable Registers: Jv, Kv, Lv
Random Integers:  rand52 (1 -52), rand10 (1 - 10), coin (0 - 1), dice (1 - 6)
x [ x-y ] y [ = ] returns a random integer between x and y.  x and y can be negative

Probability:
x [ xCr ] r [ = ] returns x! / ( (x - r)! * r!): the number of the combinations
x [ xPr ] r [ = ] returns x! / (x - r)!:  the number of permutations

Conversions: between temperatures °F, °C, K

Keyboard 4:  Conversions, Trig in Radians
Modifiers:  [rad/deg] turned to deg

Trig Functions: sci, cos, tan, sci,csi, bta
Conversions: in/mm, in/cm ft/cm, ft/m, yd/m, mi/km, lb/kg

Keyboard 6:  Conversions, Trig in Radians
Modifiers:  [ 3rd ], [ rad/deg ] turned to deg

Trig Functions: sin^-1, cos^-1, tan^-1
Conversions: tsp/Tsp, Tsp/cu, tsp/mL, cu/pt, pt/qt, qt/gal, gal/L

Keyboard 8:  Fractions and Ratios, Slope
Modifiers: [ 5th ]

Two fractions in the form of a/b and c/d
[ a ]:  numerator input of a/b
[ b ]:  denominator input of a/b
[ c ]:  numerator input of c/d
[ d ]: denominator input of c/d

Addition of fractions: Numerator:  [ ad + bc ], Denominator: [ bd ]
Subtraction of fractions: Numerator: [ ad - bc ], Denominator: [ bd ]
Multiplication of fractions: Numerator: [ ac ], Denominator: [ bd ]
Division of fractions: Numerator: [ ad ], Denominator: [ bc ]

Slope of two points (x1, y1) and (x2, y2): 
Input:  [x1 ], [ y1 ], [ x2 ], [ y2 ]
Output:  [ slope ]:  (y2 - y1)/(x2 - x1);  [ -m^-1 ]:   -(x1 - x2)/(y1 - y2)

Keyboard 9:  Linear Equations
Modifiers: [ 2nd ], [ 5th ]

Linear Form:  ax + by = c
s(x) and t(x) contains this form. 
Input:  [ ax1 ], [ by1 ], [ cx0 ]
Output: [ x-int ]: x-intercept of s(x); [ y-int ]: y-intercept of s(x);
[ s(x)= ]: solve for y given x; [ s^-1(x) ]: solve for x given y

Slope Intercept Form: mx + b
f(x) and g(x) contains this form
Input: [ mx1 ], [ bx0 ]
Output: [ f(x)= ]:  solve for y given x; [ f^-1(x) ]: solve for x given y

Keyboard 10: Quadratic Equations
Modifiers: [ 3rd ], [ 5th ]

Equation:  j(x) = a0 *x^2 + a1 * x + a2
Input:  [ a0x^2 ], [ a1x^1 ], [ a2x^0 ]

Output:
Roots:  Real: [ x21  ], [ x22 ];  Imaginary:  [ x21i ], [ x22i ]
[ D2 ]: discriminant

Keyboard 11:  Cubic Equation - Modifiers [ 2nd ], [ 3rd ], [ 5th ]

Keyboard 12:  Quartic Equation - Modifiers [ rad/deg ] set to deg, [ 5th ]

Keyboard 16:  3 x 3 Linear System - Modifiers [ 6th ]

Keyboard 20: Geometry 
Modifiers:  [ rad/deg ] set to deg, [ 6th ]

Sphere:  Input:  r.sp (radius).  Output: D.sp (diameter), V.sp (volume), S.sp (surface area)
Circle: Input: r.c (radius).  Output: D.c (diameter), A.c (area), C.c (circumference)
Trapezoid: Input: b1 (base 1), b2 (base 2), h/t (height).  Output: A/t (area)
Rectangle:  Input: l.r (length), w.r (width).  Output: A.r (area), P.r (perimeter)
Triangle: Input: a.t (side a), b.t (side b), c.t (side c). Output:  A.t (area), P.t (perimeter)
Box:  Input: l.b (length), w.b (width), h.b (height).  Output: V.b (volume), S.b (surface area)

Verdict

I'm really happy with this updated version of SciPro Math, the online prompts make a huge difference, and the how-to videos are top notch.  Also, the operation of the calculator is simple and is good for quick calculations. 

This app is worth looking into and now I see the justification of spending the $9.99 on this app. 

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.

Friday, April 19, 2019

TI-74: Five Stencil Derivative, Vertical Height on a Hill, Solving Cubic Equations

TI-74:  Five Stencil Derivative, Vertical Height on a Hill, Solving Cubic Equations

TI-74 Program: Five Stencil Derivative

This program estimates the numerical derivative of f(x) at x0 by the formula:

f'(x0) ≈ ( -f(x0+2h) + 8*f(x0+h) - 8*f(x0-h) + f(x0-2h) )/(12h)

Source:  "Five Stencil Method"  Wikipedia.  Page last edited November 8, 2018.  https://en.wikipedia.org/wiki/Five-point_stencil  Retrieved April 14, 2019

Note:  comments (after !) are for notes, and do not need to be typed. 


500 PRINT "F(X) IS ON LINE 550.": PAUSE 1: RAD  ! RAD sets radians mode
502 INPU T "X: ";A
504 INPUT "H: ";H
506 D=0: X=A+2*H: GOSUB 550
508 D=-F: X =A+H: GOSUB 550
510 D=8*F+D: X=A-H: GOSUB 550
512 D=D-8*F: X=A-2*H: GOSUB 550
514 D=(D+F)/(12*H)
516 PRINT "DF/DX =";D: PAUSE 
518 END
550 F=5.2^X  ! Insert F(X) here
552 END

Examples:

550  F=5.2^X
x0 = 1.2, h = 0.001, Result:  11.92160564

550 F=EXP(X)*SIN(X)
x0 = PI/3, h = PI/24, Result: 3.892851849

TI-74 Program:  Vertical Height on a Hill

Variables:
H = height of the observer
L = horizontal length
V = vertical angle (entered in degrees-minutes-seconds, DD.MMSSSS)
G = ground slope (entered in degrees-minutes-seconds, DD.MMSSSS)

If G>0, the hill is at an elevation.  If G<), the hill is at an depression.

T = total height = vertical difference + observer's height
T = L * (tan V - tan G) + H

Since there is no DMS to decimal conversion function in TI-74's basic, a conversion is necessary. The following is sample code where A is DMS format needed to be converted:

T = ABS(A)
D = INT(T)
M = INT((T-D)*100)
S = ((T-D)*100-M)*100
A = (D+M/60+S/3600)*SGN(A)

The program code is shown below:

600 INPUT "LENGTH: ";L
602 INPUT "OBSERVER'S HEIGHT: ";H   ! ' is SHIFT + SPACE

604 DEG: PRINT "ANGELS IN DD.MMSSSS": PAUSE 1.5
606 INPUT "VERTICAL ANGLE: ";V: A=ABS(V)
608 D=INT(A): M=INT((A-D)*100): S=((A-D)*100-M)*100
612  V=(D+M/60+S/3600)*SGN(V)

614 INPUT "GROUND SLOPE: ";G: A=ABS(G)
616 D=INT(A): M=INT((A-D)*100): S=((A-D)*100-M)*100
618 G=(D+M/60+S/3600)*SGN(G)

620 T=L*(TAN(V)-TAN(G))+H
622 PRINT "TOTAL HEIGHT =";T: PAUSE
624 END

Examples:

Input:  L: 10 m, V: 30°14'33", G: 10°30'00", H = 1.7780 m
Result:  T = 5.754638129 m

Input:  L: 10 m, V: 30°14'33", G: -10°30'00", H = 1.7780 m
Result:  T = 9.461464028 m

Source: 

F.A. Shepherd "Engineering Surveying: Problems and Solutions" 2nd Edition  Edward Arnold Publishers Ltd.  London, UK  1983 ISBN 0-7131-3478-X

TI-74 Program:  Solving Cubic Equations

This program solves the cubic equation:

A*X^3 + B*X^2 + C*X + D = 0

This program uses Newton's method to get the first root, then divides the polynomial by (x - root).  Finally the quadratic formula is used to find the other two roots.  This program assumes the coefficients A, B, C, and D are real.  An initial guess of 1 is used (can be changed, see line 710).

700 PRINT "A*X^3+B*X^2+C*X+D=0, REAL COEFS.": PAUSE 1.5
702 INPUT "A: ";A
704 INPUT "B: ";B
706 INPUT "C: ";C
708 INPUT "D: ";D

710 X=1
712 XN=X-(A*X^3+B*X^2+C*X+D)/(3*A*X^2+2*B*X+C)
714 IF ABS(XN-N)<1e-9 718="" font="" then="">
716 X=XN: GOTO 712

718 X1=XN
720 PRINT "X1 =";X1: PAUSE
722 J=-(A*X1+B)
724 K=(A*X1+B)^2-4*A*(A*X1^2+B*X1+C)
726 IF K<0 750="" font="" then="">
728 X2=(J+SQR(K))/(2*A): X3=(J-SQR(K))/(2*A)
730 PRINT "X2 =";X2: PAUSE
732 PRINT "X3 =";X3: PAUSE
734 END

750 XR=J/(2*A): XI=SQR(ABS(K))/(2*A)
752 PRINT XR;"+- ";XI;"I": PAUSE
754 END

Example:
A: 1, B: 1, C: -9, D: -9
Roots: -3, 3, 1
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, April 18, 2019

TI-74: Lottery, Solving Linear Equation Script, Escape Velocity Solver

TI-74:  Lottery, Solving Linear Equation Script, Escape Velocity Solver

TI-74 Program:  Lottery

This program collects six random digits from 1 to 63.  The results are stored in an array N.  The dimension pointers of the TI-74 are from 0 to n-1. 

To execute:  RUN 200

Note:  comments (after !) are for notes, and do not need to be typed. 

200 DIM N(5)
202 INPUT "SEED: ";S
204 RANDOMIZE S
210 FOR I=0 TO 5    ! choose random numbers
212 R=INT(RND*63+1)
220 FOR J=0 TO 5   ! check to see if the random number is unique
222 IF R=N(J) THEN 212
224 NEXT J
230 N(I) = R
232 K=K+1
234 PRINT "# "&STR$(K)$": "&STR$(N(I))
236 PAUSE 1.5
240 NEXT I
242 END

TI-74 Program:  Solving Linear Equation Script

This program uses READ and DATA to execute a teaching script.

To execute:  RUN 300

300 FOR I=1 TO 5
302 READ S$  ! string variables have the dollars sign after the name
304 PRINT S$: PAUSE
306 NEXT
310 DATA "To Solve: a*x + b = c"
312 DATA "a*x + b - b = c - b"
314 DATA "a*x = c - b"
316 DATA "(a*x)/a = (c-b)/a"
318 DATA "x = (c-b)/a"
320 END

TI-74 Program:  Escape Velocity Solver

This program is in two stages:
1.  Enter data.  Use M, R, or V to enter data.  When done, press C to solve.
2.  Choose which variable to solve for. 

M = mass of the planet in kg
R = radius of the planet in km
V = escape velocity in km/s

G = Universal Gravitational Constant
= 6.672E-11 m^3/(kg*s^2) = 6.672E-20 km^3/(kg*s^2)

Equation:  V = √(2 * G * M/R)

To execute:  RUN 400

400 M=0:R=0:V=0:G=6.674E-20
402 PRINT "M MASS, R RADIUS, V VEL, CALC":K$=KEY$
406 IF K$="M" THEN 420
408 IF K$="R" THEN 430
410 IF K$="V" THEN 440
412 IF K$ = "C" THEN 450
414 GOTO 402   ! repeats loop if any other key is pressed

420 INPUT "MASS (KG): ";M
422 GOTO 402
430 INPUT "RADIUS (KM): ";R
432 GOTO 402
440 INPUT "VELOCITY (KM/S): ";V
442 GOTO 402
450 PRINT "SOLVER: M,R,V": K$=KEY$

452 IF K$="M" THEN 460
454 IF K$="R" THEN 470
456 IF K$="V" THEN 480
458 GOTO 450

460 M=V^2*R/(2*G)
462 PRINT "MASS =";M;" KG": PAUSE
464 GOTO 490
470 R=2*G*M/V^2
472 PRINT "RADIUS =";R;" KM": PAUSE
474 GOTO 490
480 V=SQR(2*G*M/R)   ! SQR is √
482 PRINT "VELOCITY =";V;" KM/S": PAUSE
484 GOTO 490

490 PRINT "AGAIN? Y/N": K$=KEY$
492 IF K$="Y" THEN 402
494 IF K$="N" THEN END
496 GOTO 490

Examples: 

Solve for V:   M: 5.9724E24 kg, R:  6374 km,  Result: V ≈ 11.178 KM/S
*Escape Velocity for Earth

Solve for M:  R: 5800 km, V: 16 km/s,  Result:  M ≈ 1.112E25 kg

Solve for R:  M: 3.8E24 kg, V: 22 km/s, Result:  R ≈ 1048.0148 km

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, April 16, 2019

My Blog Turns 8!

My Blog Turns 8!



It turns out last year I was a bit early on declaring my blog's birthday.  My first blog was not on April 11, 2011 but on April 16, 2011.  Here it is:

https://edspi31415.blogspot.com/2011/04/hi-everyone-this-is-my-very-first-blog.html

Not too exciting, I know.  The first mathematical topic I did was reviewing the HP 10BII+ financial calculator:

A first look on April 18, 2011:

https://edspi31415.blogspot.com/2011/04/hp-10bii-first-look.html

And here was my review of it on April 20, 2011:

https://edspi31415.blogspot.com/2011/04/10bii-review.html

What followed is a popular review of my blog, the review of the Texas Instruments TI-36X Pro, which was posted on April 27, 2011:

https://edspi31415.blogspot.com/2011/04/ti-36-pro-review.html

I just want to give a big shout out and thanks to each and every one of you.  I am happy and fortunate to share my love of mathematics and calculators with all of you.  Here's to many more years, readers!

Eddie Shore

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, April 11, 2019

Quickie RPN Routines: HP 42S, DM42, Free 42

Quickie RPN Routines: HP 42S, DM42, Free 42

X, Y refer to their respective stacks and their values

1 + 1 /( 3^(2*X)) + 1/(5^(2*X))

Routine A:
(Labels are omitted for these exercises)

2
*
ENTER
ENTER
3
X <> Y
Y  ↑X
1 / X
X <> Y

X <> Y
Y ↑ X
1 / X
+
1
+
END

Routine B:

2
*
+ / -
3
X <> Y
Y ↑ X
LAST X
5
X <> Y
Y ↑ X
+
1
+
END

Examples:
X:  2.0000,  Result: 1.0139
X:  3.1666,  Result: 1.0010


(X + Y)*(X^2 + Y^2)

Routine A:

ENTER 
X ↑ 2
R ↓
X <> Y
+
LAST X
X ↑ 2
R ↑

*
END

Routine B:

STO ST Z
X ↑ 2
X <> Y
STO + ST Z
X ↑ 2
+
*
END

Examples:
X:  4.0000, Y: 3.0000, Result: 175.0000
X:  2.7000, Y: 3.6000, Result: 127.5750

√(1 + X^2) / √(1 - X^2)

Routine A:

X ↑ 2
1
X <> Y

LAST X
1
+
X <> Y
÷
SQRT
END

Routine B:

X ↑ 2
ENTER
ENTER
1
STO + ST Z
STO - ST Y
R ↓
+ / -
÷
SQRT
END

Examples:
X: 0.5556, Result: 1.3759
X: 0.7278, Result: 1.8035

X / √(X^2 + Y^2)

Routine: 

X ↑ 2 
X <> Y
STO ST Z
X ↑ 2
+
SQRT
÷
END

Examples:
X:  0.5000, Y:  0.7500, Result: 0.5547
X:  1.8080, Y:  1.0220, Result: 0.8705

(X + Y) / (X * Y)

Routine  A:

STO ST Z
X <> Y
STO + ST Z
*
÷
END

Routine B:

ENTER 
R ↓
X <> Y
+
LAST X
R ↑

÷
END

Examples:
X:  5.0000, Y: 4.0000, Result:  0.4500
X:  2.9505, Y: 3.8181, Result:  0.6008

X^Y + Y^X

Routine A:

ENTER
R ↓
X <> Y
Y ↑ X
LAST X
R ↑
Y ↑ X
+
END

Routine B:

ENTER 
R ↓
X <> Y
Y ↑ X
LAST X
R ↑
Y ↑ X
+
END

Examples:
X:  3.9050, Y: 2.7006, Result:  88.0041
X:  4.2650, Y: 4.8750, Result:  2036.6461

Have fun!  See you all next week! 

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.

Wednesday, April 10, 2019

Casio MS-80 Series and HP 17BII+: Using Exchange Rates for US/SI Conversions

Casio MS-80 Series and HP 17BII+:  Using Exchange Rates for US/SI Conversions

Casio MS-80 Series



I am demonstrating this technique on a Casio MS-80TV, however, this can apply to any desktop calculator which exchange rate functions are offered.  This includes the Casio MS-6CO (where the keys are labeled METRIC|CONV) and Casio MS-80B.

To set the rate:

1.  Set the calculator to Exchange Mode.  Press [MODE M/EX] until EXCH appears in the display. 
2.  Press [ AC ] then hold [ % ] until the display refreshes.  The display will then say SET.
3.  Select the exchange memory rate you want to set.  C2, C3, some models have C4. 
4.  Enter the conversion rate.  You can include up to six significant digits. 
5.  Press [ % ]. 
6.  Press [ AC ] to clear the calculator.

Multiply by the rate:  n [C1] [C2]*

Divide by the rate:  n [C2]* [C1]

* can be C3 or C4

Example: 1  US mile = 1.609344 km

We'll use the approximation 1 mi ≈ 1.60934 km

Keystrokes:
(in EXCH mode): 
[AC] hold [  % ]
(SET is displayed)
[C2] 1.60934 [ % ]
[AC]

Convert 20 mi to km:  20 [C1] [C2]  (Result:  32.1868)
Convert 50 km to mi:  50 [C2] [C1]  (Result:  31.068636)

Hewlett Packard HP 17BII+



This applies to the revised HP 17BII+ series, not the original. 

To set the rate:

1.  From the main menu, select (CURRX) (currency conversion mode).
2.  Press (SELCT).  At the prompt "SELECT CURRENCY 1", choose a currency name.  I suggest A [ ( MORE) (MORE) ( A )].
3.  Press (SELCT).  At the prompt "SELECT CURRENCY 2", choose a currency name.  I suggest B [ ( MORE) (MORE) ( B )].
4.  Enter your conversion rate.  Unlike the Casio MS-80 series, there is no limit to the number of significant digits you can enter.  Press (RATE).  If your labels (currencies) have already been set, you can skip steps 2 and 3 and instead, enter the conversion rate and press (RATE).

Multiply by the rate*:  n ( A ) ( B )

Divide by the rate*:  n ( B ) ( A )

* or whatever the labels you designate.  ( A ) is on the left, ( B ) is on the right.

Going back to our example:  1  US mile = 1.609344 km

Keystrokes (ALL display format is selected for this example):
(in CURRX mode)
(SELCT) (MORE) (MORE) ( A )*
(SELCT) (MORE) (MORE) ( B )*
1.609344 (RATE)

Convert 20 mi to km:  20 ( A ) ( B )  (Result:  32.18688)
Convert 50 km to mi:  50 ( B ) ( A ) (Result:  31.0685596119)

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, April 7, 2019

HP Prime and TI-84 Plus CE: Drawing Angles

HP Prime and TI-84 Plus CE:  Drawing Angles

Introduction

The program DRAWANG draws an angle.  You give the starting line from coordinates (0,0) to (A,B).  The origin is given automatically.  The calculator will then a draw a line that results from the given angle θ from the origin to a calculated point. 

The calculator will work in the angle mode your calculator mode is currently set.

For clockwise angles, enter θ as negative.

For counterclockwise angles, enter θ as positive.

HP Prime Program DRAWANG

EXPORT DRAWANG()
BEGIN
// 2019-04-04 EWS
STARTAPP("Function");
Xmin:=−11; Xmax:=11;
Ymin:=−11; Ymax:=11;
LOCAL A,B,C,D,R,θ,Z;
INPUT({A,B,θ},"Begin Point (A,B)
; Angle θ",{"A:","B:","θ:"},
{"−10≤A≤10","−10≤B≤10","Angle"});
R:=√(A^2+B^2);
Z:=θ+ARG(A+B*i);
C:=R*COS(Z); D:=R*SIN(Z);
RECT();
// Axes
LINE(−11,0,11,0,#D0D0D0h);
LINE(0,−11,0,11,#D0D0D0h);

// Angle
LINE(0,0,A,B,#FF0000h);
LINE(0,0,C,D,#0000FFh);
TEXTOUT("Angle: "+STRING(θ),
−11,11,3,#006000h);
WAIT(0);
END;

(Alternatively, with HComplex set to 1  (allow complex numbers from real input, and display them as a+bi):

EXPORT DRAWANG()
BEGIN
// 2019-04-04 EWS
HComplex:=1;
STARTAPP("Function");
Xmin:=−11; Xmax:=11;
Ymin:=−11; Ymax:=11;
LOCAL A,B,C,D,R,θ,Z;
INPUT({A,B,θ},"Begin Point (A,B)
; Angle θ",{"A:","B:","θ:"},
{"−10≤A≤10","−10≤B≤10","Angle"});
R:=√(A^2+B^2);
Z:=θ+ARG(A+B*√(-1));
C:=R*COS(Z); D:=R*SIN(Z);
RECT();
// Axes
LINE(−11,0,11,0,#D0D0D0h);
LINE(0,−11,0,11,#D0D0D0h);

// Angle
LINE(0,0,A,B,#FF0000h);
LINE(0,0,C,D,#0000FFh);
TEXTOUT("Angle: "+STRING(θ),
−11,11,3,#006000h);
WAIT(0);
END;

The latter program can be copied straight from the blog as text.  The former will be needed to type in manually. 


TI-84 Plus CE Program DRAWANG

"2019-04-04 EWS"
Func
ZStandard
PlotsOff 
FnOff 
ClrDraw
AxesOn 
Disp "BGN POINT (A,B)","­10≤A≤10,­10≤B≤10","θ: ANGLE"
Prompt A,B,θ
√(A²+B²)→R
θ+R▶ Pθ(A,B)→Z
R*cos(Z)→C
R*sin(Z)→D
Line(0,0,A,B,RED)
Line(0,0,C,D,BLUE)
TextColor(GREEN)
Text(0,0,"ANGLE: "+toString(θ))
DispGraph



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.

TI 84 Plus CE: Linear Equation Algebra Drill

TI 84 Plus CE: Linear Equation Algebra Drill





Note:  This program is recommended for the TI-84 Plus CE with OS 5.2 or later.

The program ALGDRILL has the user answer ten questions to solve for x in the following linear equation:

A * X + B = C

The values of A, B, and C are randomly selected from -10 to 10. Note that A ≠ 0.

TI-84 Plus CE Program ALGDRILL

"EWS 2019-04-07"
0→S

For(K,1,10)
0→A:0→B

Repeat A≠0 and B≠0
randInt(­10,10)→A
randInt(­10,10)→B
End

randInt(­10,10)→C
(C-B)/A→X
ClrHome
Disp toString(K)+". : "+toString(A)+"X + "+toString(B)+" = "+toString(C)
Input Y

If Y=X
Then
Disp "CORRECT :)",X ▶Frac
S+1→S
Else
Disp "INCORRECT.","ANSWER: ",X▶Frac
End
Pause

End
ClrHome
Disp "SCORE: "+toString(S)+"/10"
If S≥8
Disp "WELL DONE!"

Download the program here:  https://drive.google.com/file/d/13udTfPgG_qqEry1ILBD1UjvJ1JWi-mz7/view?usp=sharing

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.

Casio fx-9750GIII and fx-CG 50: Playing Games with the Probability Simulation Mode

Casio fx-9750GIII and fx-CG 50: Playing Games with the Probability Simulation Mode The Probability Simulation add-in has six type...