Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

SOLUTION OF NUMERICAL METHODS USING THE ONE STEP METHOD

Objective

To solve a function of the nature yi+1 = yi + ϕh

Background

The value of y can be solved by integrating numerically, where the next value of y is given by

yi+1 = yi + ϕh

1st derivative provides direct estimate of slope at xi and this slope, ϕ = f (xi, y i)

This can be expressed as y i+1 = yi (xi, yi) h …. This is Eulers;s method.

yi+1 = yi + ϕh

ϕh
yi ϕ

xi x i+1

The problem involved solving the function

f(x,y) = - 2x3 + 12 x2 – 20x + 8.5

for x = 0 to x = 4

and h =0.5

by way of of integrating the function can be written as

y = f (x,y) = -0.5x4 + 4x3 – 10x2+08.5x

whose exact solution is y = - 0.5x4 +4 x3 – 10x2 +08.5 x+1

when x = 0 and y = 1 gives a constant of integration c = 1


Solving analytically, this problem can be presented in a table calculated in a spreadsheet as follows.

yi+1
x f(xi,yi) yi yi+1 (EXACT)
0.0 8.50 1 1 1
0.5 1.25 5.250 3.21875
1.0 -1.50 5.875 3
1.5 -1.25 5.125 2.21875
2.0 0.50 4.500 2
2.5 2.25 4.750 2.71875
3.0 2.50 5.875 4
3.5 -0.25 7.125 4.71875
4.0 -7.50 7.000 3

The first column in the table is the value of x, incrementally stepped by a step value of h. In this case h=
0.5. The third column yi is an initial value of y assigned as 1 for iteration purposes. This procedure is
repeated with the next value of y

You might also like