Procedure Write a MATLAB code to: 1-plot the graph of the function f(x)=f(x) = x +...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Procedure Write a MATLAB code to: 1-plot the graph of the function f(x)=f(x) = x³ + 4x² - 10 = 0. Plot the function in the interval [0,5]. 2.Find a root of the function using x1=1. Perform the iterations of the Newton-Raphson method. Solution: 1- 2 3 4 5- 6 ROOT FINDING USING NEWTON-RAPHSON METHOD 789GAG 10 11 - 12- clear clc first step: plot the function x=0:0.05:4; f=@ (x) (x.^3) + (4* (x.^2)) -10; plot (x, f(x)); grid tol=0.0001; n = 0; 13- while abs (f (x1)) > tol 14 15 16 17 18 19 20 21 % Second step: Compute the value of x root fd=@ (x) (3* (x.^2)) + (8*x); x1=1; f1=f(x1); f1d=fd (x1); x2=x1-(f1/fld); f2=f(x2); x1=x2; n = n + 1; fprintf('%9.6f %13.6f %13.6f\n', n, x2, f2) end 3- Repeat steps 1 and 2 using the function of derivative in MATLAB (diff). Procedure Write a MATLAB code to: 1-plot the graph of the function f(x)=f(x) = x³ + 4x² - 10 = 0. Plot the function in the interval [0,5]. 2.Find a root of the function using x1=1. Perform the iterations of the Newton-Raphson method. Solution: 1- 2 3 4 5- 6 ROOT FINDING USING NEWTON-RAPHSON METHOD 789GAG 10 11 - 12- clear clc first step: plot the function x=0:0.05:4; f=@ (x) (x.^3) + (4* (x.^2)) -10; plot (x, f(x)); grid tol=0.0001; n = 0; 13- while abs (f (x1)) > tol 14 15 16 17 18 19 20 21 % Second step: Compute the value of x root fd=@ (x) (3* (x.^2)) + (8*x); x1=1; f1=f(x1); f1d=fd (x1); x2=x1-(f1/fld); f2=f(x2); x1=x2; n = n + 1; fprintf('%9.6f %13.6f %13.6f\n', n, x2, f2) end 3- Repeat steps 1 and 2 using the function of derivative in MATLAB (diff).
Expert Answer:
Answer rating: 100% (QA)
Solution Plotting the Function First we need to plot the function fx x3 4x 10 0 To do this we can us... View the full answer
Posted Date:
Students also viewed these computer engineering questions
-
2. A factory is trying to decide between two machines which are necessary in their manufacturing facility. Data concerning the two machines are presented below. If this factory has a minimum...
-
Write 3 reflections/artifacts essays on three different pieces. Reflective writing is writing that is formal or informal about a subject matter after it has been presented in literature or other...
-
I need to record a $100,000 investment, 3 energy bills of about $800 each, buy 2 trucks ($1000 each) and show straight line depreciation over 3 months, and show how to record when customers use my...
-
Q1. During November, these transactions took place in Singer Inc., a company that uses job order costing: a) Materials purchased on account $35,600. b) Materials issued to fill requisitions on job...
-
See Table 2.5 showing financial statement data and stock price data for Mydeco Corp. a. What is Mydecos market capitalization at the end of each year? b. What is Mydecos market-to-book ratio at the...
-
The Happy Puppy Company has compiled the following data for adding a new line of pets to their stores. What NPV is calculated using this method? The initial investment in the project is $45,000. The...
-
Would you advise a startup to seek debt financing? If yes, could it get it?
-
A parent company is a producer of production equipment, some of which is acquired and used by the parents subsidiary companies. The parent offers a discount to the subsidiaries but still earns a...
-
the indicated corner view in the space provided. 32 2 Show Transcribed Text Sketch the indicated corner view in
-
Block C starts from rest and moves down with a constant acceleration. Knowing that after block A has moved 0.5 m its velocity is 0.2 m/s, determine(a) The accelerations of A and C,(b) The velocity...
-
Simplify the following expression for p: -)-(-3) -(1- p) = 1 3
-
A mass (m = 4.31kg) is connected to a spring (k = 182.4N/m) on the surface of a horizontal, frictionless table and constrained to move in the j direction (gravity is pointed in the k direction). When...
-
The year ended 3 0 June 2 0 2 3 : 1 . Contributed equity on 1 July 2 0 2 2 consisted of 1 million ordinary shares fully paid to $ 2 each . Other equity account balances on 1 July 2 0 2 2 were:...
-
On 1 5 April 2 0 2 1 , Growth Realty Ltd purchased a piece of equipment worth $ 2 0 0 , 0 0 0 by accepting a 6 - month discounted bank bill. The bill has a face value of $ 2 0 9 , 0 0 0 and is due...
-
You were recently hired as a Dining Room Manager for a new fine dining restaurant that is expected to be opened in two months. This restaurant will only be opened for dinner from 6pm-11pm. It will...
-
Three charges are located at the vertices of a right isosceles triangle as shown below. What is the magnitude and direction of the resultant electric field at the midpoint M of AC? C +10 5cm B +2 M...
-
DL Chapter 6 Assignment - ACCT-2302 2803 1 Principles.... C CengageNOWv2 | Onl Happy Trails has the following information for its manufacturing: Direct Materials $15 Direct Labor $14 Variable...
-
Find the area of the surface generated by revolving the para- metric curve x = cos 1, y = sin? 1 (0 < I sa/2) about the y-axis.
-
What is the value of a call option if the underlying stock price is $20, the strike price is $22, the underlying stock volatility is 50 percent, and the risk-free rate is 4 percent? Assume the option...
-
Assume Polands currency (the zloty) is worth $.17 and the Japanese yen is worth $.008. What is the cross rate of the zloty with respect to yen? That is, how many yen equal a zloty?
-
Utah Banks bid price for Canadian dollars is $.7938 and its ask price is $.81. What is the bid/ask percentage spread?
Study smarter with the SolutionInn App