Michael Thomason's write-up for assignment two, problem six.

I will begin by
defining *y* ( *x* ) as
described in the assignment and by graphing it.

`> `**restart****:
y:=x->2*x^2+3*x-4;
plot(y(x),x=-15..15,y=-10..300);**

Now
I will plot *y* (
*x* -4).
This is the same as replacing each *x* with
an ( *x*
- 4).

`> `**plot(****[y(x),y(x-4)],x=-15..15,y=-10..300);**

Replacing
each *x *with an ( *x*
- 4) translates the graph to the right by 4 units
(the original graph is red and *y* (
*x* - 4) is
green) . What about replacing it with an ( *x* + 4)? This will move the graph left by 4 units.

`> `**plot(****y(x+4),x=-15..15,y=-10..300);**

The
apex of the parabola is now in the third quadrant. To move it to the second
quadrant, I will have to move it upwards. This can be done by adding a constant
term to the function, effectively moving each point upward by that constant
amount. From the graph above, it looks like 50 will be more than enough of a
vertical shift. Here I will plot *y* ( *x* + 4) + 50.

`> `**f****:=x->y(x+4)+50;
plot(f(x),x=-15..15,y=-10..300);**

Let's
try something a little more tricky. I want a mirror
image of this graph (ie an upside down copy) that
meets the graph at its vertex. First we need to find the vertex. This will be
done by finding the derivative, setting it equal to zero, and solving for *x* , the *x*
-coordinate of the vertex. That is then plugged into *f*
( *x* ), the *y* -coordinate of the vertex.

`> `**simplify(f(x));
D(f)(x);
solve(D(f)(x)=0,x);
f(solve(D(f)(x)=0,x));**

So
the coordinates of the vertex are (
, ). I want *g* ( *x* ) = such that *g*
( ) = . I'll start out by flipping *f*
( *x* ) over the *x*
-axis.

`> `**simplify(-f(x));
g:=x->-2*x^2-19*x-90;
plot([f(x),g(x)],x=-15..15,y=-200..300);**

Now
I have two graphs which are mirror images across the *x* -axis. I need to translate the green graph, *g*
( *x* ), upwards some number of
units, call it *c* , so that the vertices
are the same.

`> `**g:=x->-2*x^2-19*x-90+c;
c:=solve(g(-19/4)=359/8,c);
g(x);
plot([f(x),g(x)],x=-15..15,y=-100..300);**

I have produced a graph which is concave down and shares
the same vertex as the original parabola.