Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Q2. (Root finding) Solve the following equations by python codes. 1. Consider the nonlinear equation: 24 + 7x3 + 2x ++1=0. Firstly, plot the functions
Q2. (Root finding) Solve the following equations by python codes. 1. Consider the nonlinear equation: 24 + 7x3 + 2x ++1=0. Firstly, plot the functions fi(x)= x4 + 723 + 2x2 + x +1 and f2(x) = 0 by matplotlib. The suggested range for x is from 7 to 2. From the plot, find the approximate roots. Secondly, try different initial guesses and find all the roots to the equation by scipy.optimize.root(). You can check the solutions with the approximate roots observed from the plot. 2. Consider the nonlinear equation: 1 sin Firstly, plot the functions fi(x) = sin x and f2(x) = 1/x by matplotlib. The suggested range for z is from 0.1 to 20. From the plot, find the approximate roots. Secondly, try different initial guesses and find all the roots to equation in the range ze [0.1, 20) by scipy.optimize.root(). You can check the solutions with the approximate roots observed from the plot 3. Consider the system of nonlinear equations: ry = 10 22 + y2 = 36 Firstly, plot the two functions by matplotlib. The suggested range is 2 (-7, 7), y (-7, 7). From the plot, find the approximate roots. Secondly, try different initial guesses and find all the roots to the equation by scipy.optimize.root(). You can check the solutions with the approximate roots observed from the plot. (10 + 10 + 10 marks)
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