Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 20

ORDINARY DIFFERENTIAL EQUATIONS

Mathematical Background
Definition of Differential Equation:

An equation containing derivatives or differentials of one or more dependent


variables, with respect to one or more independent variables.

 Classification by type : - Ordinary Differential Equation (ODE) is one


involving a single independent variable:

- Partial Differential Equation (PDE):

 Classification by Order : The order of the highest-order derivative in a differential


equation is called the order of the equation.

; is a second-order ODE

; is a first-order ODE

; is a fourth-order PDE

“The object here is to determine the original function given the


differential equation. The original function then represents the
solution”.

The analytical solution of differential equations, as well as partial differential equations, is


called the “closed-form solution.” This solution requires that the constants of integrations be

1
ORDINARY DIFFERENTIAL EQUATIONS
evaluated by using prescribed values of the independent variable(s). Therefore an ordinary
differential equation of order n requires that n conditions be specified (initial or boundary
value).

In order to illustrate this concept, let us start with a given function:

(a)

which is a third-order polynomial. Now, if we differentiate equation (a), we obtain and ODE:

(b)

We can determine the solution of ODE analytically by integrating equation (b)

(c)

and gives the solution:

(d)

which identical to the original function with one notable exception (i.e. C which is called the
constant of integration).

In order to specify the solution completely, a differential equation is usually accompanied by


auxiliary conditions. For first-order ODEs, a type of auxiliary condition called an initial value
is required to determine the constant and obtain a unique solution. For example, equation (d)
could be accompanied by the initial condition that at x = 0 and y = 1.

; which gives C = 1

and by substituting this value into equation (d) to yield:

Figure bellow shows both the curves of and .

2
ORDINARY DIFFERENTIAL EQUATIONS

Notice how the zero values of the derivatives correspond to the point at which the original
function is flat – that is, has a zero slope. Also, the maximum absolute values of the
derivatives are at the ends of the interval where the slopes of the function are greatest.

Initial Value Problems and Boundary Value Problems


Problems of solving ordinary differential equations (ODE) are classified into:

 Initial value problems


 Boundary value problems

Many initial value problems are time-dependent, in which all the conditions for the solution
are specified at the initial time. The initial condition is always a part of the problem definition

3
ORDINARY DIFFERENTIAL EQUATIONS
because the solution of an initial value problem can be uniquely determined only if an initial
condition is given. The example for initial value problem:

 First-order ordinary differential equation

If the differential equation is used to describe the behavior of a physical system, such as
deflection of beam, temperature distribution in a region, etc., then the specific conditions at
the boundaries are called boundary conditions and the equation is called a boundary value
problem. The example for boundary value problem:

Boundary conditions at both ends:

At x = 0;

At x = L;

The numerical methods for initial value problems are significantly different from those for
boundary value problems. In this chapter only initial value problem will be discussed.

4
ORDINARY DIFFERENTIAL EQUATIONS

Euler’s Method
Salah satu teknik yang paling mudah untuk memprediksi solusi dari persamaan diferensial
yakni Metode Euler, atau Metode Garis Tangen (Method of Tangent Lines).

Dari gambar diatas dapat dilihat bahwa titik ( x1 , y1 ) = ( x0+h , y1 ) berada pada garis
tangen yang menyinggung kurva pada ( x0 , y0 ). Dalam hal ini, kurva tersebut merupakan
solusi persamaan diferensial yang belum diketahui.

Dengan bantuan titik serta garis tersebut dapat dibentuk persamaan:

atau

dimana sehingga dapat ditulis:

atau

Jika x0+h , ditukar dengan label x1 , maka titik ( x1 , y1 ) pada garis tangen merupakan
prediksi dari titik ( x1 , y(x 1) ) yang berada pada kurva solusi persamaan, dimana y1  y(x 1).

Keakuratan hasil dari prediksi sangat tergantung dari besarnya nilai h (step size). Biasanya
nilai step size diambil cukup kecil sehingga didapatkan hasil yang cukup memuaskan.

5
ORDINARY DIFFERENTIAL EQUATIONS

Selanjutnya untuk memprediksi titik selanjutnya pada kurva solusi dapat digunakan
persamaan:

atau

substitusikan sehingga didapatkan:

Secara umum dapat ditulis:

dimana:

6
ORDINARY DIFFERENTIAL EQUATIONS

Contoh soal: Carilah solusi persamaan diferensial berikut


dengan interval x = 0 sampai x = 1.5 dan step size h = 0.15. Kondisi awal pada x = 0 , y
= 1.

Solusi: Diketahui bahwa sehingga dengan menggunakan persamaan


Euler dapat ditulis:

Untuk h = 0.15 dan dari kondisi awal didapatkan:

selanjutnya untuk didapatkan:

dan untuk didapatkan:

Perhitungan dilanjutkan terus sampai nilai xn = 1.5

Hasil perhitungan dengan program komputer untuk solusi persamaan diferensial


adalah sebagai berikut:

INPUT NILAI X0 : .00000000


INPUT NILAI X1 : 1.50000000
INPUT NILAI Y0 : 1.00000000

7
ORDINARY DIFFERENTIAL EQUATIONS
INPUT PRINT INTERVAL : .15000000
INPUT NILAI H : .15000000

--------------------------------------------
LANGKAH KE NILAI X NILAI Y
--------------------------------------------
1 .00000000 1.00000000
2 .15000000 .77500000
3 .30000000 .59274999
4 .45000000 .49374999
5 .60000000 .51849999
6 .75000000 .70749999
7 .90000000 1.10124999
8 1.05000000 1.74025002
9 1.20000000 2.66500002
10 1.35000000 3.91600004
11 1.50000000 5.53375002

8
ORDINARY DIFFERENTIAL EQUATIONS

Perbandingan antara nilai eksak dan perkiraan dengan metode


numerik (Metode Euler) dari solusi persamaan diferensial dapat dilihat
pada gambar dibawah ini.

(Catatan: metode numerik menggunakan interval x = 0 sampai x = 1.5 , step size h = 0.15,
dan kondisi awal x = 0 , y = 1 )

9
ORDINARY DIFFERENTIAL EQUATIONS

Contoh soal: Carilah solusi persamaan diferensial berikut


dengan interval x = 1 sampai x = 1.5 dan step size h = 0.05. Kondisi awal pada x = 1 , y
= 1.

Solusi: Diketahui bahwa sehingga dengan menggunakan persamaan Euler


dapat ditulis:

Untuk h = 0.05 dan dari kondisi awal didapatkan:

selanjutnya untuk didapatkan:

dan untuk didapatkan:

Perhitungan dilanjutkan terus sampai nilai xn = 1.5

Hasil perhitungan dengan program komputer Metode Euler untuk solusi persamaan
diferensial adalah sebagai berikut:

PROGRAM EULERS METHOD

INPUT NILAI X0 : 1.00000000

10
ORDINARY DIFFERENTIAL EQUATIONS
INPUT NILAI X1 : 1.50000000
INPUT NILAI Y0 : 1.00000000
INPUT PRINT INTERVAL : .05000000
INPUT NILAI H : .05000000

--------------------------------------------
LANGKAH KE NILAI X NILAI Y
--------------------------------------------
1 1.00000000 1.00000000
2 1.05000000 1.10000000
3 1.10000000 1.21550000
4 1.15000000 1.34920499
5 1.20000000 1.50436357
6 1.25000000 1.68488721
7 1.30000000 1.89549810
8 1.35000000 2.14191285
9 1.40000000 2.43107108
10 1.45000000 2.77142104
11 1.50000000 3.17327708

Contoh soal: Carilah solusi persamaan diferensial berikut


dengan interval x = 1 sampai x = 1.5 dan step size h = 0.1. Kondisi awal pada x = 1 , y =
1.

11
ORDINARY DIFFERENTIAL EQUATIONS
Hasil perhitungan dengan program komputer Metode Euler untuk solusi persamaan
diferensial adalah sebagai berikut:

INPUT NILAI X0 : 1
INPUT NILAI X1 : 1.5
INPUT NILAI Y0 : 1
INPUT PRINT INTERVAL : 0.1
INPUT H (STEP SIZE) : 0.1

--------------------------------------------
LANGKAH KE NILAI X NILAI Y
--------------------------------------------
1 1.00000000 1.00000000
2 1.10000000 1.20000000
3 1.20000000 1.46400001
4 1.30000000 1.81536002
5 1.40000000 2.28735361
6 1.50000000 2.92781262
--------------------------------------------

INGIN ULANGI PERHITUNGAN (Y/T) ?

12
ORDINARY DIFFERENTIAL EQUATIONS

Perbandingan antara nilai eksak dan perkiraan dengan metode numerik (Metode
Euler) dari solusi persamaan diferensial dapat dilihat pada gambar dibawah ini.

(Catatan: metode numerik menggunakan interval x = 1 sampai x = 1.5 , step size h = 0.05,
dan kondisi awal x = 1 , y = 1 )

13
ORDINARY DIFFERENTIAL EQUATIONS

Heun’s Formula (Improvements of Euler’s Method)


Metode ini dilakukan dengan mencari turunan dua buah titik yang membatasi daerah interval
h yakni pada titik awal x0 dan akhir x1. Kedua turunan yang didapatkan tersebut kemudian
dirata-ratakan untuk mendapatkan pendekatan kemiringan yang lebih baik (improved
estimate) pada interval tersebut. Pendekatan ini dikenal dengan nama Metode Heun.

Gambar diatas menunjukkan secara grafis cara pendekatan solusi persamaan diferensial
dengan Metode Heun. Metode ini disebut juga dengan Pendekatan Prediksi – Koreksi
(Predictor – Corrector Approach) yakni.

prediksi
dimana:

koreksi

Secara umum persamaan Metode Heun dapat ditulis:

Hasil perhitungan dengan program komputer Metode Heun (Improved Euler Method) untuk
solusi persamaan diferensial adalah sebagai berikut:

14
ORDINARY DIFFERENTIAL EQUATIONS

PROGRAM IMPROVED EULERS METHOD (HEUNS)

INPUT NILAI X0 : 1.00000000


INPUT NILAI X1 : 1.50000000
INPUT NILAI Y0 : 1.00000000
INPUT PRINT INTERVAL : .05000000
INPUT H (STEP SIZE) : .05000000

--------------------------------------------
LANGKAH KE NILAI X NILAI Y
--------------------------------------------
1 1.00000000 1.00000000
2 1.05000000 1.10775000
3 1.10000000 1.23323038
4 1.15000000 1.37976899
5 1.20000000 1.55141224
6 1.25000000 1.75309583
7 1.30000000 1.99085945
8 1.35000000 2.27211813
9 1.40000000 2.60600588
10 1.45000000 3.00381268
11 1.50000000 3.47954150
--------------------------------------------

15
ORDINARY DIFFERENTIAL EQUATIONS

Perbandingan antara nilai eksak dan perkiraan dengan metode numerik (Metode
Euler dan Metode Heun) dari solusi persamaan diferensial dapat dilihat pada
gambar dibawah ini.

(Catatan: metode numerik menggunakan interval x = 1 sampai x = 1.5 , step size h = 0.05,
dan kondisi awal x = 1 , y = 1 )

16
ORDINARY DIFFERENTIAL EQUATIONS

Runge-Kutta Methods
Beberapa tipe dari Metode Runge-Kutta adalah:
 Metode Runge-Kutta Orde Kedua.
Salah satu versi dari Metode Runge-Kutta Orde Kedua adalah:

dimana:

 Metode Runge-Kutta Orde Ketiga.


Salah satu versi yang umum digunakan dari Metode Runge-Kutta Orde Ketiga adalah:

dimana:

 Metode Runge-Kutta Orde Keempat.


Metode ini merupakan metode yang paling populer dan akurat dibanding dengan tipe lain
dari Metode Runge-Kutta. Salah satu versi dari tipe ini:

17
ORDINARY DIFFERENTIAL EQUATIONS

dimana:

Hasil perhitungan dengan program komputer Metode Runge-Kutta Orde Keempat untuk
solusi persamaan diferensial adalah sebagai berikut:

INPUT NILAI X0 : 1
INPUT NILAI X1 : 1.5
INPUT NILAI Y0 : 1
INPUT PRINT INTERVAL : 0.05
INPUT NILAI H : 0.05
--------------------------------------
LANGKAH KE NILAI X NILAI Y
--------------------------------------
1 1.00000 1.00000
2 1.05000 1.10794
3 1.10000 1.23368
4 1.15000 1.38057
5 1.20000 1.55271
6 1.25000 1.75505
7 1.30000 1.99371
8 1.35000 2.27618
9 1.40000 2.61169
10 1.45000 3.01168
11 1.50000 3.49033
--------------------------------------
INGIN ULANGI PERHITUNGAN (Y/T) ?

18
ORDINARY DIFFERENTIAL EQUATIONS

Perbandingan antara nilai eksak dan perkiraan dengan metode numerik (Metode
Runge-Kutta Orde Keempat) dari solusi persamaan diferensial dapat dilihat pada
gambar dibawah ini.

(Catatan: metode numerik menggunakan interval x = 1 sampai x = 1.5 , step size h = 0.05,
dan kondisi awal x = 1 , y = 1 )

19
ORDINARY DIFFERENTIAL EQUATIONS

Nilai eksak dari persamaan

NILAI X NILAI Y
1.00000 1.00000
1.05000 1.10794
1.10000 1.23368
1.15000 1.38057
1.20000 1.55271
1.25000 1.75505
1.30000 1.99372
1.35000 2.27618
1.40000 2.61170
1.45000 3.01169
1.50000 3.49034

20

You might also like