GeoGebra Tutorial: Graphs and Sliders Part 2

In my post Tutorial 4: Graphs and Sliders, we learned how to use the slider in investigating graphs of the form y = mx + b. In this tutorial, we are going to use sliders to investigate the graph of the fromy = a(x – h)2+ k, where a, h and k can be any real number.  We will first input the values of a, h and k in the input box before creating the sliders.

To do this, first we are going to assign temporary values for a, h and k in the input box, then create a slider for each of them. After creating a slider, we enter the equation y = a(x – h)2+ k in the input box to graph our function.  You may want to look at our expected output here.

Instructions

    1. Open GeoGebra.
    2. Enter the following equations in the input box: a = 1, h = 1 and h = 1 in the Input box and press the ENTER key on your keyboard after typing each equation.  Observe that the equations appear in the Free Objects section of the Algebra window.

Figure 1 – Equations are entered in GeoGebra using the Input box.

    1. Right click each equation and click Show Object. Notice that the sliders appear in your drawing box.

Figure 2 – Sliders are made by right-clicking each equation and pressing the Show Object option in the context menu.

    1. Type the equation y = a*(x – h)^2 + k, the press the ENTER key. If you have typed the equation correctly, a graph should appear in your drawing pad.

Q1: Click the Move button and move the small circle on your slider. What do you observe?
Q2: What are the effects of the parameters a, h and k to the graph of the function y = a*(x – h)^2 + k?

Graphs, Equations and Tables in Microsoft Excel

Introduction

We can represent functions in three ways*: graphs, tables (or list) and equations.  It is often better to view simultaneously the representations of a function to be able to understand its behavior, but it is quite hard – or expensive – to find a software with such functionality.  However, with some knowledge on formulas in MS Excel, it can actually be done.

In this tutorial, we are going to represent functions of the form y = mx + b by letting the user enter and change the values of m and b, then generate the equation, the table, and the graph at the same time. Although we are going to use Microsoft Excel 2007 in this tutorial, but this can be done using lower versions. The expected output of this tutorial can be downloaded here.

The prerequisite of this tutorial is basic knowledge of Microsoft Excel, but I designed this tutorial to be stand-alone, so inexperienced Excel users could follow it step by step.

Preliminaries

The first thing that we are going to do is to place the letters m in A2 and b in A3.  A2 and A3 are examples of cell addresses.

As you can observe, a worksheet is composed of columns labeled with letters and rows labeled with numbers.  The intersection of a column and a row is called a cell and its location is determined by its cell address which is its corresponding column letter and row number.

Setting up for user input boxes

  1. To place the instruction, click cell A1, then type Type m and b in the colored boxes: Note that when you click a cell, the cell pointer appears. The cell pointer is the rectangular box where your text appears when you type in the worksheet.
  2. Type m in cell A2 and type b in cell A3.
  3. Place the cell pointer in B2, and choose the color you want from the theme color box(see Figure below). Using the Theme color box, change also the color of B3. You may want to change the font of the text you have written should you want.

Figure 1 – Theme Colors dialog box

Generating the Equation

We want the equation y = mx + b to appear when the user put the value of m in B2 and the value of b in B3. To do this, we will use the concatenate command. The concatenate command joins series of strings (characters, words or numbers). In our case, we will join the string  “y =”, the content of B2 (which is our m), the string “x +” and the content of B3.  We will put our equation in B7 so that we can put our graph on the right side of our worksheet. The logic is that we want the equation to appear like y = content of B2 x + content of B3, where the content of B2 is the number typed by the user in cell B2 and the content of B3 is the number typed by the user in B3. Notice that the different colors indicate the string groups.

  1. Type 3 in B2 and 5 in B3. This will enable us to see later if our concatenate command will work.
  2. Type Equation in A6.
  3. Place the cell pointer in A7. Type =CONCATENATE(“y =”, B2,”x +  “, B3). Then press the ENTER key on your keyboard.

Notes on the concatenate command:

  1. Words concatenated are separated by commas.
  2. Texts are enclosed by quotations(such as “y =”)
  3. Values of cells are distinguished by their address. For example, B2 means that it will display the content of cell B2 which is 3.
  4. If you want to edit the equation, you can double click the cell or press the F2 function key on your keyboard.

Generating the Table

In this section, we will display the values of the x– from -5 to 5 from B10 all the way to L10 and compute for its corresponding y-values. from B11 to L11.

  1. Type Table in cell A9 and type x in cell A10 and y in cell A11.
  2. Next, we adjust the width of the cells containing the table. Highight A10B10. In the Home tab of the Excel toolbar, click Format from the Cells block, then click Column width.

    Figure 2 – The Format Column Width command

  3. In the column width dialog box, type 3, then press the OK button.
  4. Type the -5 in B10, -4 in C10, and so on all the way to 5 in L10. Your table should look like the table below.

Figure 3 – Values of x

Finding the values of y

Next, we want to get the corresponding values of y in the equation y = mx + b. To do this, we  multiply the value of m (located in B2) to the value of x (located in B10) then add it to  the value in b (located in B3).  Our expression should be, B2*B10 + B3. In Microsoft Excel, formulas always start with an equal sign. So we will type type =B2*B10 + B3.

  1. To compute for the value of y in B11, click cell B11, then type =B2*B10 + B3 then press the ENTER key.
  2. We can type one-by-one the other corresponding values of y but we can do better than that. We will just copy the values of cell B11 to C11 all the way through cell L11 to get the other y-values. But before that, we must modify the formula written in B11. We should edit that formula in B11 and change it to =$B$2*B10+$B$3. Notice that we add dollar signs in B2 and B3. For the explanation of this see ** below.
  3. To Edit the formula in B10, double click cell B11 (or click cell B10, then press the F2 function key on your keyboard), then change the formula to =$B$2*B10+$B$3
  4. Next we copy the formula in B11 and paste it from C11 all the way to L11. To do this, place the cell pointer in B11, then click the Copy icon from the toolbar (or press CTRL  C).
  5. Highlight C11 to L11, then click the Paste icon from the toolbar (or press CTRL V)
  6. If you have done the procedures correctly, and have not changed the values of x and y you inputted earlier, your table should look like the diagram below.

Figure 4 – Table of values of the equation y = 3x + 5

Q1: Change the values of m and b in cells B2 and B3. What do you observe?

Constructing the Graph

    1. To create the graph, highlight the table from B10 to L11 as shown below

    1. In the Charts section of the Insert tab of the Excel, click Scatter and choose the graph on the second graph in the first row. A graph should appear on your worksheet.

  1. Try to change the value of m and b several times. What do you observe about the graph?

Formatting the Graph

If you can observe, the axes of the graph automatically adjust to the value of m and b. Entering the bigger values of m also increases the range of the y-axes. To remedy this problem, we must set the axes to constant range regardless of the values of m and b. We will set the range of the y-axis from – 20 to 20, and the range of the x-axis from -5 to 5.

Setting the Axis Range

    1. To set the domain and range of the graph of the y-axes, click the y-axis and be sure that a rectangular box appears as shown below.

Figure 7 – The y-axes selected

    1. Right-click the rectangular box surrounding the y-axis, then click Format Axis from the pop-up menu.
    2. In the Axis Options, select all the Fixed option button, then copy the numbers shown below.

    1. Click the Close button.
    2. Now, adjust the Axis options of the x-axis by right-clicking the x-axis and choosing Format Axis. Copy the numbers as shown below.

Figure 9 – Axis options for the x-axis

  1. Click the Close button.
  2. Change the values of m and b. What do you observe about the equation, the table and the graph?

Q2: How does the value of m and b affect the graph?

_____________________________________________________________

*Actually, functions can also be represented verbally, so that makes the number of representations 4.

** When you copy formulas in Excel, the locations of cells also adjusts.  For example, if I copy the formula in B11, which is =B2*B10 + B3, to C11 that is one cell to the right – all the cell addresses in the formula will also adjust one cell to the right. If you do that, the formula in C11 will be =C2*C10+C3 where C2 is now our m and C3 our bwhich is different from their original locations. The dollar sign tells Microsoft Excel to points to a constant location – in our case, B2 and B3.

GeoGebra Tutorial 6 – Parameterization of Length and Area

This is the sixth tutorial of the GeoGebra Intermediate Tutorial Series. If this is your first time to use GeoGebra, please read the GeoGebra Essentials Series.

In this tutorial, we are going to learn the following:

  1. use variables in GeoGebra
  2. compute using these variables
  3. use variables as parameters of objects

Problem: Given a rectangle with perimeter 10 units, find the dimension of the rectangle that can be formed that has the largest area.

This problem can be easily solved algebraically, but we are going to use GeoGebra to parameterize the length and the area of the rectangle to find its maximum area. The output of this tutorial is shown above.

Figure 1 – Rectangle ABCD with two of its sides on the x and y-axis

Before doing the tutorial, let us first solve the problem. We know that the rectangle’s perimeter is constant, so we choose the width w.  It follows that the height h will depend on the width. For instance,  if  w=4 units, then h = (10 – 2*4)/2 which is equal to 1. Hence, h = (10 – 2w)/2. Using this information, we plan the GeoGebra construction.

  1. First we make our maximum width 5 (Why?). We will create segment AL with length 5 with A at the origin and L at (5,0)
  2. Next, we create point D on AL. With D = (w,0), AD will be the width of the rectangle.
  3. We compute for h = (10 – 2w)/2, then, and take the value as the height of the rectangle. Then, we create point B  with coordinates (0,h).
  4. We create the fourth vertex of the rectangle by getting the intersection of the horizontal line passing through B and a vertical line passing through D.
  5. Lastly, create ABCD using the polygon tool, and then produce point P (w, A_r) where A_r is the area of the rectangle.

Instructions

1.) Open GeoGebra and be sure that the Algebra & Graphics view is selected in the Perspectives panel.
2.) Select the Segment between Two Points tool, click on (0,0) and click on (5,0) to construct segment AB. Show the label of the points, and rename point B to L.
3.) Create a point on AL. You may not see the segment, so before doing this, hide the axes by clicking the Axes icon in the upper left of the Graphics View. If the icons are not displayed, click the arrow.
4.) Rename the recently created point to D. Move the point and notice that it can only move between A and L.  Now, hide point L and display the axes. AD will be the width (lower base) of the rectangle.
5.)  We now determine the width and the height of the rectangle. First, we want to determine the AD which is the width. To do this, we get the x-coordinate of D (Why?). To get the x-coordinate of D, type w = x(D) in the Input bar and press the ENTER key. This means that the value of w, a declared variable, will be the x-coordinate of point D which is the same as the length of AD.
6.) Next, we compute for the height h of the rectangle. Type h = (10 – 2w)/2 in the input bar and press the ENTER key. Notice the values of h and were added to the Algebra view.
7.) Next we create point B with coordinates (0,h). To do this, type B = (0,h) in the Input bar and press the ENTER key. This will be the third point on the rectangle.

8.) Move point D. What do you observe?
9.) Next, we locate the fourth vertex of the rectangle. The fourth vertex C will have the y-coordinate the same as B and x-coordinate the same as D. Therefore, we type C = (x(D), y(B))
10.)  Now, we use the polygon tool to construct rectangle ABCD. Click the Polygon tool and then click the points in following order: point A, point B, point C, point D and, again, point A to close the figure.
11.)  Now, let us display the area of the polygon. Right click the interior of the rectangle, then click Object Properties to open the Preferences window. In the Basic tab of the Preferences window, check the Show Label check box and choose Value from the drop down list box. Close the window.

12.)  Move point D. What do you observe? What length of AD gives the rectangle the largest area?
13.)  Now, we create point P, type P = (w, poly1). Note that poly1 is the name of the rectangle and its value is area of the rectangle (see the Algebra view).
14.)  Right click on point P, then click check Trace On. This will trace the path of point P.

15.)  Move point D. What do you observe? What can you say about the curve formed by the traces of point P? Explain why your observations are such.
16.)  Solve the problem algebraically. What is the relationship between the equation formed from getting the solution of the problem and curve formed by traces of point P?
1 66 67 68 69 70