[Math] Polynomial evaluation using the chopping and rounding techniques.

numerical methodsrounding error

I have a question on rounding and chopping.

The question: Consider the exponential form of the polynomial $$ p(x) = x^{4} – 9.5x^{3} + 28.49x^{2} – 28.417x + 2.5662. $$

Using five-digit arithmetic, find the relative error in both the exponential and nested forms of $p(x) $ at $x= 3.1$

My Attempt: I have computed the nested form of this polynomial as
$$ p(x) = x(x(x(x-9.5)+28.49)-28.417)+2.5662.$$

My problem comes when I start to evaluate the values using the chopping and nested techniques. When I evaluate 3.1 into the exponential form, I am getting numbers that are not within the 5 digit limit. Can you help me what I am doing wrong? Give me hints please.

Thank you very much.

Best Answer

I think you are misinterpreting "5 digit arithmetic". I expect that means that all calculations are to be carried out to 5 significant digits. You cannot be outside the "5 digit limit", because there is no such thing. Every value has 5 significant (i.e. leading) digits. Everything below those 5 are to be discarded. To calculate $p(3.1)$ itself (I'll leave the determination of error to you), we see that: $$\begin{align}2.5662 &= 2.5662 &= 2.5662\\-28.417 x &= 28.417(3.1000) &= -88.093\\28.49x^2 &= 28.49(9.6100) &= 273.79\\-9.5x^3 &= -9.5(29.791) &= 283.01\\x^4 &= 92.352 &= 92.352\end{align}$$

From here, the answer varies depending on whether you sum from low-to-high or from high-to-low (rounding to 5 digits after adding each new term). In this case, the error is a little larger if you start with the high-order terms.