You are on page 1of 1

ING.

JOSÉ GUADALUPE ESPEJEL PANIAGUA

clc
syms x
xl=0;
xu=2.4721;
d=0.5*(sqrt(5) - 1)*(xu-xl)
x1=xl+d
x2=xu-d
f=2*sin(x) - ((x.^2)/10);
fx1=double(subs(f,x1))
fx2=double(subs(f,x2))

XL X2 X1 F(X2) F(X1) XU D

0 1.5279 2.4721 1.7647 0.6300 4 2.4721


0 0.9443 1.5278 1.5310 1.7647 2.4721 1.5278
0.9443 1.5279 1.8885 1.7647 1.5432 2.4721 0.9443
0.9443 1.3050 1.5278 1.7595 1.7647 1.8885 0.5836

1.3050 1.5278 1.6656 1.7647 1.7135 1.8885 0.3607

1.3050 1.4427 1.5279 1.7755 1.7647 1.6656 0.2229

You might also like