Modeling quizzes

0.0(0)
studied byStudied by 16 people
learnLearn
examPractice Test
spaced repetitionSpaced Repetition
heart puzzleMatch
flashcardsFlashcards
Card Sorting

1/88

encourage image

There's no tags or description

Looks like no tags are added yet.

Study Analytics
Name
Mastery
Learn
Test
Matching
Spaced

No study sessions yet.

89 Terms

1
New cards

Quiz 1

Intro concepts, Iteration, convergence, residual, FD,TE,RO

2
New cards

Iteration (Loop

x1 =1/2 (x0+ r/x0)

3
New cards

Residual

f(xi)=ans or |f(xi+1)|=TOL

4
New cards

Fixed point

Integer

5
New cards

Floating point

Real

6
New cards

Round off error

Finite accuracy which stores real numbers (storage error) Finite accuracy of arithmetic inherent error (arithmetic error)

7
New cards

Iterative convergence

|x1-x0|=ans

8
New cards

Emachine

smallest number you can add or subtract and still find a difference

9
New cards

Forward difference example

knowt flashcard image
10
New cards

Truncation error

Due to approximations used to represent exact mathematical operations and quantities. We cant actually use an infinite number of terms.

11
New cards

Quiz 2

Data representation and bisection

12
New cards

Bisection

departs from premise that [a,b] brackets a simple root in between a and b which is p of f(x)

13
New cards

Bisection steps

chk midterm by p1=a+b/2

if |f(p1)<TOL

yes then stop; no keep going

if root is less than p1 then [a,p]

If its greater than p1 then [p,b]

+ then x>0, 0 then x=0, - then x<0

sign f(a)*sign(f(p1) < 0

14
New cards

IEEE (Institute for electrical and electronics engineers)

Sign bit, characteristic, mantissa, bias is set by the computer when precision is declared.
c>b t is pos

c<b t is neg

t=c-b

15
New cards

Single Precision integer

16 bits

Largest possible integer +- 32, 767

16
New cards

Double Precision integer

32 bits
Largest possible integer +- 2,147,483,647

17
New cards

Double precision real

64 bits

Largest number is 2047 and bias is 1023

smallest number 10-308 which is zero in double precision corresponds to zero in c and f

largest number 10308 corresponds to 1 in c and f

any attempt to make any smaller than +-10-308 it just resets to that and its not fatal (real underflow error)

any attempt to make any larger than +- 10308 it is a fatal error (real overflow error) NAN

<p>64 bits</p><p>Largest number is 2047 and bias is 1023</p><p>smallest number 10<sup>-308</sup> which is zero in double precision corresponds to zero in c and f</p><p>largest number 10<sup>308</sup> corresponds to 1 in c and f</p><p>any attempt to make any smaller than +-10<sup>-308</sup> it just resets to that and its not fatal (real underflow error)</p><p>any attempt to make any larger than +- 10<sup>308</sup> it is a fatal error (real overflow error) NAN</p>
18
New cards

Single precision real

32 bits
Largest number is 255 and bias is 127

smallest number corresponds to zero +-10-38

largest number corresponds to one +-1038

any attempt to make any smaller than +-10-38 it just resets to that and its not fatal (real underflow error)

any attempt to make any larger than +- 1038 it is a fatal error (real overflow error) NAN

<p>32 bits<br>Largest number is 255 and bias is 127</p><p>smallest number corresponds to zero +-10<sup>-38</sup></p><p>largest number corresponds to one +-10<sup>38</sup></p><p>any attempt to make any smaller than +-10<sup>-38</sup> it just resets to that and its not fatal (real underflow error)</p><p>any attempt to make any larger than +- 10<sup>38</sup> it is a fatal error (real overflow error) NAN</p>
19
New cards

ex

x=-39.9
(-39.9)10=-1.00111111100110011×25

b=127

t=c-b

c=t+b

=5+127

=132

(132)10=(10000100)2

20
New cards

Putting in binary

1 is odd and 0 is even

For just a number like 25 just divide by 2 till you get to 1

and for a decimal like 0.2 just multiply by 2 till you get to the amount needed (most likely given in the question)

21
New cards

Ex

knowt flashcard image
22
New cards

Error abs and relative

knowt flashcard image
23
New cards

Horner’s Method

It can be used for both 1st and 2nd derivatives, It’s used to reduce round off error, and it can be applied to polynomials with complex arguments.

<p>It can be used for both 1st and 2nd derivatives, It’s used to reduce round off error, and it can be applied to polynomials with complex arguments.</p>
24
New cards

Quiz 3

fixed point, Newton-Raphson,Gauss elimination

25
New cards

Fixed point

Used for iterative solution of linear system of equations to solve f(x)=0 and then rearrange somehow in the form of x=g(x)

You’ll start with an initial guess then iterate

x1= g(x0)

x2= g(x1)

x3= g(x2)

xn+1=g(xn)

26
New cards

ex

You can rearrange it other ways too

<p>You can rearrange it other ways too</p>
27
New cards

To find when fixed point iteration converges

You need to use intermediate value theorem for derivatives.

28
New cards

Fixed Point Theorem

A sufficient but not necessary condition for the fixed point iteration. Provides a convergence criteria basically.
x=g(x)

to converge is that

|g’(xn)|<1 for n=0,1,2,…

We can use it to check the initial guess

<p>A sufficient but not necessary condition for the fixed point iteration. Provides a convergence criteria basically.<br>x=g(x)</p><p>to converge is that</p><p>|g’(x<sub>n</sub>)|&lt;1 for n=0,1,2,…</p><p>We can use it to check the initial guess</p>
29
New cards

Newton-Raphson

Method requires: f(x) and f’(x)

converges “very fast” when it converges

diverges “very fast” when it diverges

a general way to find a fixed point form for any f(x) or geometrically

<p>Method requires: f(x) and f’(x)</p><p>converges “very fast” when it converges</p><p>diverges “very fast” when it diverges</p><p>a general way to find a fixed point form for any f(x) or geometrically</p>
30
New cards
<p>NR example</p>

NR example

Only one initial guess

Do residual, do the 1st update

Then the residual of that |f1(x2)|=ans, then iterative convergence |x2-x1|=ans

<p>Only one initial guess</p><p>Do residual, do the 1st update</p><p>Then the residual of that |f<sub>1</sub>(x<sub>2</sub>)|=ans, then iterative convergence |x<sub>2</sub>-x<sub>1</sub>|=ans</p>
31
New cards

Geometric interpretations

knowt flashcard image
32
New cards

Secant Method

Approximates f’(xn) in the NR by a backward finite difference generate iteration.

<p>Approximates f’(x<sub>n</sub>) in the NR by a backward finite difference generate iteration.</p>
33
New cards

Secant Method ex

Needs two initial guesses, do residuals for both guesses, then do the 1st update, residual from that answer then the iterative convergence.

<p>Needs two initial guesses, do residuals for both guesses, then do the 1st update, residual from that answer then the iterative convergence.</p>
34
New cards

Muller’s method

Extension of secant method

Good method for complex roots

Rate of convergence is K=1.84

Requires 3 initial guesses
Assume a quadratic and use this formula to find x3 and solve the quadratic

To avoid RO error if b2»4ac express result in an alt manner
Chk residual, update solution and we use them to find x4 and etc

<p>Extension of secant method</p><p>Good method for complex roots</p><p>Rate of convergence is K=1.84</p><p>Requires 3 initial guesses<br>Assume a quadratic and use this formula to find x<sub>3</sub> and solve the quadratic</p><p>To avoid RO error if b<sup>2</sup>»4ac express result in an alt manner<br>Chk residual, update solution and we use them to find x<sub>4</sub> and etc</p>
35
New cards
<p>Finding roots of</p>

Finding roots of

initial guess

count the number of iterations to convergence

replace the location of the initial guess with the number of iterations

plot the result

36
New cards

Ex of the roots

knowt flashcard image
37
New cards

End of 1st exam material

yippee

38
New cards

Small system of equations

N < 2,000

Use direct methods and N is limited by R.O

39
New cards

Large system of equations

N > 2,000
Use iterative methods. No limits on N

40
New cards

Gauss elimination

Its how we solve Ax=b

rearrange exactly using ERO’s Ax=b into an upper triangular form where we can find easily

det(A)

solution of Ax=b

41
New cards

FVM and FEM

Finite Volume Methods and Finite Element Methods

42
New cards
term image

<p></p>
43
New cards

We write the equations as Ax=b

knowt flashcard image
44
New cards

Vector norms and properties

Measures of size of vectors

||x||

<p>Measures of size of vectors</p><p>||x||</p>
45
New cards
term image

a[NxN] matrix operates on an [Nx1] vector and produces another [Nx1] vector

a linear transformation

To be able to solve a1 and a2 must be linearly independent

46
New cards

Matrix Operations

knowt flashcard image
47
New cards
<p>Example</p>

Example

knowt flashcard image
48
New cards
<p>Transpose</p>

Transpose

Example

<p>Example</p>
49
New cards
<p>Inverse</p>

Inverse

knowt flashcard image
50
New cards

Extra example

knowt flashcard image
51
New cards

Useful Property

(AB)-1= B-1A-1

52
New cards

Can you always solve Ax=b

No, you can only solve if A-1 exists and this is assured if the determinant is not zero

|A|≠0 or det(A)≠0

53
New cards

Determinant refresher

knowt flashcard image
54
New cards

Ex:

knowt flashcard image
55
New cards

Cramer’s Rule

Legit take the det(A)
For larger N, Cramer’s rule isnt practical it takes N! floating point operations

56
New cards

Ex using cramer’s rule

knowt flashcard image
57
New cards

ERO’s

Used to rearrange in a form where the determinant can be calculated

  1. multiply row by non-zero constant (scaling which scales determinant)

  2. add multiple of one row to another row (rotation about root)

  3. switch two rows (reorder the way equations are written change the sign of the determinant by -1)

58
New cards

Quiz 4

Pivoting, LU, Jacobi, Gauss Seidel, Iterative methods

59
New cards

The following matrix
| 0.2 -3 2 |
| 1 10 7 |
| 2 1 -8 |

will require pivoting when solved by Gauss Elimination

is not diagonally dominant

60
New cards

Faced with the following coefficient matrix of a system of equations to be solved by Gauss elimination methods

| -15 2 1 |
| -5 -12 1 |
| -5 7 -19|

will partial pivoting be required?

No, because the matrix is diagonally dominant

61
New cards

When factoring the NxN matrix [A] into its upper and lower [LU] factors

Crouts method set up the diagonal elements of [u] equal to one

Doolittle's method set the diagonal elements of [L] equal to one

Is exact except for round off error

62
New cards

The Thomas Algorithm

Can store and solve the problem on 4 vectors

Is used to solve tridiagonal systems of linear equations

Uses Crout's method to find the factors of the coefficient matrix [A]

63
New cards

The LU decomposition method applied to the linear systems [A][x] = [b] is assume that the matrix [A] is fully populated

Is used when the coefficient matrix [A] stays constant and there are multiple right hand sides [b] to solve

is a direct method of solution

is a method that takes O(N^3) floating point operations to solve the system of equations for the first right hand side vector [b] and subsequently takes O(N^2) for any new right hand side vector [b]

64
New cards

If a set of simultaneous equations [A][x] = [b] is solved by an iterative and [A] is 400x400 matrix and if it takes k = 10 iterations to coverage, then number of floating point operations to find of

1,600,000

65
New cards

If a set of simultaneous equations [A][x] = [b] is solved by an iterative and [A] is 200x200 matrix and if it takes k = 10 iterations to coverage, then number of floating point operations to find of

400,000

66
New cards

Iterative methods of solution for simultaneous equations include

Gauss - Seidel Iteration

Successive over relaxation (SOR)

Jacobi iteration

67
New cards

The system of equations
| 4 1 | {x1} = { 1 }
| 0 3 | {x2} = {5}

is solved by the Jacobi iteration and the solution vector after the 3rd iteration is

{x1}^2 = {1}
{x2} {1}

The residual norm is evaluated using the Linf norm as

4

68
New cards

When solving a linear system of equations by Jacobi iteration, given the following two vectors at iterations 2 and 3

{x}^2 = {0.27}
{ 0.1 }
{x}^3 = { 0.1 }
{ 0.2 }

Using the Linf norm the iterative convergence criterion is

0.17

69
New cards

The system of equations
| 4 1 | {x1} = { 1 }
| 0 3 | {x2} = {5}

is solved by the Jacobi iteration and the solution vector after the 3rd iteration is

{x1}^2 = {2}
{x2} {2}

The residual norm is evaluated using the Linf norm as

9

70
New cards

Gauss Elimination

The process of using row operations to transform a linear system into on whose augmented matrix is in row echelon form.

71
New cards

Quiz 5

72
New cards

Faced with the following coefficient matrix of a system of equations to be solved by iterative methods

| -5 2 1 |
| -5 -12 14 |
| -5 7 -19 |

Do you have any guarantee that you will obtain a solution?

No, because the matrix is not diagonally dominant

73
New cards

The eigenvalues of a matrix are

ya = { 1.2 }
{ -1.56}

Then when [A] pre-multiplies any vector that is not an eigenvector of [A] then it will

Decrease its magnitude
Rotate the vector

74
New cards

The eigenvector [A] of the matrix [A] of the linear system of equations [A][x] = [b] satisfy the following equation
Note: Here (I) is the identity matrix. [A]^T is the transpose of [A] and y is a scalar value.

[A][/\] = y[/\]

75
New cards

If the conditioning number of the coefficient matrix [A] of a system of linear equations [A][x] = [b] is very high

SVD can be used to solve the problem approximately by discarding the nearly linearly dependent equations

There is a large uncertainty in the error and small residuals do not necessarily indicate an accurate solution

Numerical solutions are highly sensitive to input errors

76
New cards

The Linf norm (row sum norm) of the following matrix

| 2 -3 2|
| 1 -1 7|
| 2 1 2|

is evaluated as

9

77
New cards

With respect to the eigenvalues and eigenvectors of a matrix

Eigenvalues solve an Nth order polynomial for an NxN matrix

Eigenvalues are uniquely defined and are specifically associated with that matrix

Eigenvectors are not uniquely defined and are expressed equivalently up to an arbitrary multiple of each vector

78
New cards

The L1 norm (column sum norm) of the following matrix is evaluated as

| -21 -3 2|
| 1 -1 7|
| 2 1 2|

24

79
New cards

The eigenvalues of a matrix are

ya = { 0.2 }
{ 0.56}

Then when [A] pre-multiplies any vector that is an eigenvector of [A] then it will

Decrease the magnitude
Not rotate that vector

80
New cards

The matrix [A] that has a norm of ||A|| = 3.2x10^3 and the norm of the inverse of the matrix is ||A^-1|| = 2.5x10^12. If a solution is obtained for a system of equations [A][x] = [b] using this same matrix and double precision computations then

The solution is very sensitive to input error.

Small residuals do not indicate accurate answers.

The system is ill-conditioned.

81
New cards

Quiz 6

82
New cards

When applied to solving the system of non-linear equations
f(x) = 0
one step equivalent of the Newton Raphson method is

{x}^n+1 = {x}^n - [J({x}^n)]^-1 {f({x}^n}

83
New cards

When solving the simultaneous set of coupled non-linear equations {f(x)} = 0 by the Newton Raphson iterative method, the iteration is stopped when the residual criterion is met.

If the n+1th solution vector is {x}^n+1, then the residual stopping criterion is defined in terms of some appropriate vector norm || || and a user-supplied error tolerance TOL as:

|| f{x}^n+1 || < TOL

84
New cards

The Levenberg Marquardt algorithm

is a method that automatically combines steepest descent and the Newton Raphson algorithm for solving non-linear equations

85
New cards

The Jacobian Matrix [J] that arises in the Newton Raphson method for simultaneous non-linear equations {f(x)} = 0

Has entries Jij = parfi/ parxj
Must be updated at each iteration

86
New cards

Given the two simultaneous non-linear equations to be solved by the Newton-Raphson method

f1(x) = x1 - 2x1x2
f2(x) = 6x1-x1^3x2

and a current solution vector at the n+1 iteration
(x1)^n+1 = (2)
(x2) (2)
then the element J2,2 of the Jacobian matrix is evaluated as

-8

87
New cards

The Jacobian matrix evaluates for N = 10 simultaneous non-linear equations

has 100 entries of partial derivatives

can be approximately evaluated using finite differences

88
New cards

Given the two simultaneous non-linear equations to be solved by the Newton-Raphson method

f1(x) = x1 - 2x1x2
f2(x) = 6x1-x1^3x2

and a current solution vector at the n+1 iteration
(x1)^n+1 = (2)
(x2) (2)
then the element J1,2 of the Jacobian matrix is evaluated as

-4

89
New cards

When solving the simultaneous set of coupled non-linear equations {f(x)} = 0 by the Newton Raphson iterative method, the iteration is stopped when the residual criterion is met.

If the n-th solution vector is {x}^n+1, then the residual stopping criterion is defined in terms of some appropriate vector norm || || and a user-supplied error tolerance TOL as:

|| {x}^n+1 - {x}^n || < TOL