Professional Documents
Culture Documents
Select one:
a. Yes I agree
b. No I do not agree
Question 2
Find the absolute backward and forward error for the following functions, where the true root is 𝑟 = 0.5 and
Correct
the approximated root is 𝑥𝑟 = 0.48 .
Mark 1.00 out
of 1.00 Fill out the following table to answer the question (use as many digits as possible)
https://www.coursehero.com/file/81041391/Assignment-2-Nonlinear-Equations-Attempt-reviewpdf/
This problem illustrates once more that computing the backward error doesn't tell us anything about the
forward error.
Reference: lecture on forward and backward errors in Lesson 2 "Solving nonlinear equations"
b. 𝑎1 = 1.5 and 𝑏 1 = 2
c. 𝑎1 = 1.263 and 𝑏 1 = 2 !
d. 𝑎1 = 1 and 𝑏 1 = 1.5
Question 4 Consider the function 𝑓(𝑥) = 3−𝑥 − 𝑥 . We apply Newton's method to find a root of this function.
Correct
If 𝑥2 = 0.5 then the value of 𝑥3 is given as
Mark 1.00 out
of 1.00
Select one:
a. -0.4554
b. 0.5965
c. 0.5473 !
d. 0.3748
Question 5 You have to solve an equation 𝑓(𝑥) = 0 with a precision below a relative error of 10−5 .
c. you have found an approximation 𝑥𝑟 to the specified precision if 𝑥𝑟 is not a multiple root
https://www.coursehero.com/file/81041391/Assignment-2-Nonlinear-Equations-Attempt-reviewpdf/
Your answer is incorrect.
The quantity |𝑓(𝑥𝑟 )| , which is the backward error, doesn't tell you anything about |𝑟 − 𝑥𝑟 | which is the
absolute error.
Similarly ∣∣ 𝑥 ∣∣ doesn't tell you anything about ∣∣ 𝑥 𝑟 ∣∣ which is the relative error you want to have below the
𝑓(𝑥𝑟 ) 𝑟−𝑥
𝑟 𝑟
specified tolerance.
Reference: lecture on backward and forward errors in Lesson 2 "Solving nonlinear equations".
The correct answer is: you can't conclude anything
Select one:
a. 0.005
b. 0.03
d. 0.0002 !
Question 7 Solve the equation 𝑥3 + 4𝑥2 − 10 = 0 using the bisection algorithm starting with 𝑎0 = 1 and 𝑏 0 = 2.0 .
Correct
Conduct three iterations (i.e. find 𝑥3 ) and report the approximation 𝑥3 of the root computed by the algorithm.
Mark 1.00 out
of 1.00 Use as many digits as possible.
Answer: 1.3125 !
Question 8 We want to apply the fixed point method to solve the equation 𝑥 = 𝑔(𝑥) .
Partially
correct
Choose among the following examples of functions 𝑔(𝑥) which will lead to a converging fixed point algorithm
whenby
This study source was downloaded using
100000834826368 from 𝑥
the intial guess 0 specified. on 11-08-2023 16:02:54 GMT -06:00
CourseHero.com
https://www.coursehero.com/file/81041391/Assignment-2-Nonlinear-Equations-Attempt-reviewpdf/
when using the intial guess 𝑥0 specified.
Mark 0.50 out
of 1.00
Select one or more:
2
a. 𝑔(𝑥) = and 𝑥0 =1
√𝑥
c. 𝑔(𝑥) = 𝑒𝑥 − 7 and 𝑥0 = −2 !
Question 9 You are using the bisection method to solve an equation with an initial guess 𝑎0 = −2.0 and 𝑏 0 = 0.5 .
Correct
It is required to find the approximation of the root with an absolute error less than 0.1
Mark 1.00 out
of 1.00 How many iteration do you have to do at least in order to reach the set precision?
Answer: 4 !
Question 10 You are implementing on a computer a numerical algorithm to solve an equation of the form 𝑓(𝑥) = 0 .
Incorrect
In order to check your algorithm you decide to test it with the function 𝑓(𝑥) = sin(𝑥) − 𝑥 .
Mark 0.00 out
of 1.00
Select one:
a. This is a valid choice for the function 𝑓(𝑥) to test the programmed algorithm "
https://www.coursehero.com/file/81041391/Assignment-2-Nonlinear-Equations-Attempt-reviewpdf/
b. This is not a good choice for the function 𝑓(𝑥) to test the programmed algorithm
Indeed 𝑟 = 0 is a root as 𝑒𝑟 − 𝑟 − 1 = 0.
Define 𝑓(𝑥) = 𝑒𝑥 − 𝑥 − 1 .
Then 𝑓 ′ (𝑥) = 𝑒𝑥 − 1 .
As 𝑓 ′ (𝑟) = 0 the root is at least a double root.
Further 𝑓 " (𝑥) = 𝑒𝑥 and 𝑓 " (𝑟) ≠ 0 . Consequently the root is a double root.
Regardless on which technique you use and which initial guess, you need to perform enough iterations until
reaching the asked precision.
For this you need in each iteration to estimate your error and check if it falls or not below the target precision.
It is recommended to go a few iterations more to double check and ideally try with more than one method to
verify the answer
https://www.coursehero.com/file/81041391/Assignment-2-Nonlinear-Equations-Attempt-reviewpdf/
𝑥𝑜 = 4
𝑥1 = 3.784361145167370
𝑥2 = 3.735379375079544
𝑥3 = 3.733083897874097
𝑥4 = 3.733079028654685
𝑥5 = 3.733079028632814
We see that in iteration 5 we have an estimated absolute error of
|𝑟 − 𝑥𝑟 | ≃ ∣∣ ′ 5 ∣∣ ≃ 4 ⋅ 10−16
𝑓(𝑥 )
𝑓 (𝑥5 )
Consequently 𝑥5 is an approximation to the root with an absolute error less than 10−12 .
How much is the backward error (give the answer with one significant digit) ? 0.4 "
How many correct significant digits contains 𝑥4 if used to estimate the root of 𝑓 ? 4 "
Based on the estimation of |𝑟 − 𝑥4 | one can immediately see how many digits in 𝑥4 are correct.
Reference: lectures on backward/forward errors and challenging problems of Lesson 2 "Solving nonlinear
equations"
https://www.coursehero.com/file/81041391/Assignment-2-Nonlinear-Equations-Attempt-reviewpdf/
Partially
correct
𝑥2 − 2𝑥𝑒−𝑥 + 𝑒−2𝑥 = 0 .
Mark 1.00 out A numerical algorithm produced the following approximation of a root 𝑟 of this equation
of 2.00
𝑥𝑟 = 0.567143470743 .
How much is the backward error (give the answer with one significant digit) ? 0.0 "
How much is the backward error (give the answer with one significant digit) ? 0.000006 !
Estimate the multiplicity of the root the algorithm is trying to approximate : 2 "
This study source was downloaded by 100000834826368 from CourseHero.com on 11-08-2023 16:02:54 GMT -06:00
https://www.coursehero.com/file/81041391/Assignment-2-Nonlinear-Equations-Attempt-reviewpdf/
Question 16 Consider the equation 2𝑥 cos(2𝑥) − (𝑥 − 2)2 = 0.
Correct
Find an approximation of it's root in [2, 3] to an absolute error less than 10−10 with one of the methods
Mark 1.00 out
covered in class.
of 1.00
Answer: 2.370686917565763 !
Regardless on which technique you use and which initial guess, you need to perform enough iterations until
reaching the asked precision.
For this you need in each iteration to estimate your error and check if it falls or not below the target precision.
It is recommended to go a few iterations more to double check and ideally try with more than one method to
verify the answer
|𝑟 − 𝑥𝑟 | ≃ ∣∣ 𝑓 ′ (𝑥4 ) ∣∣ ≃ 6 ⋅ 10−15
𝑓(𝑥 )
4
Consequently 𝑥4 is an approximation to the root with an absolute error less than 10−10 .
How much is the backward error (give the answer with one significant digit) ? 0.0002 !
https://www.coursehero.com/file/81041391/Assignment-2-Nonlinear-Equations-Attempt-reviewpdf/
𝑓(𝑥) = 2 + cos(𝑒 − 2) − 𝑒
The backward error is given by |𝑓(𝑥𝑟 )| .
A plot of 𝑦 = 𝑓(𝑥) shows that the root near 𝑥𝑟 is of multiplicity 𝑚 = 1 .
This study source was downloaded by 100000834826368 from CourseHero.com on 11-08-2023 16:02:54 GMT -06:00
https://www.coursehero.com/file/81041391/Assignment-2-Nonlinear-Equations-Attempt-reviewpdf/
Powered by TCPDF (www.tcpdf.org)