Question

# a) Evaluate the polynomial y = x^3 - 7x^2 + 8x - 0.35 at x = 1.37 . Use 3-digit arithmetic with chopping. Evaluate the percent relative error. b) Repeat (a) but express y as y = ((x - 7) x + 8) x - 0.35 Evaluate the error and compare with part (a).

Polynomial arithmetic
a) Evaluate the polynomial $$\displaystyle{y}={x}^{{3}}-{7}{x}^{{2}}+{8}{x}-{0.35}$$
at $$\displaystyle{x}={1.37}$$ . Use 3-digit arithmetic with chopping. Evaluate the percent relative error. b) Repeat (a) but express y as $$\displaystyle{y}={\left({\left({x}-{7}\right)}{x}+{8}\right)}{x}-{0.35}$$ Evaluate the error and compare with part (a).

(a)First determine the powers of x needed for evaluating the polynomial. $$\displaystyle{x}={1.37}{7}{x}^{{2}}={13.1383}$$ Chopping to 3 digit arithmetic yields $$\displaystyle{x}^{{2}}={13.1}{8}{x}={10.96}$$ Chopping to 3 digit arithmetic yields $$\displaystyle{8}{x}={10.9}{x}^{{3}}={2.571353}$$ Chopping to 3 digit arithmetic yields $$\displaystyle{x}^{{3}}={2.57}$$ Insert these values in the given polynomial to find $$\displaystyle{y}{\left({1.37}\right)}.{y}{\left({1.37}\right)}={2.57}−{13.1}+{10.9}−{0.35}={0.02}$$ Whereas the exact result is, $$\displaystyle{y}{\left({1.37}\right)}={2.571353}−{13.1383}+{10.96}−{0.35}={0.043053}$$ Hence, the percent relative error is, $$\displaystyle\xi={\frac{{{0.043053}-{0.02}}}{{{0.043053}}}}\times{100}\%={53.54}\%$$ (b) $$\displaystyle{y}={\left({\left({x}-{7}\right)}{x}+{8}\right)}{x}-{0.35}$$ Now, when x = 1.37,
=-7.7131 Chopping to 3 digit arithmetic yields, $$\displaystyle{\left({x}-{7}\right)}{x}=-{7.71}{\left({\left({x}-{7}\right)}{x}+{8}\right)}{x}={\left(-{7.71}+{8}\right)}{1.37}={0.047}$$ Here, the percent relative error is, $$\displaystyle\xi={\frac{{{0.043053}-{0.047}}}{{{0.043053}}}}\ \times{100}\%=-{9.16}\%$$ The percent relative error is smaller when compared to part a.