170 – Homework 2

This set is due Friday, March 8, at the beginning of lecture.

  • Solve problem 2 from Chapter 7. In each case, use the bisection method to approximate within 0.01 a value of x for which we have f(x)=0. Recall that in the bisection method, at each stage we have an interval {}[a,b] and we know that a<x<b and f(a)<0<f(b) (or f(b)<0<f(a)). We let c be the midpoint of the interval. If f(c)=0, we let x=c and we are done. More likely, either f(c)<0, and we have c<x<b, our new interval is {}[c,b], and we iterate the process, or 0<f(c), and we have a<x<c, our new interval is {}[a,c], and we iterate the process.
  • Solve problem 3 from Chapter 7. As before, approximate x within 0.01.
  • Find the first few convergents to \sqrt5, and use them to find \sqrt5 within 0.0001. Recall that the convergents of \sqrt5 are obtained by the following process:

Define a_0,a_1,a_2,\dots so that: a_0 is the largest integer below \sqrt5. Let t_1=1/(\sqrt5-a_0), and let a_1 be the largest integer below t_1. Let t_2=1/(t_1-a_1), and let a_2 be the largest integer below t_2. Let t_3=1/(t_2-a_2), and let a_3 be the largest integer below t_3, etc.

The first convergent to \sqrt5 is the number a_0. The second convergent is \displaystyle a_0+\frac1{a_1}. The third convergent is \displaystyle a_0+\frac1{a_1+\frac1{a_2}}. Etc.

The number \sqrt5 is sandwiched between the convergents, in the sense that it is larger than the first, smaller than the second, larger than the third, smaller than the fourth, etc.

  • Approximate \sqrt2 following the following algorithm: Let x_0 be an arbitrary number that you choose, presumably not too far from \sqrt2. Given x_n, we define a new approximation x_{n+1} by the formula \displaystyle x_{n+1}=\frac{1}{x_n}+\frac{x_n}{2}. Check with the help a calculator that these numbers approach \sqrt2 very quickly. Use this to find the first 10 digits of \sqrt2.
  • Extra credit problem: Why does the algorithm of the last problem work?
Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: