SOLUTION :
Matlab code:
a=0;
% start of interval
b=2;
% end of interval
epsilon=0.000001;
% accuracy value
iter=
3;
% maximum number of iterations
tau=double((sqrt(5)-1)/2); % golden
proportion coefficient, around 0.618
k=0;
% number of iterations
function r = f(x)
r = -1.5*x^6 - 2*x^4 + 12*x;
end
x1=a+(1-tau)*(b-a);
% computing x values
x2=a+tau*(b-a);
f_x1=f(x1);
% computing values in x points
f_x2=f(x2);
while ((abs(b-a)>epsilon) && (k<iter))
k=k+1;
if(f_x1>f_x2)
b=x2;
x2=x1;
x1=a+(1-tau)*(b-a);
f_x1=f(x1);
f_x2=f(x2);
else
a=x1;
x1=x2;
x2=a+tau*(b-a);
f_x1=f(x1);
f_x2=f(x2);
end
sprintf('Iteration %d: x1=%f, f(x1)=%f, x2=%f,
f(x2)=%f', k, x1, f_x1, x2, f_x2)
end
% chooses maximum point
if(f_x1<f_x2)
sprintf('x_max=%f', x2)
sprintf('f(x_max)=%f ', f_x2)
else
sprintf('x_max=%f', x1)
sprintf('f(x_max)=%f ', f_x1)
end
Output:
Iteration 1: x1=0.472136, f(x1)=5.549637, x2=0.763932,
f(x2)=8.187885
Iteration 2: x1=0.763932, f(x1)=8.187885, x2=0.944272,
f(x2)=8.677842
Iteration 3: x1=0.944272, f(x1)=8.677842, x2=1.055728,
f(x2)=8.107398
x_max=0.944272
f(x_max)=8.677842
Hence max value of f(x) rounded upto 4 decimals is 8.6778
Check my we Use the golden-section method to solve for the value of x that maximizes...
2 Check my work View pre Use the golden-section method to solve for the value of x that maximizes -15,6-24 + 12x. Employ initial guesses of 지 xu 2, and perform three iterations. (Round the final answer to four decimal places.) 0 and The value of x that maximizes the given function is .
1. Use golden-section search method with initial guesses of x = 0 and x=3 to minimize the following function: f(x)=10 exp(-x)+x? @ Don't use any computer program. Only a portable calculator is allowed. 2. Use parabolic interpolation method with initial guesses of x=0, x=1, and x3 = 3 to minimize the following function f(x)=10 exp(-x)+x? Don't use any computer program. Only a portable calculator is allowed. The minimum value of f(x)=10 exp(-x)+x is 1+In 30 = 4.401197... at x =...
Exercise 21: Carry out three iterations of the Golden Section Method for the function f(x) (x-3)2,0 z 10. How does the third approximating interval differ fron that in the exam ple using Kiefer's Fibonacci Search method?
Need solution for question 5.6 using
python?
tation to within e, 5.11 Determine the real root of x 80: (a) analytically and (b) with the false-position method to within e, = 2.5%. Use initial guesses of 2.0 and 5.0. Compute the estimated error Ea and the true error after each 1.0% teration 5.2 Determine the real root of (x) 5r - 5x2 + 6r -2 (a) Graphically (b) Using bisection to locate the root. Employ initial guesses of 5.12 Given...
(la) Determine the root of the x – ez* + 5 = 0 using the Newton-Raphson method with equation initial guess of xo = 1. Perform the computation until the percentage error is less than 0.03%. (1b) Employ bisection method to determine the root of the f(x)=x* – 3x + 7 =0) using equation two initial guesses of x; =-2.1 and x;, =-1.8 . Perform three iterations and calculate the approximate relative error for the third iteration. What is the...
Matlab method questions
A zero of the function f(x) shown below is to be found. Use the image to answer Questions 15-17. 5 4 3 N f(x) 1 -2 4 6 8 10 N X What value will the Bisection Method converge to after many iterations using an initial lower guess XL = 0 and initial upper guess xu = 7? 0 1 2 3 4 O 5 6 O 7 8 O 이 9 O 10 There will be...
Only the matlab
nlinear equations x 0.75 Determine the roots of these equations using: a) The Fixed-point iteration method. b) The Newton Raphson method. Employ initial guesses of x y 1.2 and perform the iterations until E.<10%. Note: You can use to solve the problems, but you should sol at least two full iterations manually. AB bl Du Thursd 30/3/ 1. For the displacement in Q3 y 10 e cos at 0 St S 4. a) Plot the displacement y...
can
you please show hand calculations
Find the minimum of the given function f(x) using the Golden Section Search at an interval 2,3.25]. Show hand calculated solutions, fill in the table, and use three decimals. Regarding MATLAB, plot the function and solve for the extremum using a built-in function. f(x) 3cos(a) sin(a) 2(2) 3.525 | -2:408|1o311
Find the minimum of the given function f(x) using the Golden Section Search at an interval 2,3.25]. Show hand calculated solutions, fill in the...
this is (Computational Method for Engineering Design)
class
please solve it with very clear and explained steps as
soon as u can.
thanks
(35 Pts) 2. The falling velocity of a bungee jumper can be described by the following equation ) tanh where m is the mass of the bungee jumper, g=9.81m/sUse the bisection method to determine the drag coefficient c, needed such that an 80-kg bungee jumper has a velocity of 36 m's after 4 second of fall. Show...
4. Use the golden section rule to find the value of x that minimizes the function (x)-146070x in the range [0 2]. Locate the value of within the range 0.3. (This was done in the class and will give [a,b,1) done take the average value of [a,b, ) and use Newton's 50 points
4. Use the golden section rule to find the value of x that minimizes the function (x)-146070x in the range [0 2]. Locate the value of within...