Modeling quizzes

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

1/56

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.

57 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)