Student ID - 802187!
EGM07 - Optimisation and Reliability!
Coursework 1!
Problem 1!
Approximate the real root of!
x3 +5x3=0!
to four decimal places using the Newton-Raphson technique. Marks will be
awarded for explanation as well as computational accuracy.!
Resolution:!
The Newton-Raphson method is an iterative process to approach with accuracy
one root of a function. The root that is found depends on a arbitrary initial value of a xvalue. So, the basic algorithm is to calculate the iteration below after choosing arbitrarily
a x0 initial value.!
xn+1 = xn
f (xn )
f '(xn )
By choosing x0=0.5!
We compute,!
!
!
!
!
x1 = x0
f (x0 )
0.3750
= 0.5
= 0.5652
f '(x1 )
5.7500
And continuing the iterations we find the values below at the table!
!
1
y(x)
y`(x)
The iteration stops when the fourth decimal place of the last 2 results are equal.!
!
Problem 2!
Consider the figure below. The cross-sectional area, A, of a gutter with equal
base and edge length of 2 units is given by:!
A = 4sin(1+cos)!
Use the Dichotomous method to estimate the value of that maximises the
cross- sectional area, taking the initial interval for as [0, /2], and the final accuracy =
0.2.!
Verify your answer using an independent method.!
Resolution:!
The Dichotomous method is used to find the minimum or maximum of a function.
It consists of establishing an initial interval and a mid point of this interval, evaluatig the
function in points of this interval and keep reducing this interval progressively until a sufficiently small range is obtained.!
The algorithm is:!
1- Define the interval [a,b]!
2- Define the accuracy !
3- Calculate !
!
!
!
a+b
2
2
a+b
x2 =
+
2
2
x1 =
!
!
!
a=0
= 1.5708
2
= 0.2
b=
and calculate!
!
!
!
!
0 + 1.5708 0.2
= 0.6854
2
2
0 + 1.5708 0.2
x2 =
+
= 0.8854
2
2
x1 =
following we compute!
!
!
!
!
!
1
Ik = I0
2
Where Io is the range of the initial interval (a b) and k is the number of the iteration, so for the first iteration, k=0.!
Then continuing the iterations we find the values showed in the table below!
A(x
A(x
Ik
!
Using the Golden Search Method:!
The Golden Search Method is used to fin the maximum and minimum of functions
as well as the Dichotomous method.!
This method uses the golden ratio K=1.618034 to calculate the intervals of iterations along the algorithm.!
The algorithm is:!
1- Determine a1, b1 and !
2- Assign I1= b1 a1, K=1.618034!
3-Compute!
!
!
I
I2 = 1
K
xa,1 = b1 I 2
xb,1 = a1 + I 2
4- Compute !
I k+2
I k+1
=
K
5- If f(xa)f(xb) then,!
!
!
!
!
!
ak+1 = xa,k
bk+1 = bk
xa,k+1 = xb,k
xb,k+1 = ak+1 + I k+2
6- If f(xa)f(xb) then,!
!
!
!
!
!
ak+1 = ak
bk+1 = xb,k
xa,k+1 = bk+1 I k+2
xb,k+1 = xa,k
!
!
!
!
a1 = 0
= 1.5708
2
= 0.2
I1 = 1.5708 0 = 1.5708
K = 1.618034
b1 =
And compute!
!
!
!
!
I 1.5708
I2 = 1 =
= 0.9708
K 1.618304
xa,1 = b1 I 2 = 1.5708 0.9708 = 0.6
xb,1 = a1 + I 2 = 0.9708
0.9708
I
I k+2 = I 3 = 2 =
= 0.6
K 1.618304
1
!
!
!
note that now f(x) is multiplied by -1 because the algorithm is based on finding the
minimum, so to find the maximum just multiplies the original function by -1 and apply the
rules normally.!
So, f(xa,1)>f(xb,1) then,!
!
!
!
!
!
a2 = xa,1 = 0.6
b2 = b1 = 1.5708
xa,2 = xb,1 = 0.9708
xb,2 = a2 + I 3 = 0.6 + 0.6 = 1.2
Continuing the iterations until Ik+2 reach some value less than 0.2 we found the
results in the table below!
n
Ik
0.6000
0.6000
0.8292
0.9708
0.9708
1.1124 0.1416
A(x
A(x