Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Procedure Write a MATLAB code to: 1-plot the graph of the function f(x)=f(x) = x + 4x - 10 = 0. Plot the function
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, x2, f2) end 3- Repeat steps 1 and 2 using the function of derivative in MATLAB (diff).
Step by Step Solution
★★★★★
3.39 Rating (158 Votes )
There are 3 Steps involved in it
Step: 1
Solution Plotting the Function First we need to plot the function fx x3 4x 10 0 To do this we can us...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