If you leave
this page without saving your work, it will be lost. Always save your
work before leaving this page or reloading it.
In the last lab, we saw how we could use the derivative to generate
approximate solutions to two different problems. Newton's Method
helped us to find approximate solutions to algebraic equations while
Euler's Method generated approximate solutions to differential
equations. Underlying both of these methods was the fundamental fact
about the graph of a function:
Near the point x0, the tangent line at
x0 provides a good
approximation for the graph.
In this lab, we'll explore this idea further and expand on it.
Question 1: The Linear Approximation
Newton's Method and Euler's Method worked by approximating a general
graph with the tangent line at some point. Of course, we can do this
with any function, and we call it a linear approximation
since we approximating the function with a linear function.
In this question, we'll build the linear approximation for the
function
at the point x0 = 1.
Part a (2 marks)
Select "Question 1a" above and enter the value of the
function
at x0 =
1. Then either press
"Return" or click the "OK" button. You will see the value you have
entered appear on the graph.
Part b (2 marks)
Select "Question 1b" above and enter the value of the derivative of
the function
at x0 =
1. When you press "Return" or click the "OK" button, you
will see the tangent line appear.
This is what we are after: whereas the original function
can be difficult to understand thoroughly, the
tangent line is very easy to work with.
Part c (2 marks)
Select "Question 1c" and enter the value given by the linear
approximation to the function at x = 2. You will
see your result displayed together with an indication of how far
the approximation differs from the true value
It's easy to find
with a calculator. But
here, you have generated a reasonable approximation using calculations
you could probably do in your head. In the next questions, we'll see
how to improve our approximation with just a little more work.
Question 2: Quadratic Approximations
In the previous question, we approximated a graph by a straight line.
You can see that as we travel further away from
x0, the point at which we found the
tangent line, the approximation becomes worse.
But why does the approximation get worse? Because the graph is
curved and we are approximating it by a straight line. If
we instead approximated the graph by something which was curved, then
perhaps we would find a better approximation.
In this question, we will approximate a function f(x)
by a quadratic
function
p(x) = a + b x + c x2
whose graph is a parabola. By considering the curvature of the graph
in this way, you can see that the approximation becomes
better over a larger range.
Part a (2 marks)
Select "Question 2a" above and position the constant
coefficient a to give the correct value for the
function at x0 = 0. Another way to think
of this is that you are approximating the function by a constant
function in the vicinity of x0 = 0.
Part b (2 marks)
Select "Question 2b" and position the coefficient of the linear term
to give the best approximation to the graph at x0 =
0. This is, in fact, the linear approximation--the kind of
approximation we considered in Question 1. The graph you have
constructed so far should be the tangent line at x0
= 0. Notice that the coefficient of x is
the derivative of the function at x0 = 0.
Part c (2 marks)
Select "Question 2c" and position the coefficient of the quadratic term
to give the best approximation to the graph at x0 =
0. Notice that adding in the quadratic term gives a better
approximation over a wider range than the linear approximation.
Part d (2 marks)
Let's think about what the coefficients of the approximation mean.
The constant coefficient is the value of the function at 0
--that is, p(0) = f(0). In the same way,
the coefficient of x is f'(0),
the derivative at 0. This means that
p'(0) = f'(0). This produces the tangent line
for the linear approximation.
What should the coefficient of x2
be? Well, if we want the parabola to be as curved as the original
graph near x = 0, we should make
p''(0) = f''(0)
since the second derivative controls how a graph curves.
To be sure you understand this, enter the second derivative of the
function f(x)
at x = 0 in the window below. Be careful, it
is not just the
coefficient c that you found above, but it is
closely related to it. (What is the derivative of the quadratic at
x = 0? Differentiate the polynomial
p(x) = a + b x + c x2 twice.)
Question 3: Taylor Polynomials (8 marks)
In the last two problems, we have found polynomials which
approximate a given function
by equating a certain number of derivatives of the
function and the polynomial at some point. For instance, in Question
1, we formed the linear approximation by equating the value of the
function and its first derivative to those same quantities in a linear
function. Then in Question 2, we formed a quadratic approximation by
equating the value of a function, its derivative and its second
derivative with the corresponding quantities in a quadratic
polynomial.
Of course, there is no reason to stop there. In this question, we
will form a much better approximation from a higher degree polynomial
in the same way. We will consider the function f(x) =
ex . Notice that f(0) = 1 and
also f'(0) = 1 . In fact, no matter how many times
we differentiate f(x) = ex, the value is still
1 at x = 0.
We will create a polynomial
such that p(0) = f(0) and in addition, the
first seven derivatives of p and f
agree at x = 0. Enter the coefficients
in the boxes below and press "Return" after you make each entry. In
this way, you can build the approximation step by step. You should
notice that it tracks along the graph of f(x) = ex
extremely well as you enter the coefficients. Also
displayed for you is the value p(1). This value is
approximating
The windows in which you are to enter the coefficients can perform
division for you: for instance, the window will understand what you
mean if you enter "1/2". In fact, you may enter
"1/2/4" if you mean 1/8.
Approximating functions in this way is a nice thing to do:
it is very difficult to compute the values of the function
f(x) = ex from scratch. Here we have
produced a polynomial, in a simple way, which does a very good job of
approximating the function. In essence, we have replaced a
complicated function with a simple one. We can produce even better
approximations by taking a higher order polynomial. Such polynomials
are called Taylor polynomials. Next term we'll see some more
uses of this kind of approximation.
You have now completed the lab. If technical problems prevent
your answers from being saved, you should receive a message telling
you so and giving you the option to send your work by email. If you
submit in this way, please include your login name in the email
message.
How did you like this lab? Was it interesting, challenging,
frustrating, difficult, boring, fun? Please let us know by sending us email.
We hoped you liked the labs this term. Good luck on the final and
we'll see you again next term.