Sunday, May 1, 2016

HP Prime: The Basics of Graphing (Function App)

HP Prime: The Basics of Graphing (Function App)


Over the last few days, I have seen requests for a tutorial of how to graph functions.  I myself received a request to do one.  

This tutorial assumes that are using the most updated version of the HP Prime.   Be aware there has not been an update on the iOS version yet (last version is 9069 as of 5/1/2016). 

7/27/2016 Update:   Sadly, version 10077 has been pulled due to issues and HP decided to take it off out of caution.  The latest firmware is back to 8151.  :(  Affected areas will be deleted.  Apologizes for any inconvenience.  (yes, this sucks)


We are going to work with the Function App.  Let’s get started.

The Three Main App Keys




[Symb]:  The Symb screen is where you enter up to ten functions, which are defined F1 to F9, then F0. 

[Shift] [Symb]:  You can change the angle measure, number format, and complex number format to be specific to the Function App.  I usually just leave all three set at System (to borrow from System settings from Home Settings)

[Plot]:  The Plot screen is the graph screen.  You may drag the screen to view different parts of the graph. 

[Shift] [Plot]:  This is where you set up the plot screen, where you set the screen’s horizontal boundaries (X Rng), the screen’s vertical boundaries (Y Rng), the tick marks (X Tick, Y Tick).  Scrolling down to page 2, you can turn on or off Axes, Labels, grid dots, and grid lines.  You have other options such as cursor and method options.  With the 10077 firmware, you can set the background if desired. 

For this tutorial, I will have the background turned off.

[Num]:   This will display a numerical table.  (X, F1, F2,…). 

[Shift] [Num]:  Set table options


Plotting Functions


Entering Functions on the Symb Screen


(Defining the function F(1)=X^2+3*X-1 and plotting it)


1.  Press the [Symb] screen.  

Note:  If you want to clear all the functions that are defined, press [Shift] [Esc] (Clear) and press the soft key (OK) to the “Clear all expressions?” prompt.

2.  Enter your function.  The independent variable is the capital X.  Press [Enter] or the soft key (OK) when you are done.
3.  To plot the function, press the [Plot] key. 

Note: You can change a function’s color.  To do so, select the color box to the left of the function and press either [Enter] or the (Choose) soft key.  You can then choose from any of the eight pre-selected colors or a custom color (lower-right square on the color palette). 



Setting Easy Graphing Plot Setups

On the Plot screen, you can select pre-programmed plot setups:  Autoscale (my favorite), Decimal, Integer, or Trig. 

For the screen shots below, cleared the functions then defined F1(X) = SIN(X) + COS(X) and set the calculator to Radian mode. 



 You can see the difference below (based on the example, results may vary depending on the functions defined):



Steps:

1.  Press the [View] key. 
2.  Select the desired zoom setup (options 3 – 6).

Using the Plot Setup Screen

You can also use the plot up screen to set up the boundaries.   To do this:

1.  Press [Shift] [Plot]. 
2.  To set the Horizontal edges, select the X Rng row.   The left box is the Xmin (x-minimum, left side) and the right box is Xmax (x-maximum, right side).
3.  To set the Vertical edges, select the Y Rng row.   The left box is the Ymin (y-minimum, bottom side) and the right box is Ymax (y-maximum, top side).
4.  If desired, you can set the tick marks of the grid.  To do this, change the X Tick and Y Tick. 
5.  If desired, you can press the page down soft key to turn axes, grid dotes, grid lines, and labels on or off.  Turning labels on will show the range values on the plot screen.
6.  To see the changes, press the [Plot] key. 

Note:  If you want to reset the graph screen to default settings, press [Shift] [Esc] (Clear).   The default settings are:  Xmin = -15.9, Xmax = 15.9, Ymin = -10.9, Ymax = 10.9, X Tick = 1, and    Y Tick = 1.


Setting the plot window as the following:  Xmin = 0, Xmax = 2*π ≈ 6.28318530718, Ymin = -2, Ymax = 2.


Tracing the Function

When you first graph functions, tracing is turned on automatically.  That is when you press the directional pad left and right, you follow the function.  If there are two or more functions plotted, you can press up or down to select which function you want to trace.

You can also turn off tracing to allow the cursor to roam freely, press the soft key (Menu) to call the menu.  Press the (Trace ) soft key to toggle the trace settings.   Note when the menu isn’t showing, you are seeing the coordinates of the cursor. 

*(Trace*):  Trace with the dot showing, trace is turned on.  The cursor follows functions.  The cursor shows the X and function values.

*(Trace ):   Trace without the dot showing, trace is turned off.  The cursor is in free roaming mode.  The cursor shows the X and Y values.



Center the Plot Screen to Where the Cursor is Located



1.  Move the cursor to wherever want to center the plot screen.  
2.  Press the (Menu) soft key to bring up the menu.   Press the (Zoom) soft key.
3.  Select Center on Cursor.  That is all there is to it.

Zoom Using a Box


Zoom using a box (F1(X) = 2*COS(X) – 1)

Steps:

1.  Plot the function (use the [Plot] key)
2.  Press the (Menu) soft key to bring up the menu.  Press the (Zoom) soft key.
3.  Select Box…   You will be prompted to select on corner of the box.  Press (OK) or [Enter].
4.  Then select the opposite corner.  You will see the area of zoom by a shaded box.  Once you are satisfied, press (OK) or [Enter].
5.  The plot screen is adjusted to the box you selected.

Move the Cursor to a Specific Position



You can send the cursor to a specific position.  This is a useful function if you need to go to a specific place.  All you have to do is press the (Go To) soft key.  You will be prompted for an X coordinate.

If Trace is turned on, the cursor moves to the X coordinate and the function value.  If Trace is turned off, you will be prompted for both the X and Y coordinates.


For information regarding Definition and Transformation, please see my post on the HP Prime 10077:  http://edspi31415.blogspot.com/2016/04/hp-prime-firmware-update-firmware-10077.html


Let’s explore some basic functions that you can operate on the Function app.


The Root of a Function

To find the root (zero of a function):



1.  On the Plot screen, have Trace turned on (see above).  Select your function.
2.  Press the (Fcn) soft menu and select Root. 
3.  The HP Prime finds the root that is closest to the cursor automatically. 


Integrals

To find the area under the curve (numerical integral):

1.  On the Plot screen, have Trace turned on and select your function.
2.  Press the (Fcn) soft menu and select Signed Area.
3.  Enter the lower limit.  You can use the directional pad or enter a specific X value.
4.  Enter the upper limit.  You can use the directional pad or enter a specific Y value.  Any area above the x-axis is shaded in green and area shaded below the y-axis is shaded in red.
5.  Press (OK) or [Enter].  The area is calculated. 

Derivative

1.  On the Plot screen, have Trace turned on (see above).  Select your function.
2.  Press the (Fcn) soft menu and select Slope. 
3.  The HP Prime displays the slope (derivative) automatically.  You can trace the function to display the slope at other points. 

Intersection of Two Functions (or a Function and an Axis)



1.  On the Plot screen, have Trace turned on (see above).  Select your (first) function, and place the cursor close to the intersection as possible.
2.  Press the (Fcn) soft key and select Intersection. You will be prompted to select the second function or an axis.
3.  The intersection should be displayed. 

Note:  Make sure that the cursor is close to the intersection you want.  Otherwise, the function may not return an answer.


This covers some of the basics of the Function App.  There is a lot more to explore of this app.  

Eddie


This blog is property of Edward Shore, 2016.





Spotlight: Akron Brass FireCalc Pocket Computer

Spotlight: Akron Brass FireCalc Pocket Computer Welcome to a special Monday Edition of Eddie’s Math and Calculator blog. Thi...