0% found this document useful (0 votes)
15 views

Mathematica Lab 4

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views

Mathematica Lab 4

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 6

MATH 1234 Lab 4

Linearization
By Helen P. Read, University of Vermont. Last revised July 2023

Name: Collin Chamberlain

The linear approximation (also called the “linearization”) for a function f(x) at x0 is simply
the tangent line to f(x) at x0. To find the linearization, use the point-slope equation of a
line through the point (x0, f (x0)) with slope f ' (x0). This results in the following equation for
the linearization.

L(x) = f ' (x0 ) (x - x0) + f (x0 )

The linearization for f(x) at x0 can be used to approximate values of f(x) for values of x in
an interval around x0. This is worthwhile because lines are very simple functions to work
with.
For the exercises below, show your work, and record your answers in the boxes provided.
Note that you can use Mathematica to find derivatives. If your function is called f[x], then

tive the same way you do for f[x]. For example, to evaluate f[x] and f '[x] at x = 1, just
just enter f '[x] to find its derivative. You can substitute a specific x-value into the deriva-

enter f[1] and f '[1] respectively.

Exercise 1
(a)
Find the linearization for f (x) = 56 x arctan  at x0 = 7.
x
7

I n [ ] : = f[x_] := 56 x ArcTan[x / 7]

I n [ ] : = f'[x]
Out[ ]=

+ 56 ArcTan 
8x x
1+
2
x 7
49
2 math1234_lab4.nb

I n [ ] : = f'[7]

28 + 14 π
Out[ ]=

I n [ ] : = f[7]

98 π
Out[ ]=

Show work. You can use Mathematica to find f[7] and f '[7].

Find the exact equation (no decimals).

L(x) = (28+14 π)(x-7)+98 π

I n [ ] : = L[x_] := (28 + 14 π) (x - 7) + 98 π

(b)
Plot f(x) together with L(x) for x in the interval [-5, 25]. There is a template for plotting
more than more than one function on the 2D tab of the Classroom Assistant, next to Plot
under More.

I n [ ] : = Plot[{f[x], L[x]}, {x, -5, 25}]


Out[ ]=

1500

1000

500

-5 5 10 15 20 25

-500

(c)
On what interval does L(x) look like a reasonably good approximation of f(x)? You don’t
have to do any calculations here. Just pick a decent interval by looking at the plot.
math1234_lab4.nb 3

have to do any calculations here. Just pick a decent interval by looking at the plot.

Illustrate with a new plot that shows f(x) together with L(x) on the interval that you give
as your answer.

I n [ ] : = Plot[{f[x], L[x]}, {x, 6, 8}]


Out[ ]=

350

300

250

6.5 7.0 7.5 8.0

L(x) looks like a reasonably good approximation for x ∈ [6, 8]

Exercise 2
Note: If you already used g(x), L(x) or h(x) for any of your functions in Exercise 1, you
can use different names for your functions here. Just keep track of what you named them.

(a)
Find the linearization for g(x) = at x0 = 64.
36
x 4/3
Show work. You can use Mathematica to find g[64] and g'[64].

36
I n [ ] : = g[x_] := 4
x3
Find the exact equation (no decimals).

I n [ ] : = g'[x]
Out[ ]=

-
48
x7/3
4 math1234_lab4.nb

I n [ ] : = g'[64]
Out[ ]=

-
3
1024

I n [ ] : = g[64]
Out[ ]=

9
64

LL[x_] := - (x - 64) +
3 9
I n [ ] : =
1024 64

L(x) = LL[x_] := - 1024


3
(x - 64) + 9
64

(b)
Plot g(x) together with L(x) for x in the interval [0, 150].

I n [ ] : = Plot[{g[x], LL[x]}, {x, 0, 150}]


Out[ ]=

0.6

0.4

0.2

20 40 60 80 100 120 140

(c)
The absolute error in the linearization is the absolute value of the difference between the
original function and the linearization. That is:

Absolute error = g (x) - L (x)


math1234_lab4.nb 5

y = 0.1, for x from 0 to 150. To do this, make a plot of {h[x], 0.1} with curly braces around
Define a function h(x) equal to the absolute error, and plot it together with the line

the pair of functions. If you use the template for plotting two functions together, put in
h[x] for the first function and 0.1 for the second function.

I n [ ] : = h[x_] := Abs[g[x] - LL[x]]

I n [ ] : = Plot[{h[x], 0.1}, {x, 0, 150}]


Out[ ]=

0.20

0.15

0.10

0.05

20 40 60 80 100 120 140

dle. What is the error at x = 64? Confirm your answer by evaluating h[64].
On the plot that you made, trace along h(x) with the mouse pointer, starting in the mid-

I n [ ] : = h[64]
Out[ ]=

h[64] = 0

What happens to the accuracy of the linear approximation as x moves farther away from
64?

The accuracy of the linear approximation decreases as x moves farther away from 64

(d)
Estimating from the plot that you made above, on approximately what interval is the
absolute error for L(x) less than 0.1? Write your answer in interval notation.

(34, 125)
6 math1234_lab4.nb

Use Solve to find a more precise answer. Write your answer in interval notation.

I n [ ] : = Solve[h[x]  0.1, x]
Solve : Inverse functions are being used by Solve, so some solutions may not be found; use Reduce for complete solution
information.

{{x  33.8315}, {x  47.8623 - 39.7775 },


Out[ ]=

{x  47.8623 + 39.7775 }, {x  126.855}}

(33.8315, 126.855)

You might also like