Question

Using Matlab 1. Give the flowchart for finding the root of the function f(x) = [tanh⁡(x-2)]...

Using Matlab

1. Give the flowchart for finding the root of the function f(x) = [tanh⁡(x-2)] [sin⁡(x+3)+2]

with the following methods (6 significant figures required):

a) Modified Regula Falsi (Choose two reasonable integers as your initial upper and lower bounds)

b) Newton’s Method (Choose one reasonable integer as your initial guess for the root)

Homework Answers

Answer #1

% Newton
f=@(x) tanh(x-2).*(sin(x+3)+2);
deriv_f=@(x) tanh(x-2).*(cos(x+3))+ (sech(x-2))^2.*(sin(x+3)+2);
x=1;
for i=1:10
x=x-f(x)/deriv_f(x);
end
disp('Newton Solution is : ')
disp(x)

% Regula -falsi modified

a=2.1;
b=1.91;
if (f(a)*f(b)<0)
c=b-(f(b)*(b-a))/(f(b)-f(a));
for i=1:20
if(f(b)*f(c)<0)
a=b;
b=c;
c=b-(f(b)*(b-a))/(f(b)-f(a));
  
else
b=c;
c=b-(f(b)*(b-a))/(f(b)-f(a));
end
end
else
disp('Error ')
end

disp('Regular Falsi Method:')
disp(c)


Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
17. I am using Newton’s method to find the negative root of f(x) = 3−x2. (a)...
17. I am using Newton’s method to find the negative root of f(x) = 3−x2. (a) What would be a good guess for x1? Draw the line tangent to f(x) at your x1 and explain why using Newton’s method would lead to the negative root of the function. (b) What would be a bad guess for x1? Draw the line tangent to f(x) at your x1 and explain why using Newton’s method would not lead to the negative root of...
SOMEONE, PLEASE ANSWER This is for Numerical Methods class homework Consider the function ex + x...
SOMEONE, PLEASE ANSWER This is for Numerical Methods class homework Consider the function ex + x - 7 Find an approximation of the root of f(x) with an absolute error less than 0.001 using Newton’s method Please plot the function to choose an initial guess and conduct as many iterations as needed until you reach the specified error
Find the root of the function: f(x)=2x+sin⁡(x)-e^x, using Newton Method and initial value of 0. Calculate...
Find the root of the function: f(x)=2x+sin⁡(x)-e^x, using Newton Method and initial value of 0. Calculate the approximate error in each step. Use maximum 4 steps (in case you do not observe a convergence).
2. (a) For the equation e^x = 3 - 2 x , find a function, f(x),...
2. (a) For the equation e^x = 3 - 2 x , find a function, f(x), whose x-intercept is the solution of the equation (i.e. a function suitable to use in Newton’s Method), and use it to set up xn+1 for Newton’s Method. (b) Use Newton's method to find x3 , x4 and x5 using the initial guess x1 = 0 . How many digits of accuracy are you certain of from these results? (c) Use x1+ ln 2   and show...
Use Newton’s method to find a 6-decimal place approximation to the positive root of f(x) =...
Use Newton’s method to find a 6-decimal place approximation to the positive root of f(x) = x 5 − 7x 2 + 4 that is nearest to the origin. (a) Tell your “Newton function” R(x) (b) Tell what technology you used. (“Handheld calculator” is not acceptable.) (c) Tell your initial guess (x1) and the iterations that you observed. (d) Tell your “stopping criteria.” That is, why did you stop after n iterations
Complete four iterations of Newton’s Method for the function f(x)=x^3+2x+1 using initial guess x1= -.5
Complete four iterations of Newton’s Method for the function f(x)=x^3+2x+1 using initial guess x1= -.5
1) find a cubic polynomial with only one root f(x)=ax^3+bx^2+cx +d such that it had a...
1) find a cubic polynomial with only one root f(x)=ax^3+bx^2+cx +d such that it had a two cycle using Newton’s method where N(0)=2 and N(2)=0 2) the function G(x)=x^2+k for k>0 must ha e a two cycle for Newton’s method (why)? Find the two cycle
Using Matlab, find an approximation by the method of false position for the root of function...
Using Matlab, find an approximation by the method of false position for the root of function f(x) = ex −x2 + 3x−2 accurate to within 10−5 (absolute error) on the interval [0,1]. Please answer and show code. Pseudo Code for Method of False Position: Given [a,b] containing a zero of f(x); tolerance = 1.e-7; nmax = 1000; itcount = 0; error = 1; while (itcount <=nmax && error >=tolerance) itcount = itcount + 1; x= a - ((b-a)/(f(b)-f(a)))f(a) error =abs(f(x));...
Write a script (must be titled “NumIntF”) in MATLAB that calculates the integration of function f(x)=cos(x)...
Write a script (must be titled “NumIntF”) in MATLAB that calculates the integration of function f(x)=cos(x) . exp(sin x), Using numerical integration method. When the user runs the script, he/she is prompted to input the lower and upper limits for numerical integration, both in radians, and your program outputs the integration result. You can use built-in trigonometric functions and the exponential function, but you are not allowed to use any built-in function to do the integration. You must use a...
For the following function, determine the highest real root of f(x) = 2x3 – 11.7x2 +...
For the following function, determine the highest real root of f(x) = 2x3 – 11.7x2 + 17.7x - 5 by using (a) graphical methods, (b) fixed point iteration (three iterations, x0 = 3) (Hint: Be certain that you develop a solution that converges on the root), and (c) Newton-Raphson method (three iterations, x0 = 3). Perform an error check on each of your final root approximations (e.g. for the last of the three iterations).
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT