Sunday, November 29, 2015

HP Prime: Approximate Length of Daylight

I hope you had a great weekend and a great Thanksgiving.  For those of you in the United States, hopefully Friday was peaceful and not crazy.

HP Prime: Approximating the Length of Daylight in Hours

This time, we are taking a slightly more complex formula.   The inputs are:

lat = Earth's latitude of the observer.  (from -90° (South) to 90° (North))

day = the number of days since the December solstice (around December 21-22).  Note that is different from many approximate formulas which used the vernal equinox as a starting point.  

The formula used is a simplification of the Final Formula presented by Herbert Glarner (http://www.gandraxa.com/).  For the complete article and the derivation, please click on link:

http://www.gandraxa.com/length_of_day.xml    (Retrieved November 23, 2015)

The algorithm used in the DAYLIGHT is:

With the inputs lat and day:

m = 1 – tan(lat°) * tan(23.439° * cos(480/487 * day))

If m > 2, let m = 2.   If m < 0, let m = 0.

Then:

b = acos(1 – m)/180 *24

Where b is the length of daylight in hours.

I adjusted the formula to allow for all inputs to be in degrees.  Glamer had mixed inputs for the trigonometric functions.

Here is the program:

Program DAYLIGHT:

EXPORT DAYLIGHT(lat,day)
BEGIN
// latitude, days from
// December solstice
LOCAL m,b,a:=HAngle;
HAngle:=1; // Degrees
m:=1-TAN(lat)*TAN(23.439*COS(
480/487*day));
IF m<0 THEN
m:=0;
END;
IF m>2 THEN
m:=2;
END;
b:=ACOS(1-m)/180*24; // hours
RETURN b;
HAngle:=a;
// www.grandraxa.com
END;

Examples:

Let’s assume a 365 day and the December solstice was December 22. 

Latitude:  -60°, March 1  (day = 69)
Result:  Approx. 16.67808 hours

Latitude: 54°,  July 24  (day = 214)
Result:  Approx. 16.03426 hours

For another approximate formula, I wrote on one for the HP 35S here:  http://edspi31415.blogspot.com/2013/05/hp-35s-approximate-length-of-sunlight.html


Have a great day, 

Eddie


This blog is property of Edward Shore.  2015





Wednesday, November 18, 2015

Quick Tips for the Casio fx-115ES Plus and fx-991EX Classwiz


Quick Tips for the Casio fx-115ES Plus and fx-991EX Classwiz



This applies to other similar and earlier Casio calculators.   Please consult your manual if you have a different model.   This refers to Casio models that have textbook entry and output, such as the fx-115ES (Plus), fx-991ES (Plus), fx-991EX Classwiz, and fx-570EX Classwiz.

Always Get an Approximate Answer

In the Math input mode, the Casio attempts to return an exact answer (fractions, terms of π, terms of square roots).  If you want to get an approximate answer from the get go, all that is needed is to press [SHIFT], [ = ] (≈).

Using a Formula

Steps:


1.   Enter your formula.
2.  Press [CALC].
3.  Enter a value for each variable prompted, then press [ = ].
4.  For the Classwiz models:  You can scroll up and down between variables.

Example:


(A^2 + B^2)^(1/3)

A = 3, B = 4, result 2.924017738
A = 5, B = 10, result 5

Solve f(X) = 0



Steps:



1.  Enter f(X).  On the Classwiz series, you can use the [ x ] button.  There is no need to enter the “=0”.

2.  Press [SHIFT], [ CALC ] (SOLVE)

3.  Enter a guess and press [ = ].



Example:



(Radians Mode)

X sin(X) – 1 with guess X = π, result:  X = 2.772604708



Tip:  I prefer to use X, but you should be able to use any of the other variables available (A, B, C, D, E*, F*, Y, M).  *E and F are available on later models.



Solve f(X) = g(X)



Steps:



1.  Enter f(X).  On the Classwiz series, you can use the [ x ] button. 

2.  Press [ALPHA], [CALC] ( = ) for the equals symbol.  This is very important.   Then enter g(X).

3.  Press [SHIFT], [ CALC ] (SOLVE)

4.  Enter a guess and press [ = ] (the equals key).



Example:

ln(X) = X^2 – 2 with guess X = 1, result X = 1.564462259



Unit Conversion



1.  Enter a number that is needed to be converted. 



2.  Depending on what version for Casio you have:



For the fx-991EX Classwiz (I think this applies to the fx-570EX Classwiz as well):  Press [SHIFT] [ 8 ] (CONV).  Select a category and select a conversion.



For the fx-115ES PLUS and earlier models (non-Classwiz models):  Press [SHIFT] [ 8 ] (CONV) and enter a code.  For the fx-115ES PLUS, the conversions are listed both in the manual and the hard slide on case. 



Here is a sample of the conversions offered on the fx-115ES PLUS:



01
in → cm
19
km/h → m/s
35
lbf/in^2 → kPa
02
cm → in
20
m/s → km/h
36
kPa → lb/in^2
07
mi → km
21
oz → g
37
°F → °C
08
km → mi
22
g → oz
38
°C → °F
23
lb → kg
24
kg → lb





3.  Press [ = ].



Please be aware the older models may not have the conversion function.



Factoring an Integer



‘1.  Enter an integer then press [ = ].

‘2.  Press [SHIFT], [ ° ‘ ‘’ ] (FACT)



Examples:



188 = 2^2 * 47

2506 = 2 * 7 * 179



Please be aware the older models may not have the factoring function.



Calculus



Remember for derivative (d/dx), integral ( ∫ ), sum ( Σ ), and product ( Π )*, the variable used is X.  *Product may not be available on all models. 



Inverse and Determinant of a Matrix



For these calculators, matrices are a separate mode.  I assume that you know how to edit and define matrices.



Casio fx-115 ES Plus and Non-Classwiz Modes that have a Matrix mode:



Matrices are mode 6 (at least for the fx-115EX Plus.)



Inverse:



[SHIFT] [ 4 ] (MATRIX), choose 3, 4, or 5 for Matrix A, B, or C respectively, [ x^-1 ], [ = ].



Determinant:



[SHIFT] [ 4 ] (MATRIX), 7 for det, [SHIFT] [ 4 ] (MATRIX), choose 3, 4, or 5 for Matrix A, B, or C respectively, [ = ].



Casio fx-991EX Classwiz and other Classwiz models:



Matrices are mode 4 (matrix icon).



Inverse:



[OPTN], choose 3, 4, 5, or 6 for Matrix A, B, C, or D respectively, [ x^-1 ], [ = ]



Determinant:



[OPTN], [ down ], 2 for det, [OPTN], choose 3, 4, 5, or 6 for Matrix A, B, C, or D respectively, [ = ].





Hope you find these tips helpful.  Have a great day!



Eddie







This blog is property of Edward Shore.  2015. 

Sunday, November 15, 2015

The Series ( ((((0 + 1)^-1 + 1)^-1 + 1)^-1 + 1)^-1 + 1)^-1 + … + 1)^-1 and Fibonacci Numbers

The Series ( ((((0 + 1)^-1 + 1)^-1 + 1)^-1 + 1)^-1 + 1)^-1 + … + 1)^-1 and Fibonacci Numbers
  


Add One Then Reciprocate

Define the series t as:

t = ( ((((0 + 1)^-1 + 1)^-1 + 1)^-1 + 1)^-1 + 1)^-1 + … + 1)^-1    (an infinite amount of terms)

This is a sum that can’t be easily stated in summation statement (Σ f(x)). 

On the HP Prime, I programmed this as:

EXPORT TEST1112(n)
BEGIN
LOCAL k, t:=0;
FOR k FROM 1 TO n DO
t:=(t+1)^-1;
END;
RETURN t;
END;

The result seems to converge at 0.6180339785 when n ≥ 27.  Note that 0.6180339785 = ϕ – 1, where ϕ is the Golden Ratio ( ϕ = (√5 + 1)/2)






Fibonacci Gets Involved

Note that:

k =
t =
1
1
2
(1 + 1)^-1 = 1/2
3
(1 + 1/2)^-1 = (3/2)^-1 = 2/3
4
(1 + 2/3)^-1 = (5/3)^-1 = 3/5
5
(1 + 3/5)^-1 = (8/5)^-1 = 5/8
6
(1 + 5/8)^-1 = (13/8)^-1 = 8/13
7
(1 + 8/13)^-1 = (21/13)^-1 = 13/21

We get a sequence of terms {1, 1/2, 2/3, 3/5, 5/8, 8/13, 13/21, 21/34, 34/55, 55/89, 89/144, …} where each term takes the fraction a/b, a is the kth Fibonacci number and b is the (k+1)th Fibonacci number.  Can we show that this sequence of partial sums is convergent?

Each partial sums of the series takes the form F_k / F_k+1 where F is the Fibonacci number.

The closed formula for the Fibonacci number is:

F_k = ( ϕ^k – α^k )/√5 , where ϕ  = (1 + √5)/2 and α = (1 - √5)/2.

Then:

F_k / F_k+1
=( ϕ^k – α^k )/√5 * √5/( ϕ^k+1 – α^k+1)
=( ϕ^k – α^k) / ( ϕ^k+1 – α^k+1 )
= ( ϕ^k / ϕ^k+1) * ( (1 – (α/ϕ)^k) / (1 – (α/ϕ)^k+1) )
= 1/ϕ * ( (1 – (α/ϕ)^k) / (1 – (α/ϕ)^k+1) )

Note that α/ϕ = (1 - √5)/(1 + √5 ) ≈ -0.38197 < 1

As k → ∞,  α/ϕ → 0. 

Hence,

lim k → ∞ (F_k / F_k+1)
= lim k → ∞ (1/ϕ * ( (1 – (α/ϕ)^k) / (1 – (α/ϕ)^k+1) ) )
= 1/ϕ

Simplifying:

1/ϕ
= 2/(1 + √5)
= 2*(1 - √5) / ((1 + √5)*(1 - √5))
= 2*(1 - √5)/-4
= (√5 – 1)/2
= √5/2 – 1/2

Adding and subtracting 1/2:

√5/2 – 1/2 + (1/2 – 1/2)
= (√5 + 1)/2 – 1
= ϕ – 1

Since the sequence of partial sums converge to ϕ – 1, the series

t = ( ((((0 + 1)^-1 + 1)^-1 + 1)^-1 + 1)^-1 + 1)^-1 + … + 1)^-1   

converges to ϕ – 1.



This blog is property of Edward Shore.  2015.



Monday, November 9, 2015

HP Prime Geometry App Tutorial Part 8: Rotating Triangles

HP Prime Geometry App Tutorial Part 8:  Rotating Triangles

Today’s lesson will show how to rotate a triangle given an angle.  The angle is in a counter-clockwise direction. 

For the purpose of this lesson, we will set the HP Prime in Degrees mode.

Draw the Triangle

1.  Set the calculator to Degrees mode.  Draw a triangle with vertices (4,4), (4, -4), and (8, 0). 

Rotate the Triangle

2.  Press (Cmds), 7 for Transformation, 3 for Rotation. 
3.  Select the reference point.  In our example, let’s make this point (0,0) and press [ Enter ].
4.  You are asked for an angle.  Enter 90 for 90°.  Press [ Enter ].



More Rotation

5.  Repeat steps 2 through 4, for angles of 180 and 270.



Thank you.  Until next time, have a great day!

Eddie

This blog is property of Edward Shore.  2015.




HP Prime Geometry App Tutorial Part 7: Conic Sections and Equations

HP Prime Geometry App Tutorial Part 7: Conic Sections and Equations

In today’s lesson we will work conic sections and showing the equations for each of the conic sections.

Drawing an Ellipse and Display its Equation

Command:  ellipse(focus point 1, focus point 2, point on the ellipse)

Draw an ellipse with foci (1,4) and (5,4) and the point on the ellipse on (5,6).

1.  Press (Cmds), 5 for Curve, 5 for Ellipse. 
2.  Go to the point (1,4) and press [ Enter ].
3.  Go to the point (5,4) and press [ Enter ].
4.  Go to the point (5,6) and press [ Enter ].

The next step is to display its equation. 

5.  Press (Cmds), 8 for Cartesian, 5 for Equation of.
6.  Select the ellipse and press [ Enter ].  In this example the equation is named GD.
7.  To see the whole equation, press [ CAS ] and execute the equation(GD) command.
8.  Press the up button to highlight the equation and press (Show).  Scroll to see the entire equation.




Drawing a Hyperbola and Display its Equation

Command:  hyperbola(focus point 1, focus point 2, point on the hyperbola)

Drawn a hyperbola with foci (-2, -2) and (-4, 2) with point (-9, 2).

1.  Press (Cmds), 5 for Curve, 6 for Hyperbola. 
2.  Go to the point (-2,-2) and press [ Enter ].
3.  Go to the point (-4,-2) and press [ Enter ].
4.  Go to the point (-9,2) and press [ Enter ].

The next step is to display its equation. 

5.  Press (Cmds), 8 for Cartesian, 5 for Equation of.
6.  Select the ellipse and press [ Enter ].  In this example the equation is named GD.
7.  To see the whole equation, press [ CAS ] and execute the equation(GD) command.
8.  Press the up button to highlight the equation and press (Show).  Scroll to see the entire equation.



Drawing a Parabola and Display its Equation

Command:  parabola(focus point, directrix line)

Draw a parabola with focus point (0,-5) and (0,3) is on the directrix line.

1.  Press (Cmds), 5 for Curve, 7 for Parabola. 
2.  Go to the point (0,-5) and press [ Enter ].
3.  Go to the point (0,3) and press [ Enter ].

The next step is to display its equation. 

4.  Press (Cmds), 8 for Cartesian, 5 for Equation of.
5.  Select the ellipse and press [ Enter ].  In this example the equation is named GC.
6.  To see the whole equation, press [ CAS ] and execute the equation(GC) command.
7.  Press the up button to highlight the equation and press (Show).  Scroll to see the entire equation.



On the next part, we will work with rotating geometric objects.   Thank you and see you next time,

Eddie




This blog is property of Edward Shore – 2015.  

HP Prime Geometry App Tutorial Part 6: Polygons

HP Prime Geometry App Tutorial Part 6:  Polygons

Drawing a Regular Polygon

1.  Clear the Plot screen.  Press (Cmds), 4 for Polygon, 9 for Regular Polygon. 
2.  Select one corner and press [ Enter ].
3.  Select another corner point and press [ Enter ].
4.  Enter the number of sides of the regular polygon.



Drawing a General Polygon

1.  Press (Cmds), 4 for Polygon, 8 for Polygon.
2.  Start with a corner point and press [ Enter ].  Keep going choosing corner points and pressing [ Enter ]. 
3.  When you finished plotting the final corner point, press [ Enter ] one last time.  This connects the last corner point with the first corner point.   Hence, it is like go to the final point and press [ Enter ] twice.


Finding Areas of the Polygon

To recall, press (Cmds), 9 for Measure, 5 for Area.  Select a polygon (when selected they turned red) and press [ Enter ].




Next time, we will work with conic sections.   Have a great day,

Eddie

This blog is property of Edward Shore – 2015.



Sunday, November 8, 2015

Speed Test: Casio fx-991EX Classwiz vs Canon F-792SGA

Speed Test:  Casio fx-991EX Classwiz vs Canon F-792SGA

https://www.youtube.com/watch?v=39tcSQBakMo


Eddie


This blog is property of Edward Shore.  2015

HP Prime Geometry App Tutorial Part 5: Plotting Functions and Differential Equations

HP Prime Geometry App Tutorial Part 5:  Plotting Functions and Differential Equations

The Geometry App can plot functions, parametric functions, polar functions, sequences, implicit statements, slope-field and ordinary differential equations, lists, and designate sliders.   

In this lesson, we will demonstrate three types of plots.   For the purpose of the tutorial, clear the Plot screen before each example.

Plotting Functions ( y = f(x))

Plot y = e^x + 1.

1.  Press (Cmds), 6 for Plot, 1 for Function. 
2.  Type e^(x) + 1.  Press (OK).

Use the lowercase x.  The format is plotfunc( y(x) ).



Plot an Ordinary Differential Equation  (y’ = dy/dx = f(x,y))

Plot y’ = y*e^x +1 with the initial condition (1,1).

1.  Press (Cmds), 6 for Plot, 7 for ODE.
2.  Type y*e^(x)+1.   Note that x and y are in lowercase.
3.  Press [ , ] and type [x,y].   Here you designate which variable is independent and which is dependent.
4.  Press [ , ] and type  [1,1].  This is your initial conditions.  Press (OK), 

The entire format is plotode( f(x,y),  [x, y], [x0, y0])



Plot a Parametric Equation  ( x(t) + i*y(t) where i = √-1)

Plot x = 3t + 1, y = 2t – 1.   The format to be used is (3t + 1) + i*(2t -1).

‘1. Press (Cmds), 6 for Plot, 2 for Parametric.
‘2. Type (3t + 1) + i*(2t -1) and press ( OK ).

The entire format is plotparam( x(t) + i*y(t), var = tbeg..tend, tstep=step).  The t is in lowercase and the last two arguments, interval and step, are optional.



In Part 6 we’ll be plotting and working with polygons.   Thanks and take care,

Eddie


This blog is property of Edward Shore.  2015. 



HP Prime Geometry App Tutorial Part 4: Tangent Lines and Changing the Color of Objects

HP Prime Geometry App Tutorial Part 4:  Tangent Lines and Changing the Color of Objects

Plotting Lines Tangent to a Circle’s Point

1.  Start with a clear plot screen.   Draw a circle:  the location of its center and size is up to you.
2.  Press (Cmds), 3 for Line, 6 for Tangent. 
3.  Select a point on the circle and press [ Enter ].  The point is designated as object GD. 
4.  If you wish, display the coordinates of GD.  See Part 3 as a refresher.

Per HP Prime’s help:  The tangent command draws one or more tangent lines through a specified point to the circle and the line segment connecting it to the radius. 

Coloring the Tangent Lines

The following steps is how to color tangent lines.  By default, geometric objects are colored black.  Adopt this procedure for any geometric object you want to designate as a specific color.

1.  Move to the tangent lines so that they turn red.   The (Optns) soft menu appears.  It is key that the (Optns) menu is available.
2.  Press (Optns), 1 for Choose Color, choose any color you want.  If the pictures, I have selected blue.  In order to see the different color, move the cursor away from the tangent lines.



What does Part 5 mean?  It’s time to plot some functions!  That is next time.  

Eddie


This blog is property of Edward Shore.  2015

HP Prime Geometry App Tutorial Part 3: Lines and Line Segments

HP Prime Geometry App Tutorial Part 3:  Lines and Line Segments

With Parts 1 and 2, we will start with a clear plot screen, with a Plot window of XRange = [ -16, 16 ], YRange = [ -11, 10.9 ], ticks are at 1.  This lesson will focus on drawing line segments, parallel, and perpendicular lines.


Midpoint on a Line

For this part, put the line segment anywhere you wish.

1.  Press (Cmds), 3 for Line, 1 for Segment.  You are prompted to select on the segment’s end points.  Press [ Enter ] to select the end point.
2. Select the other end of segment and press [ Enter ].  The segment is designated as object GC.
3.  For the Midpoint, press (Cmds), 2 for Point, 3 for Midpoint.  Select the line segment you have just drawn.  Remember, when you cursor over objects that you are about to select, that object turns red.   Press [ Enter ].   The midpoint is plotted, as object GD.  

Note that the coordinates the midpoint are not displayed.  Learn how to display the coordinates in the next segment. 



Display a Point’s Coordinates

There are two ways to display a point’s coordinates.  Try both methods and see which method works better for you.  You can use these methods of displaying the coordinates for any point.

For this exercise, we’ll concentrate on the midpoint (object GD). 

The Num Screen Method

1.  Press the [ Num ] key. 
2.  Select a blank line, press (Cmds), 1 for Cartesian, 4 for Coordinates. 
3.  Type GD and press [ Enter ].
4.  Return the plot screen by pressing [ Plot ].



The Plot Screen Method

1.  Press (Cmds), 8 for Cartesian, 4 for Coordinates.
2.  Select the point of interest, press [ Enter ].

Either way, the coordinates of the point are displayed on top of the screen.

For the next part of the lesson, please clear the plot screen. 


Draw Parallel and Perpendicular Lines

1.  Draw a line.  To recall, press (Cmds), 3 for Line, 3 for Line.  Place the line anywhere you wish, at any angle you wish.  In the pictures that are displayed, I just chose to place a horizontal line for demonstration purposes (boring, huh?)
2.  Parallel Line:   Press (Cmds), 3 for Line, 4 for // (Parallel) .  Select the line you drew and press [ Enter ].  Place the parallel line with a second [ Enter ].   A parallel line is drawn.
3.  Perpendicular Line:  Press (Cmds), 3 for Line, 5 for ⊥  (Perpendicular).  Select either of the lines and press [ Enter ].  Place the perpendicular lines by pressing [ Enter ].



In Part 4 we will work with drawing tangent lines and how to color objects.

This blog entry is coming from me enjoying a pumpkin vanilla latte at The Coffee Bean & Tea Leaf in Monrovia, CA.   Hope you day is wonderful and see you next time!

Eddie


This blog is property of Edward Shore. 2015. 

Friday, November 6, 2015

HP Prime Geometry App Tutorial Part 2: Triangles

HP Prime Geometry App Tutorial Part 2:  Triangles

Like Part 1, we’ll use a Plot window of XRange = [ -16, 16 ], YRange = [ -11, 10.9 ], ticks are at 1.  For this lesson, we are going to focus on triangles.  Start with a clear Plot Screen ([Shift], [ Esc ] (Clear)).

Drawing a Triangle

1.  On the plot screen, press the soft key (Cmds), then select 4 for Polygon and 1 for Triangle. 
2.  Select the first vertex (corner point) and press [ Enter ].  For this lesson, put the triangle wherever you want.
3.  Place the second and third vertex.  Press [ Enter ] after each point.  The vertices are labeled A, B, and C. 



Finding an Angle

The steps will demonstrate how to find the angle.  Be aware that the direction you enter the vertexes will determine the sign of the angle. 

1.  Press (Cmds), 9 for Measure, 6 for Angle.
2.  Select one vertex, press [Enter].  Follow the triangle to select the second vertex (where the angle will be measured), press [ Enter ].  Follow that with a third vertex and press [Enter].  The angle displayed on top of the screen.



Resizing the Triangle

Click on one of the points of the points.  Then drag the point with the arrow pad.  When satisfied, press [ Enter ].



For the last part, clear the screen.

Reflect a Triangle – reflect about a point

1.  Clear the screen.  ([ Shift ] [ Esc ] (Clear))
2.  Draw a triangle with the vertices (-6, -4), (-6, 4), and (-12, 0).
3.  Press (Cmds), 7 for Transform, 2 for Reflection.
4.  You will be promoted for a reflection point.  For this exercise, set the point at (0,0). 
5.  Select the triangle (scroll until the triangle turns red) and press [ Enter ].



In Part 3, we’re going to work with lines and line segments.  Until next time, have a great day!

Eddie


This blog is property of Edward Shore.  2015.




HP Prime: Area by Quadratic Splines

HP Prime:  Area by Quadratic Splines Introduction The program QUADSUM calculates the area under the curve described by the set o...