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...
-
Assume that X is a hyper-geometric random variable with N = 25, S = 3, and n = 4. Calculate the following probabilities. a. P(X = 0) b. P(X = 1) c. P(X 1)
-
A sinusoidal transverse wave of amplitude ym and wavelength travels on a stretched cord. (a) Find the ratio of the maximum particle speed (the speed with which a single particle in the cord moves...
-
Comparative stockholders' equity sections from two successive years of balance sheets from Farrow, Inc., are as follows: No dividends were declared or paid during 2018. Required Prepare the journal...
-
Sigma Companys single-step income statements for 2014 and 2013 follow. Required 1. Prepare multistep income statements for 2013 and 2014 showing percentages of net sales for each component (e.g.,...
-
Determine the prinicipal that must be invested to earn $ 5 2 . 9 6 interest in 2 4 0 days at 7 . 3 %
-
Like many married couples, Morgan and Thomas Jensen are trying their best to save for two important investment objectives: (1) an education fund to put their two children through college; and (2) a...
-
5-1. A computer uses a memory unit with 256K words of 32 bits each. A binary instruction code is stored in one word of memory. The instruction has four parts: an indirect bit, an operation code, a...
-
Justina is recently promoted to be the vice president of global business development in an American MNC. Her position requires her to bring in new business from clients around the world. Her first...
-
Identify the 8 elements of communication process. Does feedback indicate that communication has been successful?
-
What is the relations between globalization in business and the need of intercultural communication which currently happening?
-
8. A yo-yo with mass M and radius R is wound with a light string. Someone drops it from rest with the string attached to a metal pole. The yo-yo falls and unwinds (spins) without slipping. The moment...
-
How we can use cultural differences as a tool in bringing all cultures together rather than breaking them apart.
-
The Thompson Corporation, a manufacturer of steel products, began operations on October 1, 2022. The accounting department of Thompson has started the fixed-asset and depreciation schedule presented...
-
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.
-
The Internet is a good place to get information that is useful to you in your study of accounting. For example, you can find information about current events, professional accounting organizations,...
-
Which of the following does not describe accounting? a. Language of business. b. Is an end rather than a means to an end. c. Useful for decision making. d. Used by business, government, nonprofit...
-
Why does internal accounting information need to be timely?
Study smarter with the SolutionInn App