Final Exam Flashcards

(43 cards)

1
Q

How to solve 5th order equation using bisection method ?

A

choose x1 & x2 such that f(x1)/f(x2) < 0.

Set x3 to be (x1+x2)/2

If f(x1)/f(x3) < 0 then x2 = x3

Else set x1 = x3

Until |x1 - x2| < f(x3)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What is LU decomposition used for?

A

LU decomposition is used to solve simultaneous equations efficiently

It is particularly faster than Gauss-Jordan elimination for large systems.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

When is Gauss-Jordan elimination considered practical?

A

Gauss-Jordan elimination is practical for solving small systems

It may not be efficient for larger systems or multiple equations.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What condition makes the Gauss-Seidel method applicable?

A

The diagonal elements of the matrix A should be generally larger than non-diagonal elements

This condition helps in the convergence of the iterative method.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the relationship between LU decomposition and solving multiple equations?

A

LU decomposition is more practical and faster for solving multiple equations with the same matrix A but different right-hand sides

This makes it a preferred method in numerical analysis.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Define numerical differentiation.

A

Numerical differentiation is the process of estimating the derivative of a function using numerical methods

It contrasts with analytical differentiation, which uses algebraic manipulation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

How to solve higher order equations using Newton Rampson method

A

x_n+1 = x_n - f(x_n)/f’(x_n)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

How to divide complex numbers in C ?

A

use typedef struct {double Real; double Im} Complex;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do divide complex numbers by hand ?

A

Multiply the equation by its complex conjugate then solve

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is Cramer’s Rule ?

A

That x1, x2, x3 can be solved using the 3x3 (where the solution value of each equation aligns with the column of the the n value.) divided by the determinate

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Best method to solve simultaneous equations using linear algebra ?

A

LU Decomposition

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is Guass Sieder method ?

A

Moving all the parts to the other side and express each variable as an equation of the other variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is central difference scheme ?

A

f’(x) = [f(x + h) - f(x - h) / 2h ] Oh

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Printf in matlab

A

fprintf(‘Text’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

hwo to get an inverse in matlab

A

ivn[a]

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

scanf equivelent in MATLAB

A

input(‘Enter a number’)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

Change word directory in MATLAB

A

cd c:\temp

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

translate
for (k = 0; k < 10; k = k+2) to MATLAB

A

for k=0 : 2 : 10
‘function’;
end;

19
Q

Standard Method for solving ordinary differential equations

A

Runge-Kutta Method

20
Q

How to remove noise from a signal y in MATLAB

A

use
f = fft(y)
plot(abs(f))
for i = 1:236; if abs(f(i)) < 80; i = 0; end; end
command

21
Q

How to create m file

A

create a note that has the name “f.m”

function y = f(x)
y = 4/3x;
end;

then go to Matlab and open it as f(value)

22
Q

Euler’s Rule of Differential Equations

A

y_n+1 = yn + hf(t_n,y_n)

23
Q

Translate
#include <math.h>
#include <stdio.h>
into python language</stdio.h></math.h>

A

import math
import sys

24
Q

how to print in python

A

print(‘words’)
sys.exit(0)

25
how to do a note in python
note
26
how to do scanf in Python
a = float(imput('Enter value'))
27
how to if statement in Python
if disc < 0 print('imaginary !'\n) sys.exit(0)
28
how to sqrt in Python
math.sqrt
29
how to do a power in Python ?
**n
30
how to do for statement in Python
for in range (start, stop, step)
31
how to define a function in Python
def f(x)
32
How to print in FORTRAN
PRINT *,"HELLO WORLD !"
33
Why would you use FORTRAN
For Fluid Dynamics and other engineering computational
34
Which column are notes placed in FORTRAN
Column 1
35
Which line are line identification reserved for in FORTRAN
2 - 5
36
What is line 6 used for in FORTRAN
continuation
37
Where does the official code start in FORTRAN
7th column
38
How to do scanf in FORTRAN
WRITE(*,*) Enter 3 coeficceints READ(*,*) A, B, C
39
How to define values in FORTRAN
DOUBLE PERCISION A, B, C, DISC, X1, X2
40
How to **if** statement in FORTRAN
IF (DISC.LE.0.0) THEN STOP ENDIF
41
How to FOR statement in FORTRAN
use a **DO** statement followed by the line which will finish the statement: DO 10 I=0,999,1 statement 10 CONTENUE
42
How to declare a function in FORTRAN
FUNCTION f(x) Double precision f, x f = 4.0/1x**2 return end
43