next up previous
Next: About this document ... Up: lab_template Previous: lab_template


Linear Approximation and Tangent Functions


Linear Approximation

Suppose that $f(x)$ is a differentiable function and that $a$ is some fixed number in the domain of $f$. We define the linear approximation to $f(x)$ at $x = a, f_{T}(x,a)$ by the equation

f_{T}(x,a) = f'(a)(x-a)+f(a).

In this equation, the parameter $a$ is called the base point, and $x$ is the independent variable. You may recognize the equation as the equation of the tangent line at the point $a$. It is this line that will be used to make the linear approximation. For example if $f(x) = x^2$, then $f_{T}(x,1)$ would be the line tangent to the parabola at $x = 1$
> f:=x->x^2;
> fT1:=D(f)(1)*(x-1)+f(1);
> plot({f(x),fT1},x=-1..3);
Obviously the two things the function and the tangentline have in common at $x = a$ are their y-value and their slope. Looking at the plot, the line will approximate the function exactly at the base point a and the approximation will be close if you stay close to that base point. To see how far off the approximation becomes on the given interval of the plot it is easy to see that the largest errors occur at the ends of the interval, i.e. $x=-1$ and $x = 3$. Simply subtract the y-values to calculate the error.
> abs(f(-1)-subs(x=-1,fT1));
> abs(f(3)-subs(x=3,fT1));
Notice that the error grows to four at each end of the interval. How could you find an interval such that the greatest error will be a specific value? Think about this as it will appear in the exercises.

Tangent Functions

Two functions are said to be tangent at a point $x = a$ if their y-values are equal, $f(a) = g(a)$ and if their tangent slopes are equal $f'(a) = g'(a)$. For example, the functions $f(x) = sin(x)$ and $g(x) = x$ are tangent at $x = 0$. Check their y-values and their derivatives at the given point.
> f:=x=>sin(x);g:=x->x;
> f(0);g(0);
> D(f)(0);D(g)(0);
However, $f(x) = sin(x)$ and $h(x) = x+1$ aren't tangent at $x = 0$ because even though they have the same slope they don't have the same y-value.
> h:=x->x+1;
> D(f)(0);D(h)(0);
> f(0);h(0);


  1. Given:

f(x) = \cos(x)(3x^2+4x+2)

g(x) = \sin(1)(-10x^2+11x-1)+\cos(1)(10x-1)

h(x) = 9\cos(x)

    1. Graph the three functions on the same plot using the intervals $-5 \leq x \leq 5$ and $-50 \leq y \leq 50$
    2. Find the point where the functions intersect.
    3. Are any of the functions tangent to each other at the intersection point? If so plot them with a small enough domain to show the tangent functions clearly.
  2. In your scientific studies you find that your results follow the function

f(x) = \frac{ \cos(x)(x^5+3x)}{5000}+10

    1. Plot your function twice, first on the interval $-5 \leq x \leq 5$ and second on the interval $-2 \leq x \leq 2.5$
    2. You want to evaluate data around the base point $x = 2$ but you don't want to work with such a messy function. What is the linear approximation to this function at this base point? Plot the function and its linear approximation.
    3. You want to make sure that your linear approximation never is in error greater than 0.01. What is the interval of x data points that you can work with? (Use the fsolve command so you can find each interval endpoint) Plot the function and the linear approximation on the interval that you found.

next up previous
Next: About this document ... Up: lab_template Previous: lab_template
Jane E Bouchard