You are on page 1of 49

1

1. จงประมาณค่าความผิดพลาดของค่าการแอ่นตัวของคานที่ถกู กดโดยแรงขนาด w ที่กึ่งกลางคานทีค่ านวณจากสูตร


ข้ างล่าง ในกรณีทคี่ า่ ทีว่ ดั ได้ มี error
โดยกาหนดให้ y = ค่าการแอ่นตัวของคาน (m)
w = 100,000±500 N
l = 5.0±0.01 m
E = 2x1010±3x108 N/m2
I = 0.0007±0.00005 m4
𝑤𝑙 3
𝑦=
48𝐸𝐼

oy-ygg-1.owtl%e4.int/: -I.oEt1:7-toti48IE/'0lt/-w&/
so .

'
& we
/ / 4812 /
3W °"
/
OE
/
0W +
'
t -
°

by
= •

¢g±E 4811=-2 E

Oy
=
(9.301×10-5) t (1.116×10-4) t (2.79×10-4) t (1.3287×10-3)

1.81231
by
Mmff
i. =

2. จงใช้ อนุกรมเทย์เลอร์ อนั ดับที่ 3 (3rd Order Approximation) ในการประมาณค่าฟังก์ชนั่ ต่อไปนี ้


a) sin(35) โดยใช้ คา่ ตังต้
้ นทีม่ มุ 30 ¥
Sol .


=

¥ ,
h =

7¥ ¥6 =

f '( ✗ 1h3
"

( ✗ ◦ 1h2 t
"

f- ( ✗ ,
) = f- ( ✗ ◦
It flight 1- ◦

2! 3 !
i. sin 35° ≈
sink 1- COSI
/ ¥, ) -
sin
¥(¥612 cos 1%13 =
0.5735752

-

2! 3 !

b) ค่าคลาดเคลือ่ นโดยประมาณ ที่เกิดจากการประมาณตามข้ อ a)

n' ÑI sin 35° =


0.5735764

Et
/ A 100%
= T -

i. Ey = 0.5735764 -
0.5735752 ✗ 1001 = 0.00021 %
Nz
.

0.5735764
2

3. จงหาคาตอบของระบบสมการต่อไปนี ้
𝑓(𝑥) = 𝑥 4 − 7.5𝑥 3 + 14.5𝑥 2 + 3𝑥 − 20

501.9J Newton Raphsoh ✗ =


Xi
-
flail
it , '
f- ( x ;)
f-
'
(✗ 3=473-22.5721-29×+3

i ×
;
fix ;) f '( xp Each )

0 I -9 13.5

I 1.667 -1.726 7.348 40.01%

2 1.902 -0.357 4.285 12.36%

3 1.985 -0.0465 3.195 4.181%

4 1.9996 -0.0012 3.005 0.73%

5 2.000 0.02.1 .

i. ✗ 2.000

=
3

4. จงหาคาตอบของระบบสมการต่อไปนี ้
U = 𝑓(𝑥, 𝑦) = 4𝑥 + 5 sin(𝑦) − 1 = 0
V = 𝑔(𝑥, 𝑦) = 𝑥 2 + 𝑒 −0.5𝑦 − 5 = 0
กาหนดให้ x0=0.5 และ y0=-2.5

Sol .
Newton Raphson OU = 4
ox

OU b-
=
COSY
og
OV = 2X
ox

OV =
-

O.ge
-0-51
01

i ✗
i Yi Ui ri °%x °%y °%✗ °%y Ean Ea ,y

0 0.5 -2.5 -1.992 -1.260 4 -4.006 I -1.745

I -0.028 -3.525 0.758 0.828 4 -4.637 -0.056 -2.913 1885% 29.08%

2 0.109 -3.234 -0.103 0.050 4 -4.979 0.218 -2.518 125% 8.998.1 .

3 0.166 -3.209 0.001 0.003 4 -4.989 0.332 -2.488 34.34%1/0.779.1 . ✓

0.599kV 0.031%1
4 0.167 -3.208


,
= 0.5 -
[(1.992×1.745)-(1.260×4.006)] =
-0.028 ✗
3=0.109
-
[(0.103×2.518)+(0.05×4.979)] = 0.166

[ (4) (-1.7-45)+4.006 ] (-14×2.518)+(4.979×0.218) ]

I,
=
-2.5 -

(-11.260×4)+1.992 ] = -3.525
Yz
:
-3.234 -
[(0.05×4)+(0.103×0.218)] = -3.209

[ (4) (-1.7-45)+4.006 ] (-14×2.518)+(4.979×0.218) ]

✗ 2=-0.028 -

[-10.758×2.91311-(0.828×4.637)]=0.109 ✗ 4=0.166 -
[ -

(0.001×2.488)+(0.003×4.989) ] =
0.167

1- (4) (2-913)-(4.637×0.056) ] [ -

(4×2.488)+(4.989×0.332) ]

12=-3.525 -

[(0.828×4)+(0.758×0.056)]=-3.243 y¢=
-

3.209 -

[(0.003×4)-(0.001×0.332)] = -3.208

1- (4) (2-913)-(4.637×0.056) ] (-14×2.488)+(4.989×0.332) ]

i. ✗ =
0.167,1=-3.208
#
Bracketing method * nnmoderad #

① Bisection Method
✗ Lt ✗ ✗ new ✗ old 100%
of Ms n
,
Eal %) =
-

2 ✗
new

Us : win in Xu X, 6in
workout ✗r
,

0
I

② False Position Method


f- ( ✗ a) ( ✗ L
KMS Xr =
Xu Xu )
-
-

f- (xp _

fcxu)
Open Method

① Fixed -
Point Iteration

Tofu ✗
qui ) riddim win ✗
-

it , i
-

Ea ( %) = ✗ it , -

✗i ✗ 100%

in
② Newton -

Raph son Method

✗ fix ;)
of s ✗ = -

it , i
'
f- ( X ;)
③ Secant Method ( Ditton )

[ thin ) fix ;) ]
9ms tix ) Yg
-

= =

✗ -
✗i
it ,

✗ = ✗i - f- ( ✗ i )
it ,
'
f- ( X ;)
④ Modified Newton Method ( Remedy)

ñW7ÑumoÑ ÑOIUI ttx ;) f-


"

( x ;)
, ,

fcxi ) thx ;)
KMS ✗ it =
✗ _

, i
?
If '( × ;) ] -

flxi )f"( X ;)
Example 4: Newton’s method

! Find root of the following function.


sin(5x) + x2 - 3x = 0 fcx ; ? = ) ✗ =

'
Sol .
f- (a) = 5C0S( 5×7+2×-3

i ×
;
fix ;) fix ;) Ea

0 I -2.958 0.418

I 8.077 41.447 8.664 87.62%

0.28 0.31 144.02%


2 3.31
37.34%

{ §
3 2.41

4 2.72
11.397%

5 2.70 0.741%

24 Numerical Methods in CE: Terdsak Rongviriyapanich


Fixed -
Point * in :Uw%oinwn*

Example 4: Newton’s method

! Find root of the following function.


sin(5x) + x2 - 3x = 0 far ) ; ? = ✗ =

① ②
Sol . 311 = sin ( 5×11-1/2 ✗ 2=37 -
sincsx )
3 3
✗ =
± 3✗
;
-
sin(5✗ ;)
?
it
✗ = sin ( 57 ;) + ×
,

it ,
3 i x
;

Ea 0 1
X; 91×7

0.014g igoon
I I 1.98
>

0.014 0.023 7042%


2 2.54

0.023 0.038 39.13% ✗


3 2.73

4 2.70 → Primus Newton /

24 Numerical Methods in CE: Terdsak Rongviriyapanich


Secant method
Example 4: Newton’s method

! Find root of the following function.


sin(5x) + x2 - 3x = 0 %g=[ thin fix ] ✗
) -

-
✗ i
;)

it
✗ Xi fcxi ) ,

#
__ -

it ,

Sol .
I ✗
ft
i
'l✗i)f( × ;)
f '( X
;
Ea
0.9 -2.87

0 I -2.96 -0.9
Uriomodi
Modi 2.2 12.44
-4.85/-6+33
-7 -

I -2.29 13.01 143.67%

2 0.39 -0.089 -4.89 687.18%

-0.019 -3.89 4.84%


3 0.372

-0.001 -3.6 1.36%


4 0.367

0.3667
0.08%
5

24 Numerical Methods in CE: Terdsak Rongviriyapanich


Homework 1
! Find the solution of this equation

x2 + sin(x) = 0 and x≠0


Sol ✗ ,=±I-sin
it
.

Using open method. ; Fixed


-

Point i
0
×

-1
;
Ea

Given x0 = -1 I

2
-0.917

-0.891 2.91%

3 -0.882

4 -0.879 0.341%

i. ✗ = -0.879

29 Numerical Methods in CE: Terdsak Rongviriyapanich


Homework 1
! Find the solution of this equation

x2 + sin(x) = 0 and x≠0

Using open method. ; Newton

Given x0 = -1
fait
Sol f' (7) ✗
Xi
= -

it ,
=
2✗tcos✗=O '

f- ( X ;)
.

I × fix ;) fix ;) Ea
;

0 -
I 0.1585 -1.4597

I -0.891 0.0162 -1.1534 12.23%


2 -0.877 0.0003 -1.1145 1.596%
3 -0.8767 0.0341 .


-0.87671$
=
i.

29 Numerical Methods in CE: Terdsak Rongviriyapanich


Homework 1
! Find the solution of this equation

x2 + sin(x) = 0 and x≠0


501 .
I ✗i fcx ;) thx ;) Ea

Using open method. ; secant


0
-0.9
-

I
0.0267
0.1585 -1.318
13.681
Given x0 = -1 I -0.8797 0.0033 -1.29 .

2 -0.8771 0.2961 .

i. ✗ =
-0.8771

✗ =
Xi
-
fcx ;) ☆
it ,

fix ;)

[ f- ( ✗ it fix ;) ]
"
f- (✗ ) =
, ) -

it ,

( ✗ it , ) -

( X ;)

29 Numerical Methods in CE: Terdsak Rongviriyapanich


2 Miners
① Fixed Point Iteration
-

in !U ✗
it ,
=

of ,( ✗ is Lil

Litt 92 ( ✗ in ski )
=
② Newton -

Raphson Method

Ui
=
✗ 31-2711-242-1=0 OU =
3×21-21 01=611
ox ox

4- =
3721-1=0 OU OW 1
2×+41
= =

01 09

i Xi Yi Ui Ui °%x 0%9 °%✗ 0%1 Ea ,x Ears


-0.125 0.25 -0.25 -3 3 1
0 -0.5 -0.5
-

I -0.4324 -0.5473 -0.008 0.0136 -0.5337 -3.054 -2.5944 I -15.634% 8.642%

2 -0.4284 -0.5506 -0.934% 0.599%

3
501.7J Fixed Point
- i ×; Ea
rinwñiñitronutñ 0 0.5

5=(0.00023051201-1)%3 I 0.8697 42.51%


0.03 (201-21-1)=13
2 0.6153 41.35%
( 201-21-1743=13.89341-15/3
3 0.7629 19.35%
( 201-21-172=2681.7951-15
4 0.6671 14.361 .

4001-801-11-4142=2681.7951-15
5 0.7251 7.9991 .

1-13=4001-801-11-4142
2681.7951-12 6 0.6884 5.3311 .

Hit ,
=/ 4001-80141-41-1 ?
2681.7951-1 ?
7 0.7111 3.1921 .

8 0.6969 2.038%

9 /
'

i. HE 0.7036m 0.7057 1.247 .

E __
0.70229-0.7036×1001 .
10 0.7002 0.785%
,
0.70229
11 0.7036 0.483%
0.187%
#
=

* Hiss -_
0.70229M
Exercise
Roots of Equation
1. Solve the following equation

• If k = 0.28 and RE = 3750, determine the value of f using fixed point


iteration method. Acceptable error < 1%
Sol
.9ñ¥=xo:7ñ

i+l=o!zgln( 37%011-(14-5.6) 0.28

try ✗

=
10

1=0.1,gln( 3,705011-(14-5.6)

0.28

✗, =
15.168

i ✗
i
Eal 't )

0 10

I 15.168 34.07%
2 13.68 10.88%

3 14.048 2.62%

4 13.954 0.673%

5 13.978 0.172%

in ✗ = I

f- I
#
= =

13.978

i. f- =
0.0051

2. Solve the following equation

• Using Newton method and x0 = 3.0 with acceptable error < 1%


Sol .
fix)=e✗sin✗ -
x2
'
f- (a) =
e✗cosx+e✗sinx -
2X

✗ it =
X -
FIX ;)
, ;
f-
'

( ✗ it

✗ =3

✗ 1=3-(-6.16-6)
-

23.05

=
2.732

i ✗i fix ;) ttx ;) Eal 't )


.

0 3 -6.166 -23.05

I 2.732 -1.345 -13.438 9.81%

2 2.632 -0.146 -10.618 3.8%

3 2.618 0.535%

i. ✗ =
2.618

3. Solve the following equation

• Using Modified Newton method and root ≠ 0 and acceptable error = 1%


Sol ✗ ( 3+2.1×2 -3.42×1-8.191=0 → ✗

=°i"51;%;;a!i"i_
. ✗

fix ) = ✗ 41-2.1×3 -3.42721-8.197


1=4×31-6.3×2
'
1- (✗ -

6.8471-8.19

12×11-12.6×-6.84
"
f- (x ) =

try ✗ ◦
= -4


it ,
=
Xi
-

fcxi )fLx ;)
?
( fix ;) ] -
fix ;)f"l✗ ;)

✗ = -4 -
(34.1271-119.65)
,

(-119.6512-134-1271134.76)

✗ =
-3.58
,

i ✗ i fix ;) thx ;) fix ;) Ea / %)

0 -4 34.12 -119.65 134.76

I -3.58 -5.246 -70.11 101.85 11.73%

2 -3.647 -0.316 -137.92 106.82 1.841 .

3 -3.649 0.05%

i. ✗ 3.649

= -
4. Solve the following equation

• Using False position method with root near 3.0 and 4.0
• Acceptable error = 1%
Sol .
✗ r= Xu
-

tlxu)( ✗ ,
-
✗ u)

fcx ,
) -
flxu )

Xi flat Xu tlxul Xp flirt Eal 't .


)

3 -6.914 4 6.598 3.512 -3.487

3.512 -3.487 4 6.598 3.681 -0.963 4.59%

3.681 -0.963 4 6.598 311 0.71%

7--3.71
#
i.
=/ 1)
Sol .
-8 I -2

A 2 -6 -

-
3 -

I 7

f- :| =/ 5)
' ° → ' -2

L 0.25 I • -5.75 1.
0 R2 1- f) R
= - -

0.375 0.239 I 0 -1.3×-1 7.*


P' 3-
(f) Ri
,

0 8.1085 P' 3-
( ¥! ! )R2

[ L ]{y}={ B } [ u ]{x } -
_
{ y}

|-O :X:| f) f- / =/ :)
-20 -2 ×

:
i 8 I

¥
,

.
" : " ◦ -
:*
s -1.5

0.375 0.239 I -34 0 0 8.1085 -16.223

Y ,
= -20 i. ✗ 3=-19.24/7.86 =
-2.001

Y,
=
-38-10.251-201=-43 ✗ 2=[-431-1.51-2.0011] / -5.75=8

Yz
= -34 0.3751-207-0.2391-433=-16.223 ✗ 1=(-201-21-2.001) 1181 ] / -8 =
4

- -
Iterative method

www.i wstuni?nxSol.-8X,tXz-
* Pivottñ

273=-20 1-81>111+1-21 /

2X -6×2-73=-38 1-61 > 1211-1-11 ✓


,

-37 ✗ 171>1-311-1-211
21-7×3=-34
-

i.
aiiiiiiwwow
% Gauss -
seidel

✗ 1=1-20 -

21-2×3 ] / -8 ✗
2,0--6.333
✗ 2=[-38-2×1,1-113] / -6 83,0=-4.857
✗ 3=1-341-37,1+72
] /7 ,

14 -5068".645 I 426.1-4%4187.2%4
i ✗ ✗2 ✗3 { {a {
, a
,✗ , ,x , a. ×
,

0 6.333 -4.857

-1.691

2 4.003 7.950 -2.006 12.571 .


8.74% 15.7%

3 3.995 7.999 -2.002 0.2% 0.61% 0.2%

4 4.000 8.001 -2.000 0.13%0.03-1 .


0.1%

✗ 4.000
'

=
.
.

✗ 2--8.001

✗ 3=-2.000
#
Gauss Elimination

(÷ : : JR
Sol .
-20
'

-61-5-1-5
'

-2,0 Xi -38/-43 ,
-

C-
f) R ,

-134s Rs -

(f) Ri
¥10 7¥ ¥1 P' 3-
( ¥¥É)R2
'
-16.2174
8. 1087

f- )
8 I -2 -

20

0 -5.75 -1.5 -43

0 0 8.1087 -16.2174

i. ✗ 3=-16.2174/8.1087 = -2

✗ 2=(-431-1.51-2) ] / -5.75 =
8

✗ =
(-201-21-2) -1181 ] / -8 = 4
fyz
,
wioñnswid ñwoto

Application in Civil Eng. 6301081622071 Sec 2

! วิศวกรต้องการคํานวณปริมาณหิน กรวดและทรายทีต: อ้ งใช้งานก่อสร้างถนน โดยจะได้จากบ่อ 3 แห่ง


ซึง: มีส่วนผสมของวัสดุทงัJ 3 คิดเป็ นร้อยละของปริมาตรดังนีJ
หิน กรวด ทราย
บ่อ 1 30 40 30
บ่อ 2 35 25 40
บ่อ 3 40 45 15
! หากงานก่อสร้างครังJ นีJ จําเป็ นต้องใช้หนิ 3800 m3 กรวด 3400 m3 และทราย 3500 m3 จงประมาณปริมาณ
การขุดจากบ่อทังJ สามโดยใช้วธิ ี LU
! หากทําการขุดทุกบ่อตามแผนในข้อ ก. ไปแล้ว 40% แต่พบว่าความต้องการวัสดุเปลีย: นไปดังนีJ ต้องใช้หนิ 3700 m3
กรวด 3200 m3 และทราย 3600 m3 จงประมาณปริมาณการขุดจากบ่อทังJ สามเพือ: ให้ได้วสั ดุตามความต้องการใหม่
" "" """"
6301081622071 Sec 2

"

÷j!÷i¥j :*:* :* :*:*,

/
:*
-6 -

I "" "" "

11=-20
-34-0.3751-201=-26.5
Y,
__

g. 3=-38+0.251-20 ) 4.18181-26.57=67.8177
-

0.25 4.1818 I

iii. :# ¥.tl :-| :


{ 5)
→ . . 0 -1.375 7.75

U =
0 -1.375 7. 7- R2
-

④Rt ) 67.8177

0 -5.75
0
>
-1.5 ,
-33.909
R }
-

④Ri )
:X } -2
Rs
I Ra )
- =

✗ 2=(-26.5-7.751-2) ] / -1.375=8
[ L ]{ y } =
{ } B -

(1) ✗ 1=[-20-1181+21-21] / -8--4


[ u ]{✗ } -
_
{ is } -12 )
#
wioñnswidñwioto
6301081622071 Sec 2

Sol .9Ñ✗ , =
Uiwiriñiynoiniroi [ L ]{ I} :{ B } -41
Uiwirinyniinhio

{ g) / 421=13400 )
✗ = 2 I 0 0 Y, 3800
g.

✗ 5- Usewvoñiyninnios I

3
3500
-

V01 V02 U' 03


13 13

÷! { !! !! ! 1¥2) / )
3800
11=3800
0.4
noon 0.25 0.45 ✗ 3400
isisaoo Eason -5%0
= - .

y }= 3500
11380011-13-31-503001=-8900
3500 -

13

{ it
I 0 0 [ U ]{ X } :{ y } -

(2)

/ /¥4,1 f- )
4-3

(;
L =
I 0.3 0-35 ° " '
3800

,
,
"
it =
50,00
-27g
-8900
13

( /
0.3 0.35 0.4

U =
0 ¥0 ¥ Ra -

( ;R ) ,
✗ 3--2542.857

0 0.05
O
'
-0.25
-

%
>
R
} -1112,1 ✗
2=[-503001-4212542.8571]/-16 } = 6714.286

Rs (-3-1314)
-

✗ 1=(3800-0.412542857)-0.35167-14.2867 ] / 0.3 =
1442.857

Ynilnironil
}
i. : 1442.857M

Yannick 2--6714.286 M3
Ynilniroñi 3--2542.857 m3 µz
wioñnswidñwioto
6301081622071 Sec 2

501.9in ,
=
Uiwiriñivnoiniroi [ L ]{ I} -

{ B } -111

f) ftp://iiiiif
Uiwiriniynilnhio

1
I

i
✗ = 2
g.

✗ i. www.ivimnios :
1
i} 3600
' '
'

voi v02 v03

÷! { !! !! ! 1¥2) / )
3900 11=3900
0.4
noon 0.25 0.45 ✗ =
3200
ai-noo-E.no "= -2000

3600 y} 3600
11390011-13-31-20001 -9900
= -
=

13

( )
I 0 0 [ U ] {X } =
{ y} -

(2)

/ ¥; / =/ of
L =

4-3 I 0.3 0.35 0.4 ✗


,
3900

1
-3

° % _

"

0 0 -9900
13

|
3 0-35 0.4

U =
0 ¥0 % ✗ 3--2828.5714

2=(-20001-1-212828.5714) ] / -1,3
-

t
0 ✗ =
8142.8572
26 ,

✗ 1=(3900-0.4/2828.5714) -0.351814285727] / 0.3 = -

271.4286

M3 '

V. Minion .TW 40% ÑnÑwio 1--1442.857 40% 577.1428 M


✗ =

Lio 2=6714.286 M3 ✗ 40% = 2685.7144 M3


}
V03 = 2542.857M ✗ 401 .
=
1017.1428 M3

:O :ÑoIYnmnioÑs3iÑwÉn
V01 = -

271.4286 -

577.1428 = -

828.5714 M3
'
V02 =
8142.8572-2685.7144=5457.1428 m

U' 03=2828.5714-1017.1428 = 1811.4286 M3



?⃝
wioñnswid ñwoto

Homework 6301081622071 Sec 2

! Perform LU method to solve the following


problem with and without partial pivoting.

2 -6 - 1  x1  − 38 
- 3     
-1 7  x2  = − 34 
 
- 8 1 - 2   x3  − 20 
" "" """"
6301081622071 Sec 2

Sol .
without partial pivoting I 0 0

=/ f)
4 2.3

t.is ↑
-

[ -38
g.
-
=

4 2.3 -341-1.51-381=-91
y,
-
-_

Y,
= -201-41-38 ) -

2.31-917=37.3

%
2 -6 -

/ / / ¥;/ =/ ¥! /
" 2 -6 -

0
¥ *
0 -10 5.5
" " I
-

18.65

④R2 ) →µ
.

Rs -

◦ ◦

[ L ]{ y } -
_

{B} -117 :X , =
-2 ✓

[ u ] {✗ } -
_
{ y} -12 ) ✗ 2=[-91-5.51-21] / -10=8 /

1=(-38+618)+11-27 ] / 2=4 /


Exercises on Optimization
Example
 Use the golden section search to find the maximum
of 1£ in fcxswnn
on

x2
f ( x) = 2 sin x −
10

within the interval of [0,4]


MININ mÑÑéwÉiwy:iwÑ
Sol Golden Section Search a-
✗ a- %
b--1.618A ,Xzt✗y=✗utk ✗ Ekta ,✗4=✗u
/
a
/ Hu it
_ -

, × %/ ✗
.

, - -

2. 618 "
< T

i × tht ✗ that fix ) ✗ fan, gars " 1×21-1/41


' 2
,ñ,wmX , ,
-
n' niou
a
iÉonñiÉ&n Timonium
0 0 0 1.528 1.765 2.472 0.63 4 -3.114 2.618

I £ 0 0.944 1.531%528 1.765


'

2.472 0.63 1.618

2 0.944 1.531 1.528 1.765 1.888 1.544 2.472 0.63 I

3 0.944 1.531 1.304 1.759 1.528 1.765 1.888 1.544 0.618

4 1.304 1.759 1.528 1.765 1.664 1.714 1.544

I
1.888

5 1.304 1.759 1.440 1.776 1.528 1.765 1.664 1.714

6 1.304 1.759 1.392 1.774 1.440 1.776 1.528 1.765

7 1.392 1.774 1.440 1.776 1.480 1.773 1.528 1.765 0.094

8 1.392 1.774 1.432 1.7757 1.440 1.776 1.480 1.773 0.061

✗ 1.440
ff
i. =
Example
Newton
 Use the golden section search to find the maximum
of "

f- ( ) < 0
x

x2
f ( x) = 2 sin x −
10

within the interval of [0,4]


Sol .
Newton Method ✗
it ,
=
Xi
-

flail
"
' f- ( X ;)
f- (x ) =
ZCOSX -

5
try ✗ ◦
= 2
"
f- (x ) -25in x

fi
= -

fix ;)
"
x
; 1- ex ;) Eat .

0 2 -1.232 -2.019

I 1.3895 0.0826 -2.167 43.94%

ᵗᵈÉm÷[w
, 1.421-1-0.0002 '

3 1.4276 0.01%

maximum

i. ✗ 1.4276

=
One-dimensional Optimization

"
Sol f' ( x ) 58 -15×2-20 ✗ it , -_ ✗ - f '( ✗ it
. =
i
"
f- (x ;)
20×3
"

f- (x ) = -
30A

• Minimize the above function with x0 = 4.0


fix ;) t "cx ;) Eat

/ .ua/,a.smfw.wofu.*.,
i ×; .

0 4 1020 1160

I 3.121 308.131 514.209 28.16%

2 2.521 86.738 244.972 23.8%

, ,

4 2.024 2.463 105.113 7.071 .

5 2.001 0.0587 100.123 1.151 .

6 2.000 0.05%

i. ✗ =
2.000

Application in Civil Eng.
 คานยาว L = 5 m มีแรง P ขนาด 500 N กระทาที่กึ่งกลางคานตามรูป

จงหาตาแหน่ งของคานที่มีระยะโก่งตัวสูงสุด โดยใช้วธิ ี Newton


(ยอมรับค่าคลาดเคลื่อนที่ 2 %)
กาหนดให้สมการการโก่งตัวของคานเท่ากับ
500N

÷ 1=5 M
, 1

501.888 Newton
Mill = 15 P ✗ =
X; _
f%✗i )
it ,
48 EI f "( ✗ ;)

ÑÑ fix )=K✗( ✗2-31×+212 ) try ✗



=3

Unwin L -5M ;
-

fcx ) =
K( ✗ 3- 15×21-50×1 ✗ :3 -
[31312-301311-50]
,

f-
'
( X) =
K( 3×2-30×+50 ) 1613 ) -
30 ]
"

f- (a) =
K( 6×-30 ) X =
1.9167
,

.mg/o3.5,3oa4-.,18.5,*04g/5.o6.,52.%,.4
ixitixpf.tn/pEa%03 -13 -12

I 1.9167

, ,

3 2.1132 0.0001 -17.321 0.298%

, , ,, 0.0021 .

i. ✗ = 2.11325 M

Example

f ( x, y ) = 2 xy + 2 x − x 2 − 2 y 2
step1 : determine the gradient direction of this function at x = -1 and y = 1
f
= 2 y + 2 − 2x = 6
x
f
= 2 x − 4 y = −6
y
therefore gradient vector : f = 6i - 6 j
Sol . Gradient method

try ✗

= -1
, Yo = I tlh) =
21-1 tbh ) ( I -
6h ) 1- 21 -
It 6h ) -

C- It 6h12 _
211 -
6h12
of 12h 12h 72h2 12h -112h 36h2 -124h 72h2
=
211-2 -
2X =
6 = -2 1- 1- - -
2 1- -
I - _
2 -

g✗
"
of = 2X -

41=-6
= -
7- + 72h -
180h
02

i. Ñ tf
'
=
bi -

6J f- Ch ) = 72 -

360h = 0

h =
0.2 → lmw% ✗
, , 4,

6h

¥h It
=
=
✗ 1-
-

, ◦
,
✗ I t 610.2 ) 0.2
_

= -
=
.
.

¥yh 6h 610.2 )
Y, Lot
=
I
Y, I -0.2
= -
= -
=

MAX , = 0.2
, 4. = -0.2 f- ( h ) =
210.2 1- 1. 2h11-0.2T 1.2h ) 1-210.21-1 2h7 .
-
10.21-1 .
2h12 -

2C 0.2
-
1- 1. 2h12

¥ ,
= 1.2 = -

1. 44h2 t 2.88h +0.2

of =
1.2

01 '
f- ( h) = -2.88h t 2.88=0

a :| Ñ Tf =
1.2 it 1.2J h = 1.0 ibnwtw ✗
2,1 ,

0.2 1- 1. 2h
✗2 X t
%h X 0.2 1- 1.24.07 1.4
'

= = = =
,
. .

,
,

0.2 1- 1.211.0 ) 1.0


Y,
= - =

Y , =L , 1- 0th = -0.2 -11.2h


01

ñirioiwñ -0
¥y=0
-
in :
Example

f ( x, y ) = 2 xy + 2 x − x 2 − 2 y 2
step1 : determine the gradient direction of this function at x = -1 and y = 1
f
= 2 y + 2 − 2x = 6
x
f
= 2 x − 4 y = −6
y
therefore gradient vector : f = 6i - 6 j
Sol . Newton Method

¥ 211-2 2x
y
=
2×-41
-
=

off = -

2 02 f =
-4

ox
'

if =
2

okay

1:11 :ᵗ÷H:÷÷÷;¥H:|
"

try ✗

=
-1,10=1

1:11:11 : :/ I :|
pilot 0 =
6 -

20×1-201-111
0 6 t
20×-401-127
= -

snñowmri :| ñ

DX = 3

0
by =

i. ✗ = ✗ t DX = -
I t 3 = 2

1 to I
y yo 1-
by
= = =


Multi-dimensional Optimization

• Given the initial value of x1 = -1 and x2 = 1


Sol .

0¥ =
6✗ ? -

4×1×21-611 , -2×2 ¥ = -

2x ? -

27,1-6×2
, ,

Olf = 127 -

4×2 t b o 't = 6
,

ox ? oxi

02 f- =
-411 -

2
,

011,0×2

I :H¥¥H:÷¥÷÷÷÷.lk:1
hi ✗
,
= -1
,

,
= I o :| Ñ

1%1.1+1 ill ::|


"

0 =
2 -
10 DX t 20×2 -41
,

0 = 6 t 2 DX t 60×2-127
,

DX = 0
,

DX = -
I
,

i. ✗ = -
I to = -

I
,

✗ It C- 1) 0

= =
,

You might also like