Due: Thursday, March 15 (in class)
This assignment gives the opportunity to earn at most 60 extra points toward the first mid-term exam. You will not be able to earn more than the total 150 points available on the exam.
[30 pts] Consider the following function:
f(x)=1−(1−x)x.Obviously, if you cancel the 1's in the numerator f(x)=1 for all values of x. However if you compute f(x) as written above in MATLAB, it does not return 1 when x is small. Using MATLAB we can plot f(x) for x∈[−2ϵm,2ϵm] using the following code
f = @(x) (1- (1-x))./x;
x = -2:.01:2;
x = eps*x;
plot(x,f(x))
axis([-2*eps 2*eps 0 2])
title('Plot of $$f(x) = \frac{1-(1-x)}{x}$$','interpreter','latex');
xlabel('$x$','interpreter','latex');
ylabel('$f(x)$','interpreter','latex');
which produces the following image:
Please explain why the graph looks like it does. (I suggest testing out f in MATLAB at certain values of x).
In particular please answer the following questions: (5pts each)
Why is f(x)=0 for 0≤x<ϵm/4?
Why is f(x)=0 for −ϵm/2<x≤0? Specifically, why is the f zero for twice as long on the left than on the right?
Why does f(x) jump from zero to the value 2 at around x=.250001ϵm?
Why does f(ϵm)=1?
Why does f oscillate around 1 for .25ϵm<x<2ϵm?
Why are there twice as many oscillations for positive x as there are negative x?
[15 pts] Suppose that f(x) has infinitely many continuous derivatives on [a,b] and that ˉx∈[a,b] is a nth order root for f, namely
f(ˉx)=0,f′(ˉx)=0,…,f(n−1)(ˉx)=0,f(n)(ˉx)≠0.We want to apply Newton's method to find the root ˉx. Derive a formula relating the i+1th error ei+1=xi+1−ˉx for Newton's method to the ith error ei, to leading order in ei. What is the corresponding order of convergence?
[15 pts] Let
A=[1−2−23]Answer the following questions.
Find a vector x such that ‖
Find a vector such that
What are and respectively?