Matematiska vetenskaper, Chalmers Tekniska Högskola och Göteborgs Universitet

[hem, vecka 1, vecka 2, vecka 3, vecka 4, vecka 5, vecka 6, vecka 7]

ALA-A, studio3.2, 2006

The bisection algorithm 1.

1. Write a program for the bisection algorithm according to the template bisect.m. First do only the "main task".

2. Use the program to compute all roots of the following equations. Hint: write the equation in the form f(x)=0, then plot the function to get a rough idea of where the roots are.

(a) x2=2

(b) x4=2

(c) x2-4x+8=0

(d) sin(x)=0

(e) cos(x)=x

(f) 11x3 - 2x2 - 77x + 14=0

(g) An equation of your own, or from Adams.

3. Now do the "extra tasks 1, 2, 3". Find examples of equations to test the program.

/stig