Use the first derivative to find the equation of a quadratic function given tangent lines to the graph of this function

Problem

a) Find the equation of a quadratic function whose graph is tangent at x = 1 to the line with slope 8, tangent at x = - 2 to the line with slope - 4 and tangent to the line y = - 8.
b) Find the equation of the tangent lines at x = 1 and x = - 2.
c) Graph the quadratic function obtained and the 3 tangent lines in the same coordinate system and label the tangent lines and points of tangency.

Solution to Problem:

a) The slope of the tangent to the graph of a function f is related to its first derivative. Let f be the quadratic function to find to be written as
f(x) = a x^{2} + b x + c
The first derivative of f is given by
f '(x) = 2 a x + b
From the property of the first derivative, the slope of the tangent line is equal to the value of the derivative at the point of tangency. Hence we can write two equations related to the tangent lines at x = 1 and x = - 2 as follows
f '(1) = 2a(1) + b = 8
f '(-2) = 2a(-2) + b = -4
Solve the above system of equations to obtain
a = 2 and b = 4
The third tangent y = - 8 is a horizontal line and it slope is equal to 0. A horizontal line is tangent to the graph of a quadratic function, which is a parabola, at the vertex. So y = -8 is the y coordinate of the vertex. The x coordinate of the vertex equal to h is found by solving
f '(x) = 2 a h + b = 0

Which gives
h = - b / 2a
Substitute a and b by their values found above to find
h = -4 / 4 = -1
The graph of the quadratic function has a vertex at (-1,8) and hence
f(-1) = a(-1)^{2} + 4(-1) + c = - 8
Solve the above equation for c to obtain
c = - 6
The quadratic function f is given by
f(x) = 2 x^{2} + 4 x - 6
b) Now that we know the equations of the quadratic function, we can find the y coordinates of points of tangency of the tangent lines at x = 1 and x = -2 as follows:
at x = 1, y = f(1) = 2(1)^{2} + 4(1) - 6 = 0. The tangent line at x = 1 passes through the point (1,0).
at x = - 2, y = f(-2) = 2(-2)^{2} + 4(-2) - 6 = - 14. The tangent line a x = -2 passes through the point (-2 , -14).
For each of the two tangent, we know the slope and a point and therefore we can find their equations.
The equation of the tangent at x = 1 has slope 8 and passes through (1 , 0) and its equation is given by: y = 8x - 8
The equation of the tangent at x = -2 has slope -4 and passes through (-2 , -14) and its equation is given by: y = - 4x - 14
c) Graphs of the quadratic function and all three tangent lines.