Final Exam Flashcards
(43 cards)
How to solve 5th order equation using bisection method ?
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)
What is LU decomposition used for?
LU decomposition is used to solve simultaneous equations efficiently
It is particularly faster than Gauss-Jordan elimination for large systems.
When is Gauss-Jordan elimination considered practical?
Gauss-Jordan elimination is practical for solving small systems
It may not be efficient for larger systems or multiple equations.
What condition makes the Gauss-Seidel method applicable?
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.
What is the relationship between LU decomposition and solving multiple equations?
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.
Define numerical differentiation.
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 to solve higher order equations using Newton Rampson method
x_n+1 = x_n - f(x_n)/f’(x_n)
How to divide complex numbers in C ?
use typedef struct {double Real; double Im} Complex;
How do divide complex numbers by hand ?
Multiply the equation by its complex conjugate then solve
What is Cramer’s Rule ?
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
Best method to solve simultaneous equations using linear algebra ?
LU Decomposition
What is Guass Sieder method ?
Moving all the parts to the other side and express each variable as an equation of the other variables
What is central difference scheme ?
f’(x) = [f(x + h) - f(x - h) / 2h ] Oh
Printf in matlab
fprintf(‘Text’)
hwo to get an inverse in matlab
ivn[a]
scanf equivelent in MATLAB
input(‘Enter a number’)
Change word directory in MATLAB
cd c:\temp
translate
for (k = 0; k < 10; k = k+2) to MATLAB
for k=0 : 2 : 10
‘function’;
end;
Standard Method for solving ordinary differential equations
Runge-Kutta Method
How to remove noise from a signal y in MATLAB
use
f = fft(y)
plot(abs(f))
for i = 1:236; if abs(f(i)) < 80; i = 0; end; end
command
How to create m file
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)
Euler’s Rule of Differential Equations
y_n+1 = yn + hf(t_n,y_n)
Translate
#include <math.h>
#include <stdio.h>
into python language</stdio.h></math.h>
import math
import sys
how to print in python
print(‘words’)
sys.exit(0)