Parabolas

By:  Debra Woods
12/1993

initialization

Needs["Graphics`Colors`"];

The Basic Graph of a Parabola

The purpose of this lesson is to demonstrate the properties of the graphs of quadratic functions of one independent variable.  We will begin with the basic graph of y = x€.

Clear[x];

Plot[x^2,{x,-4,4},
	PlotStyle->{Red},
	AspectRatio->1];

The graph y = c x€

Now, while keeping our base graph of y = x€ in red, let's investigate what happens if we multiply the x€ by a constant.  The new plot will be in blue, and will in this case be y = 2x€.

Plot[{2x^2,x^2},{x,-4,4},
	PlotStyle->{{Red},{Thickness[0.02],Blue}},
	AspectRatio->1];

The plot of y = x€ is the thicker of the two plots.

It appears that multiplying by 2 "squished" the graph.  Change the constant above and see if this rule is general.  Answer the following questions:

1)	What does multiplying by a constant greater than one do?

2) What does multiplying by a constant less than one do?

3)	Why?  (Hint:  try plotting points) 

4)	What does multiplying by a negative constant do?

Now let's demonstrate the function y = cx€ with several constants.

Table[Show[GraphicsArray[
	Plot[{c x^2, x^2},{x,-4,4},
	PlotRange->{{-4.0,4.0},{-4.0,4.0}},
	AxesLabel->{"x","y"},
	PlotStyle->{{Red},{Thickness[0.02],Blue}},
	AspectRatio->1,
	DisplayFunction->$DisplayFunction,
	Epilog->Text[c,{2.5,1}]]]],{c,-3,-1}];
Table[Show[GraphicsArray[
	Plot[{c x^2, x^2},{x,-4,4},
	PlotRange->{{-4.0,4.0},{-4.0,4.0}},
	AxesLabel->{"x","y"},
	PlotStyle->{{Red},{Thickness[0.02],Blue}},
	AspectRatio->1,
	DisplayFunction->$DisplayFunction,
	Epilog->Text[c,{2.5,1}]]]],{c,-1,0,.2}];
Table[Show[GraphicsArray[
	Plot[{c x^2, x^2},{x,-4,4},
	PlotRange->{{-4.0,4.0},{-4.0,4.0}},
	AxesLabel->{"x","y"},
	PlotStyle->{{Red},{Thickness[0.02],Blue}},
	AspectRatio->1,
	DisplayFunction->$DisplayFunction,
	Epilog->Text[c,{2.5,1}]]]],
	{c,.1,.9,.2}];
Table[Show[GraphicsArray[
	Plot[{c x^2, x^2},{x,-4,4},
	PlotRange->{{-4.0,4.0},{-4.0,4.0}},
	AxesLabel->{"x","y"},
	PlotStyle->{{Red},{Thickness[0.02],Blue}},
	AspectRatio->1,
	DisplayFunction->$DisplayFunction,
	Epilog->Text[c,{2.5,1}]]]],{c,1,3}];

Select the above cells and press apple-y simultaneously to see the animation.  The graph of y = x€ is the thicker of the two.

The above animation shows the effect of the c constant in the graph of the function y = cx€.

The function y = x€ + c

In this section, we study the effect of adding a constant to the y value of the function.  Let's begin with y = x€ in red and
y = x€ + 2 in blue.

Plot[{x^2 + 2,x^2},{x,-4,4},
	PlotStyle->{{Red},{Thickness[0.02],Blue}},
	AspectRatio->1];

What do you suppose adding or subtracting a constant from the y value of the function will do in general?  Why does this happen?
Try changing the constant above to different values to test your hypothesis.

Run the following and press apple-y to animate the effect of the c in the function y = x€ + c.

Table[Show[GraphicsArray[
	Plot[{x^2 + c,x^2 },{x,-4,4},
	PlotRange->{{-4.0,4.0},{-4.0,4.0}},
	AxesLabel->{"x","y"},
	PlotStyle->{{Red},{Thickness[0.02],Blue}},
	AspectRatio->1,
	DisplayFunction->$DisplayFunction,
	Epilog->Text[c,{2.5,1}]]]],{c,-3,3}];

The function y = (x + c)€

This section studies the effects of adding a constant to the x value of the function y = x€ and then squaring it, that is, 
y = (x + c)€.  Let's begin with adding 3, thus the equation 
y = (x + 3)€.

Plot[{(x + 3)^2,x^2},{x,-6,4},
	PlotStyle->{{Red},{Thickness[0.02],Blue}},
	AspectRatio->1];

What happened?  It appears that the graph was displaced three units to the left.  Try this with other values.  Be sure to subtract some values.  What can you say in general about the effect of adding a constant in this way?  Below is another animation of various constants effect on the parabola.

Table[Show[GraphicsArray[
	Plot[{(x + c)^2,x^2},{x,-4,4},
	PlotRange->{{-4.0,4.0},{-4.0,4.0}},
	AxesLabel->{"x","y"},
	PlotStyle->{{Red},{Thickness[0.02],Blue}},
	AspectRatio->1,
	DisplayFunction->$DisplayFunction,
	Epilog->Text[c,{2.5,1}]]]],{c,-3,3}];

Putting it all together

Let's take this opportunity to put two and two together and determine for ourselves what the graph of y = a(x + c)€ + d would look like, given that a, c and d are constants.  Try graphing the given parabolas on your own graph paper and then check your work using mathematica.

1)	y = 0.5 x€ + 4

2) y = (x - 6)€ - 3

3) y = 2 (x + 5)€ + 6

Make up your own problems.  The answers to these can be obtained by running the code below.

Plot[{0.5 x^2 + 4,x^2},{x,-6,6},
	PlotStyle->{{Red},{Thickness[0.02],Blue}},
	AspectRatio->1];

Plot[{(x - 6)^2 - 3,x^2,},{x,-4,10},
	PlotStyle->{{Red},{Thickness[0.02],Blue}},
	AspectRatio->1];

Plot[{2 (x + 5)^2 + 6,x^2},{x,-8,4},
	PlotStyle->{{Red},{Thickness[0.02],Blue}},
	AspectRatio->1];

Conclusions

We have just investigated the translation (shifting) properties of functions of two variables.  Conduct your own mathematica investigation of the translation properties using different functions.  For example y = x‹, y = ln x, y = sin x, or any old function will do.  Hopefully, you will find that the properties will be the same, and if you understand these properties, sketching graphs of functions will become easy once you know the graph of the base function.