Please solve this problem and show ALL your work and steps. I\'m posting this qu
ID: 3210321 • Letter: P
Question
Please solve this problem and show ALL your work and steps. I'm posting this question because I don't understand how to get to the answer. This is for a Numerical Analysis class.
6. Consider a table of values of f(x) e-1 for equally spaced points of x between 0 and 1. (a) Let xo = 0.1 and x,-0.11. Find P(0.105), an approximation of f(0.105), using a linear interpolation P(x). Find also the error bound of the approximation (b) Let Zo = 0.1 and x,-0.1+h. How small should the spacing h be if you want to be able to use linear interpolation to approximate any x between to and xi, with an error at most 10-3 (c) Adding a point to part (b), x2-x1+h = 0.1 +21. How small should the spacing h be if you want to be able to use quadratic interpolation to approximate any x between xo and x2, with an error at most 10-3Explanation / Answer
here the given function is f(x)=exp(-x)
and points given are x0=0.1 and x1=0.11
firstly we calculate p(x) using linear interpolation formula
that is P(x)=f(x0)+[f(x1)-f(x0)/x1-x0](x-x0)............(1)
put all the values in equation(1)
hence p(x)=exp(-0.1)+[exp(-0.11)-exp(-0.1)/0.11-0.1](x-0.1)
p(x)=0.9048+[0.8958-0.9048/0.01](x-0.1)
p(x) =0.9048-[0.009/0.01](x-0.1)
p(0.105)=0.9048-(0.9)(0.105-0.1)
=0.9048-0.0045=0.9003
and f(0.105)=exp(-0.105)=0.90032
and error is given by =f(x)-p(x)
=0.90032-0.9003=0.00002=2e-5