Respect,
Professionalism,
&
Entrepreneurship
Akar Persamaan
(Roots of Equations)
Pertemuan – 2, 3
Mata Kuliah : Analisis Numerik Kode : CIV - 208
Respect,
Professionalism,
&
Entrepreneurship
• Sub Pokok Bahasan :
Metode Biseksi
Metode Regula Falsi
Respect,
Professionalism,
&
Entrepreneurship
Years ago, we learned to use
the quadratic formula
to solve
The values calculated with
Eq. (1) are called the “roots”
of Eq. (2).
They represent the values of
x that make Eq. (2) equal to
zero.
(1
)
(2
)
a
ac b
b x
2
4 2
Respect,
Professionalism,
&
Entrepreneurship
Bracketing Methods
• This topic on roots of equations deals with methods that
exploit the fact that a function typically changes sign in the vicinity of a root.
• These techniques are called bracketing methods because
two initial guesses for the root are required.
• As the name implies, these guesses must “bracket,” or be
on either side of, the root.
• The particular methods described herein employ different
strategies to systematically reduce the width of the bracket and, hence, home in on the correct answer
• Three methods classified as Bracketing Methods are :
Respect,
Professionalism,
&
Entrepreneurship
Graphical Method
•
A simple method for obtaining an
estimate of the root of the equation
f(x)=0 is to make a plot of the
function and observe where it
crosses the x axis.
•
This point, which represents the
Respect,
Professionalism,
&
Entrepreneurship
Example 1 :
Use the graphical approach to determine the real
root of :
Various values of x can be substituted
into the right-hand side of this
equation to compute f(x),
for example if x = 0, then
f(x) = 4(0)
3– 6(0)
2+ 7(0) – 2,3 =
− 2,3
Try for another value of x, and
tabulated the results
x f(x) 0 -2,3 0,1 -1,656 0,2 -1,108 0,3 -0,632 0,4 -0,204 0,5 0,2 0,6 0,604 0,7 1,032
x 4x3 6x2 7x 2,3Respect,
Professionalism,
&
Entrepreneurship
These points are plotted in
Figure.
The x value as a horizontal
axes, and f(x) as a vertical
axes
Respect,
Professionalism,
&
Entrepreneurship
•
The validity of the graphical estimate can
be checked by substituting it
•
which is close to zero, and x = 0,45 said
as a root of
0,45
4
0,45
3 6
0,45
2 7
0,45
2,3 0,0005f
x 4x3 6x2 7x 2,3Respect,
Professionalism,
&
Entrepreneurship
Bisection Method
•
When applying the graphical technique in
Example 1, we have observed that f(x)
changed sign on opposite sides of the root.
•
In general, if f(x) is real and continuous in
the interval from x
lto x
uand f(x
l) and f(x
u)
have opposite signs, that is,
f(x
l)f(x
u)<0
Respect,
Professionalism,
&
Entrepreneurship
Respect,
Professionalism,
&
Entrepreneurship
Termination Criteria and Error Estimates
•
an approximate percent relative error ε
acan be
calculated, as in
•
where x
rnewis the root for the present iteration and
x
roldis the root from the previous iteration.
•
The absolute value is used because we are usually
concerned with the magnitude of ε
arather than with
its sign.
•
When ε
abecomes less than a prespecified stopping
criterion ε
s, the computation is terminated.
%
x
x
x
new r
old r new
r
a
100
Respect,
Professionalism,
&
Entrepreneurship
Example 2 :
Use bisection to solve the same problem
approached graphically in Example 1, until
the approximate error falls below a stopping
criterion of
ε
s=0.5%.
Root of equation
x 4x3 6x2 7x 2,3Respect,
Professionalism,
&
Entrepreneurship
The False-Position Method
• A shortcoming of the bisection method is that, in dividing the interval from xl to xu into equal halves, no account is
taken of the magnitudes of f(xl) and f(xu).
• For example, if f(xl) is much closer to zero than f(xu), it is
likely that the root is closer to xl than to xu.
• An alternative method that exploits this graphical insight is to join f(xl) and f(xu) by a straight line.
• The intersection of this line with the x axis represents an improved estimate of the root.
• The fact that the replacement of the curve by a straight line gives a “false position” of the root is the origin of the name, method of false position, or in Latin, regula falsi.
Respect,
Professionalism,
&
Entrepreneurship
•
Using similar
triangles, the
Respect,
Professionalism,
&
Entrepreneurship
Example 3 :
Use the false-position method to
determine the root of the same
equation investigated in Example 1.
Respect,
Professionalism,
&
Entrepreneurship
Home work (Group)
Kerjakan soal dari buku Chapra Soal
no.
Respect,
Professionalism,
&
Entrepreneurship
•
For the bracketing methods, the root is located
within an interval prescribed by a lower and an
upper bound.
•
Repeated application of these methods always
results in closer estimates of the true value of the
root.
•
Such methods are said to be convergent because
they move closer to the truth as the computation
progresses
•
In contrast, the open methods are based on
formulas that
require only a single starting
Respect,
Professionalism,
&
Entrepreneurship
•
As
such,
they
sometimes diverge or
move away from the
true
root
as
the
computation
progresses (Fig. b).
•
However, when the
Respect,
Professionalism,
&
Entrepreneurship
Simple Fixed-Point Iteration
•
Open methods employ a formula to
predict the root.
•
Such a formula can be developed for
simple fixed-point iteration (or, as it is
also called, one-point iteration or
successive substitution) by rearranging
the function f(
x
)=0 so that
x
is on the
left-hand side of the equation:
Respect,
Professionalism,
&
Entrepreneurship
•
This transformation can be
accomplished either by algebraic
manipulation or by simply adding x
to both sides of the original
equation.
•
For example,
Respect,
Professionalism,
&
Entrepreneurship
•
The utility of Eq. (1) is that it provides a formula
to predict a new value of x as a function of an old
value of x.
•
Thus, given an initial guess at the root x
i, Eq. (1)
can be used to compute a new estimate x
i+1as
expressed by the iterative formula
x
i+1
=
g
(
x
i
)
(2)
•
the approximate error for this equation can be
determined using the error estimator
%
x
x
x
i
i i
a
100
1
1
Respect,
Professionalism,
&
Entrepreneurship
Example 1 :
Use simple fixed-point iteration to
locate the root of
The function can be separated directly and
expressed in the form
x 4x3 6x2 7x 2,3f
7
3 2 6
4 3 2
1
, x
x
Respect,
Professionalism,
&
Entrepreneurship
•
Starting with an initial guess of x
0=0,
this iterative equation can be
applied to compute
Root of equation
x 4x3 6x2 7x 2,3Respect,
Professionalism,
&
Entrepreneurship
The Newton-Raphson Method
• Perhaps the most widely
used of all root-locating formulas is the Newton-Raphson equation.
• If the initial guess at the
root is xi, a tangent can be
extended from the point [xi, f(xi)].
• The point where this tangent
Respect,
Professionalism,
&
Entrepreneurship
•
the first derivative at x is equivalent
to the slope
•
Which can be rearranged to yield
Newton-Raphson formula :
Respect,
Professionalism,
&
Entrepreneurship
Example 2 :
Use the Newton-Raphson method to
estimate the root of
employing an initial guess of x
0= 0
The first derivative of the function can be
evaluated as
f’
(
x
)= 12x
2– 12x + 7, which
can be substituted along with the original
function into Eq. (3) to give
Respect,
Professionalism,
&
Entrepreneurship
•
Starting with an initial guess of x
0=0, this
Respect,
Professionalism,
&
Entrepreneurship
• Although the Newton-Raphson
method is often very efficient, there are situations where it performs poorly.
• Fig. a depicts the case where an
inflection point [that is, f’’(x)=0] occurs in the vicinity of a root.
• Fig. b illustrates the tendency of
the Newton-Raphson technique to oscillate around a local maximum or minimum.
• Fig. c shows how an initial guess
that is close to one root can jump to a location several roots away.
• Obviously, a zero slope [f’(x)=0] is
Respect,
Professionalism,
&
Entrepreneurship
The Secant Method
•
A potential problem in implementing the
Newton-Raphson method is the evaluation of
the derivative.
•
Although
this
is
not
inconvenient
for
polynomials and many other functions, there
are certain functions whose derivatives may be
extremely difficult or inconvenient to evaluate.
•
For these cases, the derivative can be
Respect,
Professionalism,
&
Entrepreneurship
Respect,
Professionalism,
&
Entrepreneurship
•
Equation (4) is the formula for the
secant method.
•
Notice that the approach requires
two initial estimates of x.
•
However, because f(x) is not
required to change signs between
Respect,
Professionalism,
&
Entrepreneurship
Example 3 :
Respect,
Professionalism,
&
Entrepreneurship
The Difference Between the Secant and False-Position Methods
• The Eqs. Above are identical on a term-by-term basis. • Both use two initial estimates to compute an
approximation of the slope of the function that is used to project to the x axis for a new estimate of the root.
• However, a critical difference between the methods is how
one of the initial values is replaced by the new estimate.
False-Position
Formula Secant Formula
Respect,
Professionalism,
&
Entrepreneurship
• Recall that in the false-position method the latest estimate of the root replaces whichever of the original values yielded a function value with the same sign as f(xr).
• Consequently, the two estimates always bracket the root.
• Therefore, the method always converges
• In contrast, the secant method replaces the values in strict
sequence, with the new value xi+1 replacing xi and xi replacing xi−1.
• As a result, the two values can sometimes lie on the same side of the root.
Respect,
Professionalism,
&
Entrepreneurship
Method xroot iteration ea(%)
Bisection 0,4512 10 0,4329 False Position 0,4506 4 0,3612 x=g(x) 0,44856 7 0,47396 Newton
Raphson 0,4501 6 0,001 Secant 0,4501 3 0,402
Respect,
Professionalism,
&
Entrepreneurship
Homework 1
Frekuensi alami dari getaran bebas (free vibration) balok
uniform yang terjepit pada salah satu ujungnya dan bebas pada ujung yang lain dapat dicari dari persamaan berikut
cos(L)cosh(L) = 1 Dengan :
L = panjang elemen balok = 2 meter
= berat jenis elemen balok
n = frekuensi alami balok (rad/dt) EI = kekakuan lentur balok
Tetapkan 3 buah nilai n dari persamaan di atas. kemudian gunakan nilai untuk menentukan frekuensi alami balok.
a
n n
Respect,
Professionalism,
&
Entrepreneurship
Homework 2
HItunglah panjang kurva (L), dari suatu lengkung / busur jalan dengan parameter – parameter :
PC = titik kurvatur, PT = titik tangensial, PI = titik perpotongan. Kurva mempunyai 7 elemen :
1. Radius kurva, R 2. Sudut lengkung, I 3. Jarak tangensial, T 4. Panjang kurva, L 5. Panjang busur, Lc 6. Ordinat tengah, M 7. Jarak luar, E
Hubungan antara kelengkungan dan jari – jari : Diketahui nilai :
Respect,
Professionalism,
&
Entrepreneurship
Homework 3
Hubungan antara debit air Q penampang saluran terbuka
berbentuk trapesium terhadap parameter geometri penampang adalah : m3/dt. Hitung besarnya y!