ECH 3128 Numerical Method and Optimisation Process
Tutorial 1
Question 1 (Test 2021/2022)
You are working for a start-up chemical fertilizers company and have been asked to determine the minimum number of chemical fertilizers that the shop will have to sell to make a profit. The equation that gives the minimum number of chemical fertilizers to be sold after considering the total costs and the total sales is 𝒇𝒇(𝒏𝒏) = 𝟒𝟒𝟒𝟒 𝒏𝒏𝟏𝟏.𝟓𝟓 − 𝟖𝟖𝟖𝟖𝟖𝟖𝟖𝟖 + 𝟑𝟑𝟑𝟑𝟑𝟑𝟑𝟑𝟑𝟑 = 𝟎𝟎 a) Use the secant method of finding roots of equations to evaluate the minimum number of computers that need to be sold to make a profit. Conduct three iterations to estimate the root of the above equation. Find the absolute relative approximate error at the end of each iteration. b) Your manager wants to see the comparison of your output between the secant method and the calculation using any open root findings method of your choice. Show at least 3 iterations of calculation. For the calculations, use at least 5 significant figures for better accuracy. Discuss and compare your result for the manager. Include output from the built-in function in the Matlab too.
Question 2 (Test 2020/2021)
Solve the following nonlinear equation 𝑓𝑓(𝑥𝑥) = 𝑥𝑥𝑒𝑒 2𝑥𝑥 − 1 using the a) Bisection method. b) Secant method with 𝑥𝑥0 = 0 and 𝑥𝑥1 = 1 Calculate five iterations with approximate relative error. Compare the results with Fzero function in Matlab.
Question 3 (MATLAB exercise - Polynomials)
a) Determine the roots for these polynomials: i) 𝑓𝑓(𝑥𝑥) = −2𝑥𝑥 6 − 1.5𝑥𝑥 4 + 10𝑥𝑥 + 2 ii) 𝑓𝑓(𝑥𝑥) = 8𝑥𝑥 6 + 5𝑥𝑥 5 − 1.5𝑥𝑥 4 − 2𝑥𝑥 3 + 9𝑥𝑥 2 + 10𝑥𝑥 + 2 b) using the roots determine in part (a), construct the polynomial again using built-in function in Matlab.