Finite Math > Functions and Their Graphs - Lines

Presently, Functions and Their Graphs - Lines consist of this page, the Formulas page, the Application page, and Method of Least Squares. Click on Formulas, Applications, Method of Least Squares to go to that page.

Brooks/Cole TI-89 Tools Guide Screen | Installing the HP Programs | Using the HP Programs | Getting Additional Information

Click on play and the full screen option in the Embedded youtube video or click on the direct link to go directly to the youtube site to play the video. The video describes how to add the slope, equation of a line given a point and the slope, and equation of a line given two points to our HP Prime.

After creating the Tironometry > Complex Number video we added the Info > Immediate Mode - CAS Vars page. It list all the immediate mode functions / operations on a single page. We use this page to copy and paste the slope and line functions into our HP Prime.

Our video starts by using an Algebra page to create the simple function, dist. The Algebra page shows us three ways to create CAS Vars. We use the third abbreviated method to create our line functions. The video returns to the Immediate Mode - CAS Vars page. We then use the Immediate Mode - CAS Vars page to create our line functions. We return to this page and show on the HP Prime emulator how to work the examples displayed in the collage at the bottom of this page.

**Embedded You Tube video file or direct link**

HP Prime - Slope and Equation of a Line or direct link

**Brooks/Cole TI-89 Tools Guide Screen**

Here is Brooks/Cole Math Tools Guide TI-89 screen from Chapter 2 Functions and Their Graphs

Figure 1 Chapter 2 Functions and Their Graphs - (Interactive Video Skillbuilder CD-ROM)

Next, we look at using the HP Prime for this page. Since the HP Prime Lite / Free has no program editor or HP connectivity kit, we used CAS Var programs to add lineptm and linept1pt2. You will also need to add slopeln shown below in Alternate - nested approach. An alternate lineptm and linept1pt2 are shown as well. The alternate linept1pt2 requires that lineptm and slopeln are also stored where the first version, shown next, does not need lineptm and slopeln to be installed. The alternate lineptm has one other nuance in that the literal 'x' has a lowercase **x** instead of an uppercase **X**.

The programs are lineptm, equation of a line y given a point and slope; linept1pt2, equation of a line y given two points; slopeln, slope of line given two points; We used the name slopeln because the command slope is reserved.

Open the Lite / Free / Pro or virtual HP Prime in CAS view. Copy each function’s code and paste it to the CAS **command line**. Press **Enter**.

lineptm(x1,y1,m):=

BEGIN

return (m*('X'-x1)+y1);

END;

linept1pt2(x1,y1,x2,y2):=

BEGIN

return ((y2-y1)/(x2-x1)*('X'-x1)+y1);

END;

For the physical calculator we can alternately use the program editor. Create a shell #cas - #end program using the program editor with the function name, Run the HP Connectivity Kit. Open the shell program, cut and paste above function code leaving the #cas and #end lines. Use disk icon to save the revised program. Click on this link for video demonstrating the procedure.

The Pro or virtual HP Prime can also alternately use the program editor. Create a shell #cas - #end program using the program editor with the function name, In the shell program, cut and paste above function code leaving the #cas and #end lines

Alternate - nested approach

slopeln(x1,y1,x2,y2):=

BEGIN

return ((y2-y1)/(x2-x1));

END;

lineptm(x1,y1,m):=

BEGIN

return (m*('x'-x1)+y1);

END;

linept1pt2(x1,y1,x2,y2):=

BEGIN

return lineptm(x1,y1,slopeln(x1,y1,x2,y2));

END

**Note**: Functions needed Begin return End - HP Connectivity Kit crashed when Kit tried to display Pro/Virtual CAS Vars without Begin return End included. 2019/04/02 - No longer crashes -

We will use four screen collage approach to explain our HP Prime solutions. The four screen collage allows us to have multiple problems shown in a small area using Textbook display. Press the **CAS** key to change to CAS view. Use the **Clear** key to erase any previous work.

The upper left screen, figure 2, shows us pasting in the slopeln function into the **command line**. The upper right screen shows the result. When we use the HP Connectivity Kit to to display the value of the Pro/Virtual CAS Vars slopeln we see that the BEGIN, RETURN, and END are still there. The history does not always show what is input in the **command line**. For the next four lines we use the **Vars** key followed by selecting menu 2 Program and then slopeln.Th first two entries for slopeln have the same result, -2. This means the lines are parallel. The next has a slopeln of 0, a horizontal line, and the last a slopeln of +- infinity, a vertical line.

The lower left screen, figure 2, the first line result shows the equation of a line through two points. The second line simplifies the result by using the soft key **simplify**. In the third line we keyed in y in the command line, followed by highlighting line two and using soft key **Copy**.

The lower right screen, figure 2, illustrates a common problem with HP Prime real variables, A-Z and theta. Their default value is zero. So in line 2, X is replaced by zero and the result y=5/7 is not what we are looking for. In line three we replace with lowercase x and see an equivalent result to the equation we input. We next use the calculator to show the manual steps. Key in 7*(), use select previous result from history and press soft key **Copy**. Press **Enter**. For the last line key in (), select previous result from history and press soft key **Copy**. Key in - 7y. Press **Enter**. This problem is avoided by using the literal 'x'. Using lowercase **x** instead of an uppercase **X** prevents the misleading results. We recommend that use the alternate lineptm function for this reason.

Figure 2 Slope of a line - equation two points;

**Getting Additional Information**

At the present time only the HP Prime Guide Algebra Fundamentals is available in eBook and Print. As demonstrated by this example, the Trigonometry, and Calculus examples, the HP Prime Free / Lite, Pro, virtual and handheld are able to perform anything the TI-89 could perform. With programming and Apps added, the HP Prime options are unlimited.

I am working on material for additional volumes. For now you can Google HP Prime and a topic for additional information. You can also see threads such as my thread on Xcas Youtube videos that has 52 screens shots of math examples with multiple commands per screen shot, that can provide you with some assistance with all sorts of math topics.

Prime Academy | Learning Center

giving every student every chance to learn and understand

© 2018 -2022 Computer Learning Service. All Rights Reserved.