Sale!

Test 2 – MATH 471

$30.00

Category:
5/5 - (3 votes)

Test 2 – MATH 471
Name:
Directions: Show ALL work on the test paper. Please note that correct answers without supporting work
will not receive full credit. To receive full credit for solutions, all problems should be completed using only
the methods and techniques discussed in this class so far this semester. Note: Your final answer to
each question should be clearly labeled and/or circled. You may not receive human help on this
assessment. Any Python code you use in your solutions must be written by you, and you alone. Your Zoom
camera should remain on throughout this assessment. NOTE: If you submit Python programs as solutions
to the problems below, you need to provide a clearly-labeled individual Python *.py file for each respective
problem.
1. (50 pts.) Write a computer program that uses the derivative approximation
∆2(h) = (4D2(h) − D2(2h))/3
to approximate the first derivative at x = 1 for each of the following functions, using h
−1 = 4, 8, 16, 32.
(a) g(x) = − ln(cos x)
(b) f(x) = x
x
x
2. (50 pts.) For each integral below, write a program to compute the trapezoid rule using the sequence
of mesh sizes h = 1/2(b − a), 1/4(b − a), 1/8(b − a), …, 1/128(b − a) where b − a is the length of the
given interval.
(a) R 1
0
(e
x − e
−x
)/2 dx
(b) R 1
0

1 − x
4 dx
3. (50 pts.) For the function below, write a program that indicates the (minimum) number of iterations
required to estimate the root on the interval [1, 2], within an error tolerance of 10−5
. Make sure to
print your final conclusions to the console, or write them as a comment in your code. Do this for the
bisection method, the regula-falsi method, and Newton’s method with x0 = 1:
f(x) = x
x
x
− 3.

Scroll to Top