Showing posts with label tips. Show all posts
Showing posts with label tips. Show all posts

Sunday, August 1, 2021

Casio fx-115ES Plus: Ten Tips

 Casio fx-115ES Plus:  Ten Tips


This blog entry covers both the original and the current 2nd Edition of the Casio fx-115 ES Plus.  Here are ten things to help you know about some of the advanced features of the fx-115 ES Plus, including some things to watch out for.  


I believe this also covers the fx-991 ES Plus 2nd Edition (NOT the Classwiz).  


Tip 1:  Integer Division and Modulus


Find the quotient and remainder of a division problem by pressing [ALPHA] [ []/[] ] (÷R).   We can use this calculate the modulo of two positive numbers (use caution with negative numbers).


Example 1:  364 mod 20 = 4

364÷R20 returns 18, R = 4

(18 * 20 + 4 = 364)


Example 2:  178.5 mod 18.5 = 12 

178.5÷R18.5 returns 9,R=12

(9 * 18.5 + 12 = 178.5)


Tip 2:  Solving Quadratic Equations Also Calculates the Extrema Point


Solving quadratic equations in EQN mode will present the point of the parabola's extrema point (minimum or maximum).  Keep on pressing [ ↓ ] or [ = ].


[ Mode ],  5:  EQN,  3:  aX^2+bX+c=0


Example 1:  4 * x^2 + 13 * x + 5 = 0

[ 4, 13, 5]

X1 = (-13+√89)/8   (MthIO mode)

X2 = (-13-√89)/8

X-Value Minimum = -13/8

Y-Value Minimum = -89/16


Example 2:  -2 * x^2 + 5 * x + 10 = 0

[-2, 5, 10]

X1 = (5+√105)/4

X2 = (5-√105)/4

X-Value Maximum = 5/4

Y-Value Maximum = 105/8


Please note that results and coefficients are not stored in variables.  This goes for all the equations in EQN mode, including finding roots of a polynomial and solving simultaneous equations.  


Tip 3:  Solving Quadratic Inequalities


The Inequality mode solves inequalities for quadratic and cubic equations.  


[ MODE ], [ ↓ ], 1: INEQ,  1 for quadratic equation/2 for cubic equation, select inequality:


1:  >0

2:  <0

3:  ≥0

4:  ≤0


Example:  Solve x^3 + 2 * x - 3 > 0

[1, 0, 2, -3], option 2

Result:  1<X


Tip 4:  The Percent Function


The percent function ( [ SHIFT ] [ ( ] (%) ) just divides the argument by 100.  This can lead to puzzling results when working addition and subtraction problems involving percent.


8 + 10% returns 8.1   (10% converts it to 0.1)

8 - 10% returns 7.9


To add and subtract percents properly, do this instead:


8(1 + 10%) returns 8.8

8(1 - 10%) returns 7.2


Tip 5:  Limited Powers in Complex Mode


In complex mode (CMPLX), the only powers available to be calculated are x^2 and x^3.   To take any complex number to any real power will require the use of De Moivre's formula:


(x + yi)^n = r^n * cos θ + i * r^n * sin θ


My suggestion to use COMP mode, with the Rec and Pol conversions.  In CMPLX mode, rectangular/polar conversions do not store results.  In COMP mode, rectangular/polar conversions store results in the following variables:


X:  x, r

Y:  y, θ


Tip 6:  Solve Equations for Any Variable


We can use the general solver in COMP mode to solve for any variable.  The syntax is:


equation, variable;  press [ SHIFT ], [ CALC ] (SOLVE)


If variable is omitted, the variable to be solved for assumed to be X.


If the equation does not contain an equals sign (=), the solver finds the root for equation, assuming equation=0.


The entries and results are stored in variables. 


In Radians mode:

Example 1: y = x * sin x  with y =0.5

We are solving for x, so we can eliminate the variable argument.


Y=X*sin(X), [ SHIFT ], [ CALC ]

Enter 0.5 for Y

Enter a guess for X, I chose 1.

Result:  X = 0.7408409551, L-R = 0


Example:  2 * a - b = 3 * c, solve for b when a = 2 and c = -1.

2A-B=3C, B, [ SHIFT ], [ CALC ]

Enter 2 for A

Enter -1 for C

Enter a guess for B, I chose 1 (again).

Result:  B = 7, L-R = 0


Caution:  Some equations can not be solved on the fx-115 ES Plus.  In particular, involving integrals and derivatives.  


Tip 7:  The Repeating Decimal Bar


I think this may be only calculator (yet), that allows the use to easily type in a bar to represent repeating decimals.  


Example:

1.45454545454545454545....   can be typed with 1.45 with the bar over the 45, or 1, [ . ], [ ALPHA ], [ √ ] ( bar ) 45


Pressing [ = ] returns 16/11 (assuming MthIO is set).  Repeated uses of [ S←→D ] gives 1.(45), 1.454545455, 16/11.


Tip 8:  Integer Part and Greatest Integer Function (Floor)


Int ( [ ALPHA ] [ + ] ):  Returns the integer part of a number


Intg ( [ALPHA] [ - ] ):  Returns the floor function of a number, the largest integer that does not exceed the given number.  


Example 1:

Int(-12.96) returns -12

Intg(-12.96) returns -13


To find the (calculator) fractional part of a number, enter n - Int(n).  


Tip 9:  Use CALC to Formula Evaluation


In addition to the Table mode, using [ CALC ] in COMP mode allows the user to evaluate a formula using different expressions.   As long as you keep pressing [ = ], the prompting for variables and calculations repeat.  The latest values are updated in the memory registers.


Expressions may take the form of:


variable = expression


To results are stored in the designated variable.


Example:   Evaluate for y when x = 0.2, x = 0.7, and x = 1.2 when y = x^3 + 15 * log x

Y=X^3+15*log(X)   

[ CALC ]

Enter 0.2 for X, [ = ]

Result #1: -10.49255007, [ = ]

Enter 0.7 for X, [ = ]

Result #2: -2.6665294, [ = ]

Enter 1.2 for X, [ = ]

Result #3:  -0.5402813093 


Press [ AC ] to exit.


Tip 10:  Previous Answers are Stored Two-Deep in COMP Mode


In COMP mode, we have both Ans and PreAns ([ALPHA], [ Ans ]).  PreAns recalls the answer from two calculations ago.  


Be careful, switching modes with most likely clear the PreAns register (zero).  Also, PreAns is only available in COMP mode.


Bonus:  Checking the fx-115ES Plus 2nd Edition's ID  (2nd Edition only)


You can see the calculator's ID along with a bar code which allows to test whether the calculator is a genuine Casio calculator.  


I hope you find these tips helpful,


Eddie


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

Sunday, August 9, 2020

HP 12C: Last X: Sums and Products

HP 12C:   Last X:   Sums and Products

Introduction

It is possible to use the LST X feature on the HP 12C calculators assist us in quickly calculate sums or products  of a terms, especially when the list of terms are in a series. 

For today's blog, we are starting with a base amount, a, and then adding 1 to each term.   You can use a similar algorithm for a sequence where each term is doubled, tripled, 1 is subtracted from the previous term, and so on.  The key is to complete the adjustment, use storage arithmetic, and then use LST X.

Accessing LST X:

HP 12C (Classic):  [ g ] [ ENTER ]

HP 12C Platinum:  [ g ] [ + ]

These algorithms can be used in program. 


Sum:  a + (a+1) + (a+2)  + (a+3) + ....

Let n represent the storage register to be used.  On the HP 12C, only storage registers R0 through R4 (classic HP 12C).

Algorithm:


STO n

Loop:  
LST X 
1     [ or 2, x  to double each term,  1, - to subtract 1, etc.]
+  
STO+ n    [stores what is in the X display to the Last X register]

Finish:  
RCL n


Example:  7 + 8 + 9 +10 = 34.   Use register 0 to store the sum.

7
STO 0

LST X
1
+
STO+ 0

LST X
1
+
STO+ 0

LST X
1
+
STO+ 0

RCL 0


Sum:  1/a + 1/(a+1) + 1/(a+2) + 1/(a+3) + ....

Algorithm:


1/x
STO n

Loop:  
LST X 
1     
+  
1/x
STO+ n    

Finish:  
RCL n

Example:  1/7 + 1/8 + 1/9 + 1/10 ≈ 0.47897

7
1/x
STO 0

LST X
1
+
1/x
STO+ 0

LST X
1
+
1/x
STO+ 0

LST X
1
+
1/x
STO+ 0

RCL 0

Sum:  √a + √(a+1) + √(a+2) + √(a+3) + ...

Algorithm:



STO n

Loop:  
LST X 
1     
+  

STO+ n    

Finish:  
RCL n

Try the algorithm on this example:  √7 + √8 + √9 + √10 ≈ 11.63646

Sum:  a^2 + (a+1)^2 + (a+2)^2 + (a+3)^2 + ...

Hint:  Use ENTER, x instead of 2, y^x

Algorithm:


ENTER 
*
STO n

Loop:  
LST X 
1     
+  
ENTER
*
STO+ n    

Finish:  
RCL n

Try the algorithm on this example:  7^2 + 8^2 + 9^2 + 10^2 = 294

Let's move on to products.

Product:  a * (a+1) * (a+2) * (a+3) * ....


STO n

Loop:  
LST X 
1     
+  
STOx n    

Finish:  
RCL n


Example:  7 * 8 * 9 * 10 = 5040.   Use register 0 to store the product.

7
STO 0

LST X
1
+
STOx 0

LST X
1
+
STOx 0

LST X
1
+
STOx 0

RCL 0

Product:  1/a * 1/(a+1) * 1/(a+2) * 1/(a+3) * ....


1/x
STO n

Loop:  
LST X 
1     
+  
1/x
STOx n    

Finish:  
RCL n


Try the algorithm on this example 1/7 * 1/8 * 1/9 * 1/10 ≈ 0.0020

Product:  √a * √(a+1) * √(a+2) * √(a+3) * .......



STO n

Loop:  
LST X 
1     
+  

STOx n    

Finish:  
RCL n


Try the algorithm on this example √7 * √8 * √9 * √10 ≈ 70.99296

Hopefully this will help your calculations on your RPN calculators faster and more effective,

Eddie

All original content copyright, © 2011-2020.  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, November 26, 2017

Rounding to the Nearest Reciprocal (HP Prime, TI-84 Plus CE, Casio fx-CG 50)

Rounding to the Nearest Reciprocal   (HP Prime, TI-84 Plus CE, Casio fx-CG 50)

Introduction

The program ROUNDRCP rounds a number to the nearest 1/n. This function can come in handy in several applications, for example, when working with construction or measuring, when have to round results to the nearest eighth (1/8), inch (1/12) or sixteenth (1/16).

Presented here are versions for the HP Prime, TI-84 Plus CE, and Casio fx-CG 50.

HP Prime:  ROUNDRCP

EXPORT ROUNDRCP(a,n)
BEGIN
// Round a to the nearest 1/n
// 2017-11-21 EWS
LOCAL w;
w:=FP(ABS(a))*n;
w:=ROUND(w,0);
RETURN IP(a)+SIGN(a)*(w/n);
END;


The TI-84 Plus CE and Casio fx-CG 50 versions store the answer in X.

TI-84 Plus CE ROUNDRCP

"EWS 2017-11-21"
Input "NUMBER:",A
Input "TO 1/NTH:",N
fPart(abs(A))*N→W
round(W,0)→W
If A<0
Then
iPart(A)-(W/N)→X
Else
iPart(A)+(W/N)→X
End
Disp "X:",X


Casio fx-CG 50 ROUNDRCP

“NUMBER”?→A
“TO 1÷NTH”?→N
Frac ((Abs A))*N→N
RndFix(W,0)→W
If A<0
Then
Int (A)-(W÷N)→X
Else
Int(A)+(W÷N)→X
IfEnd
“X:”
X

Examples

Round π to the nearest 1/4:
ROUNDRCP(π, 4):  3.25 = 13/4

Round e^2 to the nearest 1/100:
ROUNDRCP(e^2, 100): 7.39 = 739/100

Round 1/4 + 2/7 + 3 1/3 to the nearest 1/16:
ROUNDRCP(1/4 + 2/7 + 3 + 1/3, 16):  3.875 = 31/8
(thank you to Joe Horn for pointing out my error, it's correct now.)

Tips 

If you do not have the sign (signum) function, you can compensate by the following code:

If X<0
Then
Return -1  (subtract operation)
Else
Return 1 (addition operation)
End

If your calculator does not have the Round to any number of decimal points function, such as the Casio fx-5800p or fx-3650p, you can manipulate the modes and use the Rnd function and a switch of modes, like this code:

Fix 0
X  (put number to round in display)
Rnd
Float/Norm (1/2)

Eddie


This blog is property of Edward Shore, 2017

Monday, January 2, 2012

Setting up Equations for Integration/Solve - HP 15C

Setting up equations for the integration and solve functions for the HP 15C. Since the release of the HP 15C Limited Edition, the processing speed has increased.

The most important thing to remember is that the equation starts with "x" on the x-register of the stack.

With integration, "x" is the variable to be integrated.

With the solve function, "x" is the variable to be solved for.

Depending on the equation, in general, you will need to duplicate "x" with [ENTER] as many times as "x" appears in the equation. Algebraic manipulation of the equation can be helpful. A technique known as Horner's Method can be used for polynomials. It also helps to handle the innermost expressions first, working outside.

I often straw a stack diagram:

ST X, ST Y, ST Z, ST T

Several things to remember:

Most two-argument functions (arithmetic, power, combination, permutation, etc):

ST T retains what was in ST T
ST Z copies the contents of ST T
ST Y the contents of ST Z moves here
ST X result of the function

Pressing ENTER, recalling from a memory register, or entering π

ST T the contents of ST Z moves here
ST Z the contents of ST Y moves here
ST Y the contents of ST X moves here
ST X the number just entered or recalled


Horner's Method

Let the polynomial p(x) = a_n * x^n + a_n-1 * x^(n-1) + ... + a1 * x + a0

Applying Horner's Method to p(x):

( ... (a_n * x + a_n-1) * x + a_n-2) * x + a_n-3) ... + a1 ) * x + a0

Functions

Integration: [ f ] [ x ] label

Solve: [ f ] [ ÷ ] label


This blog provides examples of integration, but ideas can be taken from the examples for use in solving equations.


Examples are in the format of:

b
∫ f(x) dx
a

All results shown here are rounded to 4 decimal places (FIX 4).

Example 1:

5
∫ x^2 * cos x dx
1




KEY ST X ST Y ST Z ST T
LBL 1 x - - -
ENTER x x - -
COS cos(x) x - -
x<>y x cos(x) - -
x^2 x^2 cos(x) - -
× f(x) - - -


Result: -19.4578


Example 2:

π
∫ x sin((π * x)/4) dx
0



KEY ST X ST Y ST Z ST T
LBL 2 x - - -
ENTER x x - -
π π x x -
× π*x x - -
4 4 π*x x -
÷ (π*x)/4 x - -
SIN sin(π*x/4) x - -
× f(x) - - -
RTN


Result: 4.1369


Example 3

3.5
∫ x / (x^2 + 3x - 4 ) dx =
3

3.5
∫ x / ((x + 3) *x - 4) dx
3



KEY ST X ST Y ST Z ST T
LBL 5 x - - -
ENTER x x - -
ENTER x x x -
3 3 x x x
+ x+3 x x x
× x(x+3) x x x
4 4 x(x+3) x x
- x(x+3)-4 x x x
1/x 1/... x x x
× f(x) x x x
RTN


Result: 0.0998


Example 4:

3
∫ √(x^3 - 2x + 1)/x dx
1



Let ø = √(x^3 -2x+1)


KEY ST X ST Y ST Z ST T
LBL 3 x - - -
ENTER x x - -
ENTER x x x -
3 3 x x x
y^x x^3 x x x
x<>y x x^3 x x
2 2 x x^3 x
× 2x x^3 x x
- x^3-2x x x x
1 1 x^3-2x x x
+ x^3-2x+1 x x x
√ ø x x x
x<>y x ø x x
÷ f(x) x x x
RTN


Result: 2.0912

Here are a few more examples of integrals. Try and draw the stack diagram for each step.

Example 5:

8.5
∫ x * √(x^2 - 3*x - 4) dx =
4.5

8.5
∫ x * √((x - 3) * x - 4) dx
4.5



LBL 6
ENTER
ENTER
3
-
×
4
-

×
RTN


Result: 117.2455

Example 6:
π/4
∫ x * (( sin(x-2) )/(cos x)) dx
0



LBL 7
ENTER
ENTER
2
-
SIN
x<>y
COS
÷
×
RTN


Result: -0.3578


I hope you find this blog helpful. Until next time, Eddie



This blog is property of Edward Shore. © 2012

Python – Earth’s Radius and Gravity in US Units

Python – Earth’s Radius and Gravity in US Units Introduction The following script, gravus2.py, estimates the Earth’s gravity i...