Anteprima
Vedrai una selezione di 9 pagine su 36
Numerical analysis - Appunti + esami svolti Pag. 1 Numerical analysis - Appunti + esami svolti Pag. 2
Anteprima di 9 pagg. su 36.
Scarica il documento per vederlo tutto.
Numerical analysis - Appunti + esami svolti Pag. 6
Anteprima di 9 pagg. su 36.
Scarica il documento per vederlo tutto.
Numerical analysis - Appunti + esami svolti Pag. 11
Anteprima di 9 pagg. su 36.
Scarica il documento per vederlo tutto.
Numerical analysis - Appunti + esami svolti Pag. 16
Anteprima di 9 pagg. su 36.
Scarica il documento per vederlo tutto.
Numerical analysis - Appunti + esami svolti Pag. 21
Anteprima di 9 pagg. su 36.
Scarica il documento per vederlo tutto.
Numerical analysis - Appunti + esami svolti Pag. 26
Anteprima di 9 pagg. su 36.
Scarica il documento per vederlo tutto.
Numerical analysis - Appunti + esami svolti Pag. 31
Anteprima di 9 pagg. su 36.
Scarica il documento per vederlo tutto.
Numerical analysis - Appunti + esami svolti Pag. 36
1 su 36
D/illustrazione/soddisfatti o rimborsati
Disdici quando
vuoi
Acquista con carta
o PayPal
Scarica i documenti
tutte le volte che vuoi
Estratto del documento

Analisi dei risultati

Come possiamo vedere dai risultati, il metodo di Newton converge a α con una sola iterazione.

Nella parte 2, i valori di α sono 10 e 1.6129 10 .

T (x) è consistente se T (α ) = α e T (α ) = α .

T (α ) = 10 = α

T (α ) = 1.6129 10 = α

Il metodo è consistente.

7. 2 α1′ −1·|T = 2.5163 10 < 1(α )| =1 2−3 α 12 α2′ 0|T ·(α )| = = 8.0922 10 > 12 2−3 α 2

Il metodo è convergente solo per α .

10. −1 0· ̸ ·T (α ) = 3.6104 10 = α T (α ) = 1.6129 10 = α2 1 1 2 2 23

Il metodo è consistente solo per α .

12. −αe 1′ 0√ ·|T = 3.9741 10 > 1(α )| =1 −α−3 2 e 1−αe 2 −1′ √ ·|T = 1.2358 10 < 1(α )| =2

−α−3 2 e 2

The method is convergent only for α .215. −1 0−3.6104 · −1.6129 · ̸T (α ) = 10 = α T (α ) = 10 = α2 1 1 2 2 2

The method is consistent only for α .117. −αe 1′ 0√|T − ·(α )| = = 3.9741 10 > 11 −α−3 2 e 1−αe 2 −1′ √ ·|T − = 1.2358 10 < 1(α )| =2 −α−3 2 e 2

The method is convergent only for α .2 4

Exam 07-09-2020

Lorenzo Sostegni

1 Numerical Linear Algebra

1.1 Part 1

  1. (k+1) (k)x = B x + g
  2. −1−B = I α P Aα ̸ −3. To satisfy this condition we need det(A ) = 0 for i = 1, . . . , n 1.i
  3. A generic linear iterative method is convergent if and only if ρ(B) < 1, where ρ(B) =|λ |max and λ is the i-th eigenvalue of matrix B.i i i

1.2 Part 2 −16true ·1. ρ(B) = 0.7083 < 1. The method is convergent.

e = 7.9286 10-15 true · 2. ρ(B) = 0.4273 < 1. The method is convergent. e = 1.0145 10-15 true · 3. ρ(B) = 0.5614 < 1. The method is convergent. e = 1.3859 102 Approximation 2.1 Part 1 2.3.2.2 Part 2 −1·1. E = 1.8332 10-3·2. E = 8.6501 10-4·3. E = 4.0147 10-3·max 23 Ordinary Differential Equations 3.1 Part 1 u = u + ∆t f (t , u )n+1 n n n 2. u = u + ∆t f (t , u )n+1 n n+1 n+1 3. 1u = u + ∆t [f (t , u ) + f (t , u )]n+1 n n+1 n+1 n n 23.2 Part 2 −5·1. e = 1.1558 10M T −5−2.6277 ·2. e = 10M T −7·3. e = 7.1659 10M T 4 Nonlinear Equations 4.1 Part 1 1. Saying that α is a fixed point of Φ means that the relationship α = Φ(α) holds. 2. Assume that Φ satisfies: • α = Φ(α) • ⊂Φ(I ) Iα α • 1∈Φ C (I )α • ′|Φ ≤(α)| K < 1 Then the fixed point

iteration is convergent and we have:(k+1)-α x' = Φ (α)lim (k)-α xk→+∞ 2∈3. Let I denote a sufficiently small closed interval containing. Assume g C (I ) withα α' '(k+1) (k)̸ -g (α) = 0. Then the sequence x = Φ(x ), with Φ(x) = x g(x)/g (x), converges for(0) ∈every x I and we have:α '' ''(k+1)-α x Φ (α) g (α)lim = =(k) 2- 2 2 g (α)(α x )k→+∞ 34.2 Part 2 -2.83841. α = 0, α = and α = 2.8384.1 2 3 '|Φ2. In order to obtain convergence we need (x)| < 1.' '' '|Φ |Φ |Φ(α )| = 0.3333 (α )| = (α )| = 2.85801 2 3As we can see we have convergence only in α .1-16 -16-2.1758 · ·3. niter = 33, α = 10 and e = 2.1758 101,c c4Exam 18-01-2021Lorenzo Sostegni1 Numerical linear

algebra1.1 Part 11. If we compute the determinant of the matrix we see that it is equal to 0. Therefore, the matrix is singular. 2. The necessary and sufficient condition for LU factorization is det(A) = 0 for i = i-1, . . . , n-1. 3. No, because these methods need that A ≠ 0. Since the element A is null, the theorems cannot be applied (Page 139). 4. If A is strictly dominant by rows the two methods are convergent (Theorem 3.10, page 139). |4| | → 1| |4| | - | → 1| + 1| |4| | - | → 1| + 1| = 2| | - |1|4| > 2| 5. Since A is tridiagonal it can be demonstrated that ρ(B) = ρ(B'). Since the smaller is the spectral radius the faster is the convergence, the Gauss-Seidel iterative method.

is faster in converging to the exact solution than the Jacobi one.

1.2 Part 2

det(A) = 4

det(A) = 15

det(A) = 56

det(A) = 2091

1 2 3 4

-11 0 0 0

0 4 0 0

0 1 0 0

0 0 0 0

-0.25 -11 0 0

0 0 3.75 0

0 0 0 1

0 0 0 0

-0.2667 -10 1 0

0 0 0 3.7333

0 0 0 1

0 0 0 0

-0.2679 -10 0 1

0 0 0 0

0 0 3.7321 0

0 0 0 1

[L, U, P]=LU pivot(A);

1 d=det(L)*det(U);

2 1det(A) = 0

ρ = 0.4330 < 1. The method is convergent.

J10. ρ = 0.1875 < 1. The method is convergent.

J12. niterJ = 33, niterGS = 18.

- -

rel err J = 9.7617e 13, rel err GS = 3.9611e 13.

2 Approximation

2.1 Part 1

Q (f) = 0.5h

e (f) = 0h

Q (f) = 0.25h

e (f) = 0.0833h

2.2 Part 2

2. E f = 2.3809.n 23.

4. E f = 0.6804.

3 Ordinary Differential Equations

3.1 Part 1

From page 147 : -u = u + θ Δt f(t, u) + (1 - θ)

Δt f(t, u)n+1 = nn+1 - y(t) y'(t), F k+1 ky = kΔt3

Δt f(t, u)n+1 = nn+1 - y(t) y'(t), B k k-1y = kΔt4

Δt f(t, u)n+1 = nn+1 - y(t) y'(t), C k+1 k-1y = k2Δt33.2 Part 28. 12. max err F E = 0.0885 max err BE = 0.0864 max err CN = 0.00374 Nonlinear Equations

4.1 Part 11. From page 157. Assume that T satisfies:

  • α = T(α)
  • ∇T(I) Iα α
  • 1 ∈ T C(I)α
  • ′|T ≤(α)| K < 1

Then the fixed point iteration is convergent and we have:

(k+1)-α x ′lim = T(α)(k)-α xk→+∞

2. From page 159 Newton’s method formula: ′ -g(x) = g(x) + g'(x)(x - x)(k+1)(k)(k)(k+1)(k)Iteration function: g(x)-T(x) = x ′g'(x)

4.2 Part 22. -1 -1 -1 -1-9.2388 · -3.8268 · · ·α = 10 α = 10 α = 3.8268 10 α = 9.2388 101 2 3 4

5. The derivative is equal: x′

−T (x) = 3182 −2 (x ) 4

From point 1 we can check that: −1−9.2388 ·α = T (α ) = 101 1 ∈T (I ) = [−0.9672, 0.9672] [−1, 1]α′|T |0.5858|(α )| = = 0.5858 < 11T converges to α .1 16. −1 −13−9.2388 · −9.1549 ·α = 10 err = 1018. The derivative is equal: x′T (x) = 3182 −2 (x ) 4From point 1 we can check that: −1·α = T (α ) = 9.2388 104 4 ∈T (I ) = [−0.9672, 0.9672] [−1, 1]α′|T |0.5858|(α )| = = 0.5858 < 14T converges to α .2 49. −1 −13· ·α = 9.2388 10 err = 9.1549 104 5

Exam 01-02-2021

Lorenzo Sostegni

1 Numerical Linear Algebra

1.1 Part 1

|1 | ± |1 | − |1|+ θ| > 1| = 1 + θ| > 1| + = 2

Since the second condition is more stringent we take this system of equations.

2. Solving the previous equation we obtain:−2 ∨1 +

θ < 1 + θ > 2−3 ∨θ < = θ θ > 1 = θ1 23. Since the matrix is strictly diagonally dominant by row and it is tridiagonal it can be2shown that the relationship ρ(B ) = (ρ(B )) holds. Since the smaller is the spectralGS Jradius the faster is the convergence of the method, we can say that the Gauss-Seideliterative method converges faster than the Jacobi method.

1.1.1 Part 2

ρ = 0.6006.

J2. ρ = 0.3608.

GS4. niterJ = 51. −13·5. rel err J = 5.3842 10 .

7. niterGS = 27. −13·8. rel err GS = 6.1355 10 .

2 Approximation

2.1 Part 1

1. (Page 121). 1 (n+1)||E ≤ ||f || ||ω ||f (x)||n n+1∞,[a,b] ∞,[a,b] ∞,[a,b](n + 1)!(n+1)Where f is the derivative of the function and therefore depends only on the function− − −chosen. ω is the nodal polynomial defined as ω (x) = (x x ) (x x ) . . . (x x ).n+1 n+1 0 1 n2. Since the function is a polynomial and the degree

The formula for the interpolating polynomial is:

Dettagli
Publisher
A.A. 2021-2022
36 pagine
6 download
SSD Scienze matematiche e informatiche MAT/08 Analisi numerica

I contenuti di questa pagina costituiscono rielaborazioni personali del Publisher lore210698 di informazioni apprese con la frequenza delle lezioni di Numerical analysis e studio autonomo di eventuali libri di riferimento in preparazione dell'esame finale o della tesi. Non devono intendersi come materiale ufficiale dell'università Politecnico di Milano o del prof Sacco Riccardo.