Root Finding Algorithms Homework Assignment for ME 2016, Fall Semester 2007 - Prof. Marc S, Assignments of Computer Science

Information about a root finding algorithms homework assignment for the me 2016 course during the fall semester 2007. Students are required to explore the properties of different root finding algorithms, including the bisection algorithm and the newton raphson algorithm, through the use of an interactive java applet. The learning objectives of the assignment include understanding the properties of different root finding algorithms, recognizing features of interest in equations, and selecting the best algorithm for solving a particular equation. The assignment includes tasks such as solving a root finding problem with pencil and paper, analyzing errors, and interpreting results from the interactive applets.

Typology: Assignments

Pre 2010

Uploaded on 08/04/2009

koofers-user-bzi-1
koofers-user-bzi-1 🇺🇸

9 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Page 1
ME 2016 Sections
Fall Semester 2007
Computing Techniques 3-0-3
Homework Assignment 3
Root Finding Algorithms
Due: Friday, September 14, 2007 on the hour before class
Description and Outcomes
In this assignment, you will explore the properties of different root-finding algorithms. Since
we studied three different root finding algorithms, it is important that you learn about their
properties so that you know when to use which algorithm. In this assignment, you will end up
solving the algorithm for a very large number of problems through the use of an interactive Java
applet that was developed specifically for this course. By applying the algorithms to functions
with different shapes, you will learn for which types of functions you should use which type of
algorithm. Unfortunately, there is no “one-size-fits-all” in this case!
The learning objectives of this assignment are:
to learn about the properties of different root-finding algorithms
to learn to recognize features of interest in the equations you are solving
to learn how to select the best algorithm for solving a particular equation
to develop as an independent learner by exploring root finding algorithms interactively
Background
The background for this assignment can be found in Chapter 5 of Chapra and Canale. Make sure
to review this chapter and your lecture notes BEFORE you start solving the problems!
Tasks
Task 1: Solve a Root Finding problem with pencil and paper
Consider the following equation:
2sin( ) 5
x
ex=+
With pencil and paper, solve for x in this equation using two different methods:
1) The bisection algorithm starting from an initial bracket of [0,1]. For each iteration,
compute the absolute approximate error. Stop after iteration 3 (i.e., include iterations
0 through 3).
2) The Newton Raphson algorithm starting from an initial guess of x=1. For each
iteration, compute the absolute approximate error. Stop after iteration 3 (i.e., include
iterations 0 through 3).
As previously, organize your computations in table form (a separate table for each
algorithm). For this task, no electronic submission is required.
Task 2: Error Analysis
Based on the errors computed in Task 1, verify the equations that we derived in class for
the errors of the bisection and Newton Raphson algorithms:
For Bisection: 0
2
n
an
x
E
Δ
=
For Newton Raphson: 2
,1 ,
()
2()
r
ti ti
r
fx
E
E
fx
+
=
Compare the values predicted by these equations with your calculation in Task 1.
pf3
pf4

Partial preview of the text

Download Root Finding Algorithms Homework Assignment for ME 2016, Fall Semester 2007 - Prof. Marc S and more Assignments Computer Science in PDF only on Docsity!

ME 2016 Sections

Fall Semester 2007

Computing Techniques 3-0-

Homework Assignment 3

Root Finding Algorithms

Due: Friday, September 14, 2007 on the hour before class

Description and Outcomes

In this assignment, you will explore the properties of different root-finding algorithms. Since we studied three different root finding algorithms, it is important that you learn about their properties so that you know when to use which algorithm. In this assignment, you will end up solving the algorithm for a very large number of problems through the use of an interactive Java applet that was developed specifically for this course. By applying the algorithms to functions with different shapes, you will learn for which types of functions you should use which type of algorithm. Unfortunately, there is no “one-size-fits-all” in this case!

The learning objectives of this assignment are:

  • to learn about the properties of different root-finding algorithms
  • to learn to recognize features of interest in the equations you are solving
  • to learn how to select the best algorithm for solving a particular equation
  • to develop as an independent learner by exploring root finding algorithms interactively

Background

The background for this assignment can be found in Chapter 5 of Chapra and Canale. Make sure to review this chapter and your lecture notes BEFORE you start solving the problems!

Tasks

Task 1: Solve a Root Finding problem with pencil and paper Consider the following equation:

e^2^ x = sin( ) x + 5

With pencil and paper, solve for x in this equation using two different methods:

  1. The bisection algorithm starting from an initial bracket of [0,1]. For each iteration, compute the absolute approximate error. Stop after iteration 3 (i.e., include iterations 0 through 3).
  2. The Newton Raphson algorithm starting from an initial guess of x= 1. For each iteration, compute the absolute approximate error. Stop after iteration 3 (i.e., include iterations 0 through 3). As previously, organize your computations in table form (a separate table for each algorithm). For this task, no electronic submission is required.

Task 2: Error Analysis Based on the errors computed in Task 1, verify the equations that we derived in class for the errors of the bisection and Newton Raphson algorithms:

For Bisection:

0

2

n a (^) n

x E

For Newton Raphson: (^) , 1 2 ,

r t i t i r

f x E E f x

Compare the values predicted by these equations with your calculation in Task 1.

Task 3: Interpretation Questions related to Tasks 1 and 2 3.1) For each algorithm, describe in words how the absolute approximate error changes from one iteration to the next. 3.2) Which of the two methods converges most quickly? Will this always be the case? 3.3) You may find slightly different values than the ones predicted by the equations. Explain why.

Task 4: Interactive Exploration of the Bisection Algorithm In a web-browser, open the interactive learning tool at the following URL: http://www.srl.gatech.edu/education/ME2016/NumMeth/Bisection. This is a newly developed Java applet that lets you explore how the Bisection algorithm works. It has been tested quite extensively, but as you know, according to Murphy’s law, if something can go wrong, it will. Therefore, if you have problems, make sure to send us e-mail right away. A few things you will have to pay attention to are:

  • You must run the latest version of the Java run-time environment. A hyperlink for downloading this version is included at the top of the web-page.
  • The web-site has only been tested with Internet Explorer. If you have problems with other browsers, then use IE for this assignment. As part of this homework assignment, you are asked to reply to question 2, 3, and 4 in the “Learn by Exploring” section at the bottom of the web-page. In your report, include screenshots as needed to support your answers. You can capture a screenshot by typing Alt-PrintScreen and then using Paste in your Word document (as I did for the figure below).

Collaboration

We would like to re-emphasize the policy on collaboration. Collaboration is encouraged. Discussing the assignments with your peers will help you to develop a deeper understanding of the material. However, “discussing the assignment” does not mean solving it together; it does not mean asking your friend to debug your code for you. I encourage you to discuss how to approach the problem, which Matlab functions to use, or how to interpret the results, but I do expect each student to turn in a report and Matlab functions that reflect the student’s individual work. Do not copy code from another student. Do not copy parts of other electronic documents. In general, an activity is acceptable if it promotes learning by you and your peers. For example, you learn from discussing alternate solution approaches with your friend, but you don't learn from blindly copying your friend's code. To avoid any confusion, each homework solution should explicitly identify the students with whom you collaborated and what the extent of the collaboration was. Any copying on homework and/or exams will be dealt with severely and reported to the Dean of Students – No exceptions. If you have questions about this collaboration policy, do not hesitate to ask your instructor.