{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Homework 7 Bob 28.1

# Homework 7 Bob 28.1 - 28.1 T he results and information for...

This preview shows pages 1–3. Sign up to view the full content.

28.1) The results and information for Problem 28.1 appear in the following order: evaluation of the binomial without expansion; the evaluation of the polynomial generated from expanding the binomial; the graph of the outputs; numerical outputs; error findings; and, finally, error analysis. >> f1 = inline('(x-2).^9','x') f1 = Inline function:5 f1(x) = (x-2).^9 >> x=1.92:.001:2.08; >> y1=f1(x); >> plot(x,y1,'blue') >> f2 = inline('x.^9 - 18.*x.^8 + 144.*x.^7 - 672.*x.^6 + 2016.*x.^5 - 4032.*x.^4 + 5376.*x.^3 - 4608.*x.^2 + 2304.*x - 512','x') f2 = Inline function: f2(x) = x.^9 - 18.*x.^8 + 144.*x.^7 - 672.*x.^6 + 2016.*x.^5 - 4032.*x.^4 + 5376.*x.^3 - 4608.*x.^2 + 2304.*x - 512 >> y2=f2(x); >> hold on >> plot(x,y2,'red') In theory the graphs should be the same however in practice errors arise as the topic of the chapter implies. A comparison of the output for y1 and y2 can be found in the lists on the following pages. Y1 is in the left column and y2 is in the right. An examination of the graphs and two columns of data will indicate that y1 follows a smooth progression while y2 has fluctuations both positive and negative in respect to y1. Both methods of the calculation return 0 for f(2)

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
>> f1(2) ans = 0 >> f2(2) ans = 0 Output of the two methods of calculations >> y1 y1 = 1.0e-009 * Columns 1 through 7 -0.1342 -0.1199 -0.1069 -0.0952 -0.0846 -0.0751 -0.0665 Columns 8 through 14 -0.0589 -0.0520 -0.0458 -0.0404 -0.0355 -0.0311 -0.0272 Columns 15 through 21 -0.0238 -0.0207 -0.0180 -0.0156 -0.0135 -0.0117
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 7

Homework 7 Bob 28.1 - 28.1 T he results and information for...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online