Docsity

ME 2016 Computing Techniques: Root Finding & Taylor Series Approx., Exams of Computer Science

Toggle sidebar
bg1
Page 1
ME 2016 Section A-C
Fall Semester 2006
Computing Techniques 3-0-3
Midterm Exam 1
Wednesday, September 20, 2006
Section:
Name and email address:
READ THIS FIRST
This exam is a fifty-minute exam (the entire class period). The exam is closed book and
closed notes. A non-graphing pocket calculator can be used. You are on your honor not to
consult with your classmates. Cheating will not be tolerated and will result in immediate
and strict action.
Please feel free to use any pictures, graphs, flow charts, code fragments, or written comments in
describing your understanding of the problems and their solutions. Be sure to clearly state any
assumptions or conditions regarding the solution. Please write all of your answers on these
sheets. You may use the back of the paper if necessary. A total of 100 points are awarded.
An equation sheet is included on the last page of this exam.
Honor Code Statement:
My signature below indicates that I have read the above text. On my honor, I pledge that I have
neither given nor received inappropriate aid in the preparation of this examination. I also pledge
that I have not spoken with any students who have previously taken the ME 2016 exam today.
Further, I will not discuss this exam with any other student taking ME 2016 this semester who
has not yet taken the exam until after all the exams have been given (5PM on the day of the
exam).
Signature: _____________________________________________________________
Question Maximum Score Student’s Score
1 – True or False 10
2 – Short question 1 10
– Short question 2 10
– Short question 3 10
3 – Root Finding: False Position 10
4.1 – Root Finding: Criteria 10
4.2 – Root Finding: Comparison 15
4.3 – Root Finding: Conclusion 5
5 – Matlab Function 20
TOTAL 100
pf3
pf4
pf5
pf8
pf9

Partial preview of the text

Download ME 2016 Computing Techniques: Root Finding & Taylor Series Approx. and more Exams Computer Science in PDF only on Docsity!

ME 2016 Section A-C

Fall Semester 2006

Computing Techniques 3-0-

Midterm Exam 1

Wednesday, September 20, 2006

Section:

Name and email address:

READ THIS FIRST

This exam is a fifty-minute exam (the entire class period). The exam is closed book and closed notes. A non-graphing pocket calculator can be used. You are on your honor not to consult with your classmates. Cheating will not be tolerated and will result in immediate and strict action.

Please feel free to use any pictures, graphs, flow charts, code fragments, or written comments in describing your understanding of the problems and their solutions. Be sure to clearly state any assumptions or conditions regarding the solution. Please write all of your answers on these sheets. You may use the back of the paper if necessary. A total of 100 points are awarded.

An equation sheet is included on the last page of this exam.

Honor Code Statement:

My signature below indicates that I have read the above text. On my honor, I pledge that I have neither given nor received inappropriate aid in the preparation of this examination. I also pledge that I have not spoken with any students who have previously taken the ME 2016 exam today. Further, I will not discuss this exam with any other student taking ME 2016 this semester who has not yet taken the exam until after all the exams have been given (5PM on the day of the exam).

Signature: _____________________________________________________________

Question Maximum Score Student’s Score

1 – True or False 10

2 – Short question 1 10

  • Short question 2 (^10)
  • Short question 3 (^10)

3 – Root Finding: False Position 10

4.1 – Root Finding: Criteria 10

4.2 – Root Finding: Comparison 15

4.3 – Root Finding: Conclusion 5

5 – Matlab Function 20

TOTAL 100

Question 1: True or False (10 points; 2 points each)

Circle True or False. If False, briefly explain your reasoning

  1. There is only a finite number of floating point numbers that can be represented by a digital computer.

True / False

  1. If, for a given bracket and continuous function, the bisection method converges, then the false position method for root-finding converges also.

True / False

  1. Consider the following two datasets of temperatures measured in Atlanta at noon on Sept 3,

a) 80 °F, 83 °F, 81 °F, 80 °F, 82 °F, 82 °F, 84 °F b) 85 °F, 83 °F, 87 °F, 89 °F, 91 °F, 82 °F, 88 °F Since the true temperature was 86.5 °F, dataset b is most precise.

True / False

  1. Given that a quantity is accurate to s significant digits, one can estimate the true relative error of that quantity.

True / False

  1. When developing a new model, scientists or engineers should prove that is correct by gathering sufficient experimental data.

True / False

Question 3: Root Finding – False Position (10 points)

Apply the False Position method to find the root of 3

f ( ) x = 20 − x − x in the interval [0,3] (use

this interval as your initial bracket). Clearly show (in a table) the first three iterations.

Question 4: Root Finding (30 points)

Assume that you are asked to compute the root of the function illustrated in the figure below. If you had to choose between bisection, false-position and Newton-Raphson, which method would you choose? You can assume that you know that there is a root in the interval [-4,6] and that the function is continuous. Provide a detailed justification for your choice by answering the questions below.

-4 -3 -2 -1 0 1 2 3 4 5 6

0

5

10

15

20

x

f(x)

Question 4.1 (10 points): What criteria would you use to identify which root finding algorithm

is best in this situation? Name the two criteria that you think are most important.

Question 5: Writing a Matlab Function (25 points)

For x < 1 , the Maclaurin Series (i.e., a Taylor series evaluated at a= 0) of

ln( ) 1

x x

is:

3 5 2 1 1

i i

f x x x x x i

∞ − =

Write a Matlab function that computes this Maclaurin approximation such that the absolute approximate error is less than Ea_desired. The function must have two inputs (a scalar x and a scalar Ea_desired ) and one output, a scalar f(x).

You can use any existing Matlab functions in your implementation. Make sure to adhere to good style practices. To save time, I have already included the block of comments that are typically included at the beginning of a Matlab function.

%MACLAURIN approximates log(1+x/1-x) using the MacLaurin series expansion % % (this section is skipped to avoid giving away part of the solution) % % Inputs: % X: a scalar with -1 < X < 1 % EA_DESIRED: a scalar with the desired approximate error % % Output: % FX: a scalar containing the MacLaurin approximation % % Assumptions: % - the input is inside the interval (-1,1) % - the desired approximate error is strictly positive