Sie sind auf Seite 1von 11

MILNE PREDICTOR METHOD

START

Enter Values of X0, Y0, Xr

Enter value of ‘h’

Calculate

𝑝 4ℎ
𝑌4 = 𝑌0 + [2𝑌1′ − 𝑌2′ + 2𝑌3′ ]
3

𝑝 𝑝
Calculate 𝑥4 = 𝑥3 + ℎ and 𝑓4 = 𝑓(𝑥4 , 𝑦4 )


𝑦4𝑐 = 𝑦2 + [𝑦2′ − 4𝑦3′ + 𝑦4′ ]
3

Display Value of 𝑦 = 𝑦4𝑐

STOP
BIRGE VIETA

START

Enter degree of Equation i.e. ‘n’

Enter Number of Iterations (i)

Enter Initial Approximation and Coefficient


of Equation

i=1

Calculate bn = an – an-1 and cn-1 = bn-1 + Pcn-1

𝑏𝑛
Calculate Next Approximation Pn+1 = Pn – 𝑐
𝑛−1

i=i+1

No
Is i > n ?

Yes

Root = Pn+1

Display Root

STOP
SIMPSON’S ⅓ RULE

Read Lower Limit i.e ‘a’


START
& Upper Limits i.e. ‘b’

Read Number of Intervals ‘n’ or read ‘h’

𝑥𝑛 −𝑥0
If n is not given n = ℎ

Calculate y0, y1, y2, y3, y4, ……, yn

1𝑟𝑑
Calculate I using 3
Rule

Result of Integration = I

Display Result

STOP
LINEAR CURVE FITTING

START

Read the Total number of Data Points ‘n’

Read the Values of Data points xi , yi

Calculate ∑xi, ∑yi, ∑xiyi, xi2 and (∑xi)2

Solve Equation for a, b using LCF Formula

Put the Values in y = bx + a

Display Result

STOP
NEWTON FORWARD INTERPOLATION

START

Read number of total data


points ‘dp’ and values of
those points i.e. x & y = f(x)

Read values of x=x1 at which


y is to be interpolated

𝑥𝑟 − 𝑥0
Calculate h = x1 – x0 and r = ℎ

Calculate Forward Difference

∆y0 = y1 – y0

∆2y0 = ∆y1 - ∆y0


RUNGE KUTTA METHOD - 4TH ORDER
∆3y0 = ∆2y1 - ∆2y0

START
𝑟(𝑟−1)∆2 𝑟(𝑟−1)(𝑟−2)∆3
Calculate 𝑦𝑟 = [1 + 𝑟∆ + 2!
+ 3!
+ …..]𝑦
Read x0, y0

Read values of x at
which y is to be found

Read h

Calculate k1, k2, k3 and k4


Calculate 𝑦𝑛+1 = 𝑦𝑛 + 2(k1+2k2+3k3+k4)

x0 = x1 + h , y0 = y1 to make convenient for loop

No
If x0 > x

Yes

Display x, y

STOP
EULER’S METHOD

START

Read initial value of x0 & y0

Read step size h

Read values of x at
which y is to be found

Calculate y1 = y0 + f(x0, y0)

x0 = x0 + h, y0 = y1

This is to simplify logic

No
Is x0>x ?

Yes

Display Result

STOP
GAUSS SIEDAL

START

Read number of Variable ‘n’

Read coefficient of variable aij , bj for i = 1 to n


and j = 1 to n

Arrange 2 dimensional array aij such that aij array


dominant

i = j = 1, x1 = x2 = x3 = ….. = xn = 0

1
xi = 𝑎 [ bi – (aj1x1 + aj2x2+…. + ajnxn)], i and j1 to n and j ≠ i
𝑖𝑗

No
Wheather required
accuracy is reached?

Yes

Display value of variable

STOP
GAUSS ELIMINATION

START

Read number of variables n


also n= number of equations

Read coefficient of equations

aij for i = 1, 2, 3, …, n and j = 1, 2, 3,…., n

bj for j = 1, 2, …, n

i=1

Eliminate xi from all the equation form new set at (n-1)


equation

i=i+1

Yes
If i < n-1
?

No

Use Backward substitution to find


values of xi = 1, 2, …., n

Display xi = I = 1, 2, …., n

STOP
Bisection Method

START

Input Interval [a,b]

Enter the Number of


Iterations

𝑎+𝑏
𝑐=
2

Calculate F(a), F(b), F(c)

If F(a)* b=c
F(b) < a

If F(b)* b=c
F(c) < a

n=n-1

If n<=0

Root = c

Display Root

STOP
NEWTON RAPHSON METHOD

START

Read initial approximation


‘x0’ and iteration ‘n’.

Calculate f(xa) and f’(xa)

Calculate next approximation


𝑓(𝑥𝑎 )
𝑥1 = 𝑥𝑎 –
𝑓′ (𝑥𝑎 )

n = n-1

x0 ← x1 If n<=0

Root = x1

Display Root

STOP

Das könnte Ihnen auch gefallen