Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Inverse Interpolation. Suppose that we want to solve the equation f(x) = 0, for

ID: 3184156 • Letter: I

Question

Inverse Interpolation. Suppose that we want to solve the equation f(x) = 0, for sone function f which has an inverse f-1. If we have two approximations o and of a zero of f then we can use interpolation to find a better approximation,f(0), as follows. Let yo = f(zo) and yi = f(x). yi = f(xi) yo xi Co and P1 (0) = x0 + f-1 [Yo, yi] (0-Yo)-Zo-Yof-1 [yo, yi]. We could now define x2 P1(0), evaluate f at this point to get y2 = f(x2), and then add one more row to our table (3) to get f-10, yi,y2]. Once this is computed we can evaluate P2(0) to get an improved approximation x, etc. Let f(x) = x-e-r using the values f(0.5) = -0.106530659712633 and f(06) = 0.051188363905973 find an approximate value for the zero of f by evaluating pi(0).

Explanation / Answer

matlab code

close all
clear
clc

x0 = 0.5; y0 = -0.106530659712633;
x1 = 0.6; y1 = 0.051188363905973;

x2 = x0 - y0*x1;
y2 = f(x2);
fprintf('x2 = p1(0) = f^-1[y0,y1,y2] = %.15f ', x2);
fprintf('f(x2) = %.15f ', y2);

function out = f(x)
out = x - exp(-x);
end

output

x2 = p1(0) = f^-1[y0,y1,y2] = 0.563918395827580
f(x2) = -0.005056824209081

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote