Consider the following system of nonlinear equations X1 X2 x3 = cos(x1) 81 sin (23) 3...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following system of nonlinear equations X1 X2 x3 = cos(x1) 81 sin (23) 3 + sin(x₁) cos(x3) 3 3 cos(x1) X2 sin (F3) + 9 3 6 + Perform three iterations by hand of successive substitution (using the obvious x = g(x) equations already given) starting from x = [1 1 1]. Compute the error relative to the exact solution x = [0 1/3 0]. • Problem 2 (2 points) Perform by hand three iterations by hand of the Newton-Raphson method to solve the same system of Problem 1, again starting from x = [1 1 1]. Compute the error relative to the exact solution. Which method performs better? Explain your answer. • Problem 3 (2 points) Solve the system of Problem 1 using a Python program: 1. Write a Python code to perform the successive iteration of Problem 1. Execute the iteration until the change in the norm of the solution relative to the previous iteration falls below = 1 x 10-4 (that is, until ||x(+¹)x(k)||/x(k)|| <e). Report the solution to the system and how many iterations it took for the method to converge. Turn in the Python code for your successive substitution implementation, and the screen output of the code. 2. Use the function scipy.optimize.fsolve to solve the system of Problem 1. Use the argument xtol to set the tolerance on the relative change in the norm of the solution to 1 x 10-4. This will allow a comparison with your successive substitution code. Report the solution and the number of function evaluations. Turn in your code. Which of the two codes converged faster? • Bonus problem (2 points): Prove that the Newton-Raphson method for solving a system of nonlinear equations converges in one iteration when the equations are linear (Hint: consider f(x) = Ax-b=0), assuming A is nonsingular. Please recall that a single example does not constitute a proof. Consider the following system of nonlinear equations X1 X2 x3 = cos(x1) 81 sin (23) 3 + sin(x₁) cos(x3) 3 3 cos(x1) X2 sin (F3) + 9 3 6 + Perform three iterations by hand of successive substitution (using the obvious x = g(x) equations already given) starting from x = [1 1 1]. Compute the error relative to the exact solution x = [0 1/3 0]. • Problem 2 (2 points) Perform by hand three iterations by hand of the Newton-Raphson method to solve the same system of Problem 1, again starting from x = [1 1 1]. Compute the error relative to the exact solution. Which method performs better? Explain your answer. • Problem 3 (2 points) Solve the system of Problem 1 using a Python program: 1. Write a Python code to perform the successive iteration of Problem 1. Execute the iteration until the change in the norm of the solution relative to the previous iteration falls below = 1 x 10-4 (that is, until ||x(+¹)x(k)||/x(k)|| <e). Report the solution to the system and how many iterations it took for the method to converge. Turn in the Python code for your successive substitution implementation, and the screen output of the code. 2. Use the function scipy.optimize.fsolve to solve the system of Problem 1. Use the argument xtol to set the tolerance on the relative change in the norm of the solution to 1 x 10-4. This will allow a comparison with your successive substitution code. Report the solution and the number of function evaluations. Turn in your code. Which of the two codes converged faster? • Bonus problem (2 points): Prove that the Newton-Raphson method for solving a system of nonlinear equations converges in one iteration when the equations are linear (Hint: consider f(x) = Ax-b=0), assuming A is nonsingular. Please recall that a single example does not constitute a proof.
Expert Answer:
Answer rating: 100% (QA)
For Problem 3 you can solve the system of equations using Python and the SciPy library Heres an outl... View the full answer
Related Book For
Numerical Methods With Chemical Engineering Applications
ISBN: 9781107135116
1st Edition
Authors: Kevin D. Dorfman, Prodromos Daoutidis
Posted Date:
Students also viewed these programming questions
-
The Houston Rockets were recently sold for $2.2B to casino magnate Tilman Fertitta. Consider the information in the following table and answer the questions below based on this information. Houston...
-
A married decedent died intestate leaving behind P 1,500,000 of his separate property and P6,000,000 common properties with his surviving spouse. If he has three children and one illegitimate child,...
-
Use the data in Exercise 13.28.To familiarize yourself with recursive least squares, estimate the savings functions for 19701981, 19701985, 19701990, and 19701995. Comment on the stability of...
-
What are the four basic requirements for an oil or natural gas field?
-
Find the equation of the indicated curve, subject to the given conditions. Sketch each curve. Ellipse: center (0, 0), passes through (0, 3) and (2, 1)
-
Stars come in different colors depending on their surface temperatures (see Chapter 29). But when you look up at a starry night sky, all the stars look like they are the same color. Why?
-
Using the information is problem 13.3, develop plan B. Produce at a constant rate of 1,400 units per month, which will meet minimum demands. Then use subcontracting, with additional units at a...
-
Who should decide the compensation packages of executives of publicly traded companies? How should the decision on the compensation packages be made? In your response, make sure you comment on the...
-
Whole parsley - buttered potatoes have been suggested as a menu item. The following products are available. Calculate the cost of 1 pound edible product for each item. In addition to cost, what...
-
Given Find the derivative R' (t) and norm of the derivative. R' (t) = ||R' (t)|| Then find the unit tangent vector T(t) and the principal unit normal vector N(t) T(t) = N(t) = 5t 5t R(t) = est...
-
Discuss the mechanisms and algorithms employed in disk scheduling within operating systems to optimize I/O performance. How do approaches like FCFS (First-Come, First-Served), SSTF (Shortest Seek...
-
Explain what is meant by internal and external environments. Provide examples by Opsens company.
-
Over 7 years ago your company built a restaurant in New London, Connecticut. It was completed in 2016 with a total cost of $4,940,000. You were awarded a contract for a similar restaurant (almost...
-
Assume a 10% discount rate. Which among the choices below have the highest value, A or B, if any? Show work. A.$1,000 per year for perpetuity (first payment at the end of the first period). B.$10,000...
-
Consider the ultimatum game: The proposer offers a split of $10 between himself and the respondent. The proposer can choose any split (x, 10 x), where x [0, 10] is the amount the respondent gets...
-
1. As activity changes, total variable cost increases or decreases proportionately with the activity change, but unit variable cost remains the same. true or false 2, Another term for product cost is...
-
In your audit of Garza Company, you find that a physical inventory on December 31, 2012, showed merchandise with a cost of $441,000 was on hand at that date. You also discover the following items...
-
Solve the unsteady diffusion equation subject to boundary conditions c(0, t) = 1 and c/x = 0 at x = 1. The initial condition is given by the piecewise function You should also provide the physical...
-
Compute the following sums using base 10 and the indicated mantissa: (a) 12.4235 + 0.2134 with a 3 bitmantissa (b) 1.029439 + 4.3284 with a 2 bitmantissa (c) 4.532938 + 0.004938 with a 5 bit mantissa
-
Consider the method of lines solution to the unsteady diffusion equation subject to an initial condition c = 1 and first-order depletion reactions on each boundary, n J = kc, where n is an outward...
-
Renaldo borrows $8,000 from his aunt today to help pay for college expenses. He agrees to repay the loan according to the following schedule, at a rate of 6 percent/year compounded annually. a. Draw...
-
Ken loans his grandson Rex $20,000 at 5.5 percent per year to help pay for executive chef schooling in Florida. Rex requires 3 years of schooling before beginning to earn a salary. He agrees to pay...
-
An investment has the following cash flow series where interest is 8 percent a. Determine the present worth of the series. b. Determine the future worth of the series at the end of year 8. c. Find...
Study smarter with the SolutionInn App