Computer Literacy 1 / BMEEPAGG101

Illustrating a parabola

Exercise:

  1. Graph the f(x) = x² function and its derivate on the [-2,2] domain!
  2. PRACTICE: Graph the f(x) = ax² + bx + c function and its derivate on the [-4,4] domain! The values of parameters a, b, c have to be variable.

Preliminary remarks

Excel allows us to plot functions given by mathematical formulae using the diagram function. The program can place points with their coordinates in the coordinate space and then connect these points (e.g. with straight lines).

Function visualization in Excel is always done by defining in some way discrete points where you can evaluate the function. Types:

explicit függvény

The functions given in the exercise are explicit functions, so it will be sufficient to take discrete x values in the domain [-2,2] and compute the y values by substitution. Which means that the yi associated with xi can be obtained as follows: yi = f(xi).

We now perform the derivation analytically, using the methods learned in high school:

  1. f'(x) = 2x
  2. f'(x) = 2ax + b
Thus, we have to illustrate a total of 4 explicit functions.

Exercise 1: f(x) = x²

Calculation of function values

Given the above, we need x values, and then for each x we need to evaluate the functions f(x) and f'(x). Let's create three columns, so each row will define a point from each function.

For now, we have evaluated the functions at one point. In the next row we want the formulas to refer to cell B4 instead of B3. Since there are relative references in cells C3, D3, copying the formulas down will also shift the references down.

Illustration

You can plot both functions on a diagram. Excel can automatically identify your data and create the charts. Let's try automatic charting first.

HINT: For quick and precise selection, click in the top left corner (B2), hold down the shift+ctrl keys, and then use the right and down arrows on the keyboard to select the range. Holding down the shift key ensures that the selection continues, and with the help of the ctrl key we can navigate to the edge of data-containing areas.

If the data is not automatically recognised, you can manually assign it to the chart. You can also modify the existing (wrong) chart by deleting or correcting the incorrectly added data series.

All that remains is to place labels on the diagram and format the final result.

Exercise 2: f(x) = ax² + bx + c (practice exercise)

Start a new Excel document or a new tab for the second exercise. In order for the values of a, b, c to be variable, we need to include them as parameters in a separate cell.

HINT: In Excel, you cannot use any name to name the ranges, for example, "c" and "r" are reserved by default, so we will use the name "cc". If a name is taken, we do not get an error message, the renaming just simply doesn't happen.

The exercise continues from here in the same way as before. In the formulae f(x) and f'(x), we can refer to the cells a, b, cc by their names.

HINT: How can I make the number 2 in the chart title appear in the superscript? In places where we don't have formatting options, we need to insert the superscript 2 as a symbol. If there is no symbol insertion option in the program, you can look for the required character in another program (e.g. Word) or on the Internet (by searching for "superscript 2" in Google).