You are on page 1of 7

DEPARTMENT OF MECHANICAL ENGINEERING

Visca, Baybay City, Leyte, PHILIPPINES


Tel No.: 053 565 0600 (loc 1070)
Telefax: +63 53 563 7067
Email: @vsu.edu.ph
Website: www.vsu.edu.ph

Introduction

Many civilizations attribute characteristics to various numbers. For instance friday the 13th and lucky 7 are
both well known to west. The following quantity was dubbed the golden ratio by the ancient Greeks. 0, 1, 1,
2, 3, 5, 8, 13, 21, 34 … the total of each integer following the first two is as a result. Previous two. This
pattern appears frequently in a wide range of scientific and engineering fields. As it relates to the discussion
at hand and the Fibonacci sequence has an intriguing characteristic that has to do with the ratio of the
sequence of numbers in succession, this value, which has been known since antiquity, is called the golden
ratio. Because it allows optima to be found efficiently.

Problem

g
The trajectory of a ball can be computed with y = (tanƟ0 )x − x2 + y0 where y = the height (m), Ɵ0 =
2v20 𝑐𝑜𝑠 2 Ɵ0

the initial angle (radians), v0 =the initial velocity (m/s), g= the gravitational constant =9.81 m/𝑠2 , and y0 = the
initial height (m). Use the golden-section search to determine the maximum height given y0 =1 m, v0 =25
m/s and v0 = 508. Iterate until the approximate error falls below εs=1% using initial guesses of xL = 0 and
xu = 60 m.
Methodology
g
Use the golden-section search to find the maximum value in function (y = (tanƟ0 )x − x2 + y0 ),
2v20 𝑐𝑜𝑠 2 Ɵ0

within the interval xL = 0 and xu = 60 m.

Solution: Used the golden ratio to create the two interior points.

f(x1 ) > f(x2 ) , then the domain of x to the left ofx2 , from xL tox2 , can be eliminated because it does not
contain the maximum. For this case, x2 becomes the new xL for the next round.
f(x1 ) < f(x2 ) Then the domain of x to the right of x1 , from x1 to xu would have been eliminated. In this case, x1
becomes the new xu for the next round.
√5−1
𝑑= (xu − xL )
2

x1 = x L + 𝑑

x2 = xu − 𝑑

Evaluate the function f(x1 ) and f(x2 ) on given function.


f(x1 ) > f(x2 )
f(x1 ) < f(x2 )

Vision: A globally competitive university for science, technology, and environmental conservation. Page 1 of 7
Mission: Development of a highly competitive human resource, cutting-edge scientific knowledge and innovative
technologies for sustainable communities and environment.
DEPARTMENT OF MECHANICAL ENGINEERING
Visca, Baybay City, Leyte, PHILIPPINES
Tel No.: 053 565 0600 (loc 1070)
Telefax: +63 53 563 7067
Email: @vsu.edu.ph
Website: www.vsu.edu.ph

Solution

1st Iteration

√5−1
𝑑= (60 − 0) = 37.082
2

x1 = 0 + 37.082 = 37.082

x2 = 60 − 37.082 = 22.918

50𝜋 9.81
f(x1 ) = (tan ) (37.082) − 50𝜋 (37.082)2 + 1) =19.074
180 2(625)𝑐𝑜𝑠 2 ( 180 )

50𝜋 9.81
f(x2 ) = (tan ) (22.918) − 50𝜋 (22.918)2 + 1) =18.3361
180 2(625)𝑐𝑜𝑠 2 ( 180 )

Since f(x1 ) > f(x2 ) set the lower bound in the next iteration tox1= 22.918.

2nd Iteration

xL = 22.918 & xu = 60

√5−1
𝑑= (60 − 22.918) = 22.918
2

x1 = 22.918 + 22.918 = 45.839

x2 = 60 − 22.918 = 37.082

50𝜋 9.81
f(x1 ) = (tan ) (45.839) − 50𝜋 (45.839)2 + 1) =15.72
180 2(625)𝑐𝑜𝑠 2 ( 180 )

50𝜋 9.81
f(x2 ) = (tan ) (37.082) − 50𝜋 (37.082)2 + 1) =19.074
180 2(625)𝑐𝑜𝑠 2 ( 180 )

Since f(x1 ) < f(x2 )

3rd Iteration

xL = 22.918 & xu = 45.839

√5−1
𝑑= (45.839 − 22.918) = 14.165
2

x1 = 22.918 + 14.165 = 37.083

x2 = 45.839 − 14.165 = 31.674

Vision: A globally competitive university for science, technology, and environmental conservation. Page 2 of 7
Mission: Development of a highly competitive human resource, cutting-edge scientific knowledge and innovative
technologies for sustainable communities and environment.
DEPARTMENT OF MECHANICAL ENGINEERING
Visca, Baybay City, Leyte, PHILIPPINES
Tel No.: 053 565 0600 (loc 1070)
Telefax: +63 53 563 7067
Email: @vsu.edu.ph
Website: www.vsu.edu.ph

50𝜋 9.81
f(x1 ) = (tan ) (37.083) − 50𝜋 (37.083)2 + 1) =19.075
180 2(625)𝑐𝑜𝑠 2 ( 180 )

50𝜋 9.81
f(x2 ) = (tan ) (31.674) − 50𝜋 (31.674)2 + 1) =19.6917
180 2(625)𝑐𝑜𝑠 2 ( 180 )

Since f(x1 ) < f(x2 )

4th Iteration

xL = 22.918 & xu = 37.083

√5−1
𝑑= (37.083 − 22.918) =8.754
2

x1 = 22.918 + 8.754 = 31.672

x2 = 37.083 − 8.754 = 28.329

50𝜋 9.81
f(x1 ) = (tan ) (31.672) − 50𝜋 (31.672)2 + 1) =19.6917
180 2(625)𝑐𝑜𝑠 2 ( 180 )

50𝜋 9.81
f(x2 ) = (tan ) (28.329) − 50𝜋 (28.329)2 + 1) =19.517
180 2(625)𝑐𝑜𝑠 2 ( 180 )

Since f(x1 ) > f(x2 )

5th Iteration

xL = 28.329 & xu = 37.083

√5−1
𝑑= (37.083 − 28.329) = 5.41
2

x1 = 28.329 + 5.41 = 33.739

x2 = 37.083 − 5.41 = 31.673

50𝜋 9.81
f(x1 ) = (tan ) (33.739) − 50𝜋 (33.739)2 + 1) =19.587
180 2(625)𝑐𝑜𝑠 2 ( 180 )

50𝜋 9.81
f(x2 ) = (tan ) (31.673) − 50𝜋 (31.673)2 + 1) =19.69
180 2(625)𝑐𝑜𝑠 2 ( 180 )

Since f(x1 ) < f(x2 )

6th Iteration

xL = 28.329 & xu = 33.739


Vision: A globally competitive university for science, technology, and environmental conservation. Page 3 of 7
Mission: Development of a highly competitive human resource, cutting-edge scientific knowledge and innovative
technologies for sustainable communities and environment.
DEPARTMENT OF MECHANICAL ENGINEERING
Visca, Baybay City, Leyte, PHILIPPINES
Tel No.: 053 565 0600 (loc 1070)
Telefax: +63 53 563 7067
Email: @vsu.edu.ph
Website: www.vsu.edu.ph

√5−1
𝑑= (33.739 − 28.329) =3.34
2

x1 = 28.329 + 3.34 =31.669

x2 = 33.739 − 3.34 =30.399

50𝜋 9.81
f(x1 ) = (tan ) (31.669) − 50𝜋 (31.669)2 + 1) =19.6917
180 2(625)𝑐𝑜𝑠 2 ( 180 )

50𝜋 9.81
f(x2 ) = (tan ) (30.399) − 50𝜋 (30.399)2 + 1) =19.675
180 2(625)𝑐𝑜𝑠 2 ( 180 )

Since f(x1 ) > f(x2 )

7th Iteration

xL = 30.399 & xu = 33.739

√5−1
𝑑= (33.739 − 30.399) =2.06
2

x1 = 30.399 + 2.06 =32.459

x2 = 33.739 − 2.06 =31.679

50𝜋 9.81
f(x1 ) = (tan ) (32.459) − 50𝜋 (32.459)2 + 1) =19.67
180 2(625)𝑐𝑜𝑠 2 ( 180 )

50𝜋 9.81
f(x2 ) = (tan ) (31.679) − 50𝜋 (31.679)2 + 1) =19.69
180 2(625)𝑐𝑜𝑠 2 ( 180 )

Since f(x1 ) < f(x2 )

8th Iteration

xL = 30.399 & xu = 32.459

√5−1
𝑑= (32.459 − 30.399 ) =1.27
2

x1 = 30.399 + 1.27 =31.669

x2 = 32.459 − 1.27 =31.189

50𝜋 9.81
f(x1 ) = (tan ) (31.669) − 50𝜋 (31.669)2 + 1) =19.69
180 2(625)𝑐𝑜𝑠 2 ( 180 )

Vision: A globally competitive university for science, technology, and environmental conservation. Page 4 of 7
Mission: Development of a highly competitive human resource, cutting-edge scientific knowledge and innovative
technologies for sustainable communities and environment.
DEPARTMENT OF MECHANICAL ENGINEERING
Visca, Baybay City, Leyte, PHILIPPINES
Tel No.: 053 565 0600 (loc 1070)
Telefax: +63 53 563 7067
Email: @vsu.edu.ph
Website: www.vsu.edu.ph

50𝜋 9.81
f(x2 ) = (tan ) (31.189) − 50𝜋 (31.189)2 + 1) =19.69
180 2(625)𝑐𝑜𝑠 2 ( 180 )

9th Iteration

xL = 30.399 & xu = 31.189

√5−1
𝑑= (31.189 − 30.399 ) =0.488
2

x1 = 30.399 + 0.488 =30.887

x2 = 31.189 − 0.488 =30.701

50𝜋 9.81
f(x1 ) = (tan ) (30.887) − 50𝜋 (30.887)2 + 1) =19.6889
180 2(625)𝑐𝑜𝑠 2 ( 180 )

50𝜋 9.81
f(x2 ) = (tan ) (30.701) − 50𝜋 (30.701)2 + 1) =19.685
180 2(625)𝑐𝑜𝑠 2 ( )
180

50𝜋 9.81
f(xu ) = (tan ) (31.189) − 50𝜋 (31.189)2 + 1) =19.69
180 2(625)𝑐𝑜𝑠 2 ( 180 )

50𝜋 9.81
f(xL ) = (tan ) (30.399) − 50𝜋 (30.399)2 + 1) =19.67
180 2(625)𝑐𝑜𝑠 2 ( 180 )

xL = 30.399 & xu = 31.189

∆x = x1 − x2

∆x =30.887-30.701=0.186

∆x = (1 − R)(xu − xL )

0.186 = (1 − R)(31.189 − 30.399)

R=0.61772

xu −xL
𝐸𝑠 = (1 − R) )
𝑋0𝑝𝑡𝑖𝑚𝑢𝑚

𝟑𝟏.𝟏𝟖𝟗−𝟑𝟎.𝟑𝟗𝟗
𝑬𝒔 = (𝟏 − 𝟎. 𝟔𝟏𝟕𝟕𝟐)( ) x100%=0.977%
𝟑𝟎.𝟖𝟖𝟕

Vision: A globally competitive university for science, technology, and environmental conservation. Page 5 of 7
Mission: Development of a highly competitive human resource, cutting-edge scientific knowledge and innovative
technologies for sustainable communities and environment.
DEPARTMENT OF MECHANICAL ENGINEERING
Visca, Baybay City, Leyte, PHILIPPINES
Tel No.: 053 565 0600 (loc 1070)
Telefax: +63 53 563 7067
Email: @vsu.edu.ph
Website: www.vsu.edu.ph

25

20

15

10

0
0 10 20 30 40 50 60 70

𝐱 𝟏 =30.887

𝐟(𝐱 𝟏 ) =19.6889

𝟑𝟏.𝟏𝟖𝟗−𝟑𝟎.𝟑𝟗𝟗
𝑬𝒔 = (𝟏 − 𝟎. 𝟔𝟏𝟕𝟕𝟐)( ) x100%=0.977%
𝟑𝟎.𝟖𝟖𝟕

Conclusion and Recommendation

Now, here is the real benefit from the use of the golden ratio. Because the original x1 and x 2 were chosen using the
golden ratio, we do not have to recalculate all the function values for the next iteration. conclusion for the given
function almost identical using the bisection method, that you have to iterate in order to estimate the optimum value or
position of the ball, but this case , solving the estimated value is so much more different, Position of the
ball (y =19.6889) & (x =30.887).

Vision: A globally competitive university for science, technology, and environmental conservation. Page 6 of 7
Mission: Development of a highly competitive human resource, cutting-edge scientific knowledge and innovative
technologies for sustainable communities and environment.
DEPARTMENT OF MECHANICAL ENGINEERING
Visca, Baybay City, Leyte, PHILIPPINES
Tel No.: 053 565 0600 (loc 1070)
Telefax: +63 53 563 7067
Email: @vsu.edu.ph
Website: www.vsu.edu.ph

References

Numerical Methods For engineering 7th Edition by, Steven C. Chapra Berger Chair in Computing and
Engineering, Tufts University and Raymond P. Canale Professor Emeritus of Civil Engineering University of
Michigan

Vision: A globally competitive university for science, technology, and environmental conservation. Page 7 of 7
Mission: Development of a highly competitive human resource, cutting-edge scientific knowledge and innovative
technologies for sustainable communities and environment.

You might also like