Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Problem 1: Write a Newton-Raphson function in Matlab that can solve nonlinear equations. Your Newton-Raphson function should also output the number of iterations needed to
Problem 1: Write a Newton-Raphson function in Matlab that can solve nonlinear equations. Your Newton-Raphson function should also output the number of iterations needed to obtain the results. Note: You may not be able to find a solution within the prescribed iterations/tolerance. In that case your code can issue a warning and return an empty variable (i.e. output -[) Use your function to solve the following nonlinear equations: a) Single root f (x)x3- 3 -0 b) Multiple roots f(x)-x4163 3 731 82573451 594 2 297 Try different initial guesses and you should be able to find more than one roots. If you choose appropriate initial guesses then you can find four different roots! c) System of equations fi (x,y,z)-3x - cos(yz) -- f2 (x, y, z)-X2-81(y + 0.1)2 + sin2+ 1.062 0 f3 (x, y, z) = exp(-xy) + 20z + 10-3 0 Take initial guess as 0.1 0.1 0.1 Submit your matlab code together with the outputs you got for different cases. Problem 1: Write a Newton-Raphson function in Matlab that can solve nonlinear equations. Your Newton-Raphson function should also output the number of iterations needed to obtain the results. Note: You may not be able to find a solution within the prescribed iterations/tolerance. In that case your code can issue a warning and return an empty variable (i.e. output -[) Use your function to solve the following nonlinear equations: a) Single root f (x)x3- 3 -0 b) Multiple roots f(x)-x4163 3 731 82573451 594 2 297 Try different initial guesses and you should be able to find more than one roots. If you choose appropriate initial guesses then you can find four different roots! c) System of equations fi (x,y,z)-3x - cos(yz) -- f2 (x, y, z)-X2-81(y + 0.1)2 + sin2+ 1.062 0 f3 (x, y, z) = exp(-xy) + 20z + 10-3 0 Take initial guess as 0.1 0.1 0.1 Submit your matlab code together with the outputs you got for different cases
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started