Professional Documents
Culture Documents
EPE821 Lecture4
EPE821 Lecture4
dF d 2F
0 and 2
0 (1)
dx dx
Above two conditions are known as optimality conditions
Conditions (1) imply that F(x*) is the smallest value of F in some region
near x* . It may also be true that F (x* ) ≤ F (x) for all x but condition (1)
does not guarantee this.
Definition If conditions (1) hold at x = x* and if F(x*) < F(x) for all x
then x* is said to be the global minimum.
Solution:
Solution:
F x3 3x 2
F 3 x 2 6 x 0 at x 0 and x 2
F 6 x 6 x 3-3*x 2
25
Orig
20 1st Derv.
2nd Derv.
F (2) 0
10
Local Minimum 5
-5
-10
-15
-1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4
Given a bracketed root, the method repeatedly halves the interval while
continuing to bracket the root and it will converge on the solution.
x 0, xu 0.11
0 0.11
xm 0.055
2
f 0 3.993x10 4
f 0.11 2.662 x10 4
f 0.055 6.655x10 5
x 0.055
xu 0.11
x 0.055, xu 0.11
0.055 0.11
xm 0.0825
2
a 33.33%
f 0.055 6.655x10 5
f 0.11 2.662 x10 4
f 0.0825 1.62216 x10 4
x 0.055, xu 0.0825
x 0.055, xu 0.0825
0.055 0.0825
xm 0.06875
2
a 20%
f 0.055 6.655x10 5
f 0.0825 1.62216x10 4
f 0.06875 5.5632x10 5
100 2
y=x
80
f x x 2
60
y(x)
40
20
-10 -5 0 5 10
x
EPE 821 Lec 4 16
Bisection Method
1
100 f x
y = 1/x x
80
60
40
20
y(x)
-20
-40
-60
-80
-100
x 3-3*x 2
25
Orig
20 1st Derv.
2nd Derv.
To get the minimum we need to 15
The first two iterations of the secant method. The red curve
shows the function f and the blue lines are the secants. For this
particular case, the secant method will not converge.
xi xi 1
xi 1 xi f xi
f xi f x
i 1
F
|f(xi+1)|
T i=i+1
x_Root=xi+1
end
xi xi 1
xi 1 xi f xi
f xi f xi 1
F
|f’(xi+1)|
T i=i+1
x_Root=xi+1
end
Orig
1st Derv.
F = x^3 - 3*x^2; % function 20
2nd Derv.
10
x2 is 1.800000 and dF is -1.080000
x2 is 1.928571 and dF is -0.413265 5
-15
-1 -0.5 0 0.5 1 1.5 2 2.5 3 3.5 4
-10
-15
-20
0 0.5 1 1.5 2 2.5 3