Find the x* that minimizes the function f(x) = (x-2)^4 + 1,| by finding the root of the function's first derivative. Use the method of Newton-Raphson, with initial guess x0 = 0. Output • the values of the function and its first derivative at x = 0, i.e. f(0) and f(0). · the estimate of x* after 2 Newton-Raphson iteration. the estimate of x* after 3 Newton-Raphson iterations. the approximate absolute percent relative error in x* after 3 Newton-Raphson iterations (e.g., for 5% error, output 5.)

Principles of Heat Transfer (Activate Learning with these NEW titles from Engineering!)
8th Edition
ISBN:9781305387102
Author:Kreith, Frank; Manglik, Raj M.
Publisher:Kreith, Frank; Manglik, Raj M.
Chapter4: Numerical Analysis Of Heat Conduction
Section: Chapter Questions
Problem 4.7P
icon
Related questions
Question

Please follow the instructions and the requirements according to the pictures above and I kinda need the solution quickly. The language of the code is in Matlab, thank you in advance.

Find the x* that minimizes the function
f(x) = (x-2)^4 + 1,
by finding the root of the function's first derivative. Use the method of Newton-Raphson, with initial guess x0 = 0.
Output:
• the values of the function and its first derivative at x = 0, i.e. f(0) and f(0).
· the estimate of x* after 2 Newton-Raphson iteration.
· the estimate of x* after 3 Newton-Raphson iterations.
· the approximate absolute percent relative error in x* after 3 Newton-Raphson iterations (e.g., for 5% error, output 5.)
Transcribed Image Text:Find the x* that minimizes the function f(x) = (x-2)^4 + 1, by finding the root of the function's first derivative. Use the method of Newton-Raphson, with initial guess x0 = 0. Output: • the values of the function and its first derivative at x = 0, i.e. f(0) and f(0). · the estimate of x* after 2 Newton-Raphson iteration. · the estimate of x* after 3 Newton-Raphson iterations. · the approximate absolute percent relative error in x* after 3 Newton-Raphson iterations (e.g., for 5% error, output 5.)
1 function [fe, dfe, x2, x3, e3] = NewtonMinimization()
2 % Input:
3 % None
4 % Output:
5 % fe, dfe: the values of the given function and its 1st derivative at x = 0;
6 % x2: the estimate of minimizer x* after 2 Newton-Raphson iterations.
7 % x3: the estimate of minimizer x* after 3 Newton-Raphson iterations.
8 % e3: the approximate absolute percent relative error in x* after 3 Newton-Raphson iterations (e.g., for 5% error, output 5)
9
10 % Write your code here
11
12
13 end
14
Transcribed Image Text:1 function [fe, dfe, x2, x3, e3] = NewtonMinimization() 2 % Input: 3 % None 4 % Output: 5 % fe, dfe: the values of the given function and its 1st derivative at x = 0; 6 % x2: the estimate of minimizer x* after 2 Newton-Raphson iterations. 7 % x3: the estimate of minimizer x* after 3 Newton-Raphson iterations. 8 % e3: the approximate absolute percent relative error in x* after 3 Newton-Raphson iterations (e.g., for 5% error, output 5) 9 10 % Write your code here 11 12 13 end 14
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Automation of Manufacturing Processes
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, mechanical-engineering and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Principles of Heat Transfer (Activate Learning wi…
Principles of Heat Transfer (Activate Learning wi…
Mechanical Engineering
ISBN:
9781305387102
Author:
Kreith, Frank; Manglik, Raj M.
Publisher:
Cengage Learning