{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

ma2214kse1

# ma2214kse1 - Key to QuickCheck Exercises#1 1(a Solutions of...

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

Key to QuickCheck Exercises #1 1. (a) Solutions of x^3 - 6x^2+11x-6 =0. Using Matlab's "roots" facility: >> roots([1 -6 11 -6]) ans = 3.000, 2.000, 1.000 . (b) We use Newton's method starting at x_0=1. Note that it is not necessary to index the successive iterates in MATLAB. >> x=1; >> x=x-(x^3-6*x^2+11*x-5)/(3*x^2-12*x+11) x = 0.5000 >> x=x-(x^3-6*x^2+11*x-5)/(3*x^2-12*x+11) x = 0.6522 >> x=x-(x^3-6*x^2+11*x-5)/(3*x^2-12*x+11) x = 0.6748 >> x=x-(x^3-6*x^2+11*x-5)/(3*x^2-12*x+11) x = 0.6753 >> x=x-(x^3-6*x^2+11*x-5)/(3*x^2-12*x+11) x = 0.6753 At this point we stop because we have two successive iterates which agree to four decimal places. 2. The first works; the others do not. The reason is that the derivative of the right hand side in the first case, i.e., -(3*x^2-12*x)/11, is less than 1 near x=1 whereas that is not true for the right hand sides of ii) and iii). 3. Newton's method for solving for y in terms of x takes the form y_{k+1} = y_k - (y_k^4 + x*y_k + x^2 - 1)/(4*y_k^3 + x). We take x = .1, y_0 = 1. Thus >> x= .1;

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

View Full Document
>> y=1; >> y = y-(y^4+x*y+x^2-1)/(4*y^3+x) y = 0.9732 >> y = y-(y^4+x*y+x^2-1)/(4*y^3+x)
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern