Numerical analysis slide
Numerical analysis slide
MATH 6370
Annalisa Quaini
[email protected]
Office : PGH 662
Lecture : TuTh 2:30 PM - 4:00 PM in SEC 201
Office hours : Th 1:00 PM - 2:30 PM or BY APPOINTMENT
* No class next week!
Chord method
We have:
b−a
φ0chord (x) = 1 − f 0 (x).
f (b) − f (a)
Thus, if we have f 0 (α) = 0 we get φ0chord (α) = 1, which means
that the method is not guaranteed to converge.
Chord method
The condition
|φ0chord (α)| < 1
leads to
b−a
1− f 0 (α) < 1,
f (b) − f (a)
that is
Chord method
We get
b−a
0< f 0 (α) < 2.
f (b) − f (a)
This condition is equivalent to requiring that
b−a
f (b) − f (a)
has the same sign as f 0 (α) and that interval [a, b] is s.t.:
f (b) − f (a)
b−a<2 .
f 0 (α)
f (x)
φ(x) = x − .
f ′ (x)
Let α be a zero of f , i.e. such that f (α) = 0. Note that φ′ (α) = 0, when
f ′ (α) 6= 0. Indeed,
Newton method
x(k+1) − α f ′′ (α)
lim = .
k→∞ (x(k) − α)2 2f ′ (α)
Proof. The property of convergence comes from the Proposition 2, while the
quadratic convergence is a consequence of the Proposition 3, because
′ φ′′ (α) f ′′ (α)
φ (α) = 0 and 2
= 2f ′ (α)
.
Assuming that if k is large enough, we have φ′ (ξ (k) ) ≈ φ′ (α) and knowing that
the Newton method for φ′ (α) = 0, if α is a simple zero, we find the estimation
The error that we commit when we adopt the criterion (8) is smaller than the
fixed tolerance.
or
|f (x(k) )| < ǫ (control of the residual),
where ǫ is a fixed tolerance.
1
e(k) ≈ (x (k+1)
− x (k)
).
(1 − φ′ (α))
We can plot the graph of (1−φ1′ (α)) and comment on the relevance of the
stopping criterium based on the increment:
y f y
f (x(k) )
f
−1000
−2000
−3000
−4000
−5000
−6000
0 0.05 0.1 0.15 0.2 0.25 0.3
We can apply the Newton method with initial guess x(0) = 0.05
>> df=@(x) 1000*((1+x).^5.*(1-5*x) - 1)./(x.^2);
>> [zero,res,niter]=newton(f,df,.05,1e-5,1000);
The result is approximately the same, but we need only 3 iterations
The interest rate is 6.14%.
2.5
f (θ)
1.5
0.5
−0.5
−4 −3 −2 −1 0 1 2 3 4
θ
We have two roots, which means that we have two possible configurations.
for V > 0 . We do not consider V < 0 (it does not have physical meaning),
because V is the volume of gas.
We use the commands in Matlab/Octave:
0
f(V)
−2
−4
−6
−8
0.03 0.04 0.05 0.06 0.07 0.08 0.09 0.1
V
[zero,res,niter]=bisection(f,0.03,0.1,1e-12,1000,p,T,a,b,N,k);
x (k+1) − α
lim = φ0 (α).
k→∞ x (k) − α
Thus:
Aitken’s Method
Set
x (k) − x (k−1)
λ(k) = .
x (k−1) − x (k−2)
Let’s check that
lim λ(k) = φ0 (α).
k→∞
Aitken’s Method
Aitken’s Method
Aitken’s Method