You are on page 1of 16

TEKNIK KOMPUTASI

TEI 116/A

Jurusan Teknik Elektro dan Teknologi Informasi
Universitas Gadjah Mada
2011
Why ”teknik komputasi” ?
 Komputasi or computation comes from the word 
compute that is ”make a mathematical calculation”
 Komputasi adalah kegiatan mendapatkan penyelesaian 
atau solusi atas persoalan yang dinyatakan dalam model 
matematis.
 Teknik komputasi adalah perangkat ilmu tentang alat 
(biasanya sebuah komputer), metode (yang disebut 
algoritma) dan teori (bukti matematis bahwa komputasi 
memberi hasil yang benar) yang diperlukan untuk 
melaksanakan komputasi tersebut.
The process of approximating the 
real world using numerical methods
 Example:
 Airbus A380 was modeled 
entirely on a computer before it 
was built
 The Vortex lattice method, 
(VLM) models the lifting 
surfaces, such as a wing of an 
aircraft, to compute lift and 
induced drag.
 SPICE to simulate a circuit on a 
PC
The model
 What is model?
 A simplified representation of a reality
 Categorized into iconic, analogue, or mathematical model
 Reality (natural phenomenon) is described by a mathematical 
model, usually by a differential equation.
→ An engineer must use the most appropriate model, not 
the best model
 Example: 
 Einstein's general theory of relativity is the best model to 
describe motion, but for some cases, Newton's laws of 
motion are more than sufficient, no employer will pay for 
a solution which has unnecessary precision. 
The implementation
 An engineer uses various algorithms to implement a 
model on a computer.
 This class covers many of the introductory 
algorithms used at this stage.
Simulation
 The executions of our simulations take 
measurements from the real world and produce an 
approximation of the real world. 
 If we make judicious choices of the model, the 
algorithms used, and appropriate measurements, 
the approximation of the real world will be 
sufficiently good to satisfy the stated 
requirements. 
 Errors in any of these steps can easily produce an 
invalid or poor representation of the real world 
which does not satisfy the given requirements.
Sources of Error
 There are a number of sources of error which may 
result in a poor approximation:
 Modeling Error: A wrong or inappropriate choice of 
model.
 Measurement Error: Incorrect or poor measurements.
 Implementation Error: Incorrect or poor choice of 
algorithms.
 Simulation Error: Error accumulated due to the 
execution of our model.
 Hence, we will discuss appropriate algorithms 
which can be used to properly approximate our 
chosen models.
Contoh 1

Diketahui fungsi 
               f(x)=4­2x2
Carilah luas wilayah yang 
dibatasi f(x), sumbu x, 
dan garis x=­1 dan x=1.

 
Solusi untuk contoh 1
 Jawab:
 Jika luas wilayah yang akan dicari dinyatakan 
dengan g(x), maka 1
g ( x) = ∫ 4 − 2 x 2 dx
−1
 Sehingga
( )
Dengan menerapkan teknik pengintegralan,
g ( x) = 4 x − 2 x 3 1 diperoleh solusi analitik dalam 
3 −1 bentuk fungsi matematik

( )
        = 4(1 ­ (­1)) ­ 2 (1 − (−1))
3
        = 4(2) ­ 2 (2) Nilai numerik (numerik=angka)
3 yang merupakan 
solusi sejati (exact solution)
        = 8 ­ 4/3 = 24/3 ­ 4/3 = 20/3
Bagaimana komputer memberikan solusi atas 
problem di atas?
 Metode analitik (analytical method)= metode sejati = metode 
yang memberikan solusi sejati/solusi sesungguhnya (exact 
solution), yaitu solusi yang memiliki galat (error)=0.
 Ketika metode analitik sudah tidak mampu lagi menyelesaikan 
permasalahan, digunakan metode numerik (numerical 
method) yang memberikan solusi hampiran/pendekatan 
(approximate solution) dimana galat ≠0. 
 Galat solusi hampiran ini dibuat sekecil mungkin hingga 
mendekati nol sehingga solusi hampiran akan makin 
mendekati solusi sejatinya dan mempunyai ketelitian yang 
tinggi
Perbedaan Metode Analitik 
dan Metode Numerik

Metode Analitik Metode Numerik


Solusi dapat berbentuk Solusi selalu berbentuk
fungsi matematik yang angka
evaluasinya dapat Solusinya berupa nilai
menghasilkan angka hampiran/nilai pendekatan
Solusinya berupa nilai sejati (mengandung galat)
(tidak mengandung galat)
Metode numerik yang digunakan 
komputer untuk contoh 1
 Komputer menggunakan metode numerik untuk 
memberikan solusi hampiran. Untuk 
permasalahan pada contoh sebelumnya:
 Diketahui fungsi y(x)=4­2x2, carilah luas daerah 
yang dibatasi y(x) pada range x=[­1,1]. 
 Solusi numerik dapat dicari dengan mencari luasan 
dibawah kurva y(x) terhadap sumbu x (atau 
y(x)=0) dengan aturan trapesium.
Metode numerik yang digunakan komputer 
untuk contoh 1 (lanjt.)
a,b,c,d adalah luasan trapesium. 
Hasil integral adalah jumlah 
luasan trapesium, L.
 Contoh: 
a b c d
a = jumlah dua sisi sejajar x 
½ lebar trapesium
   = (y(­1)+y(­0.5)) x ½ (0.5)
   = (2+3.5) x 0.25 = 1.375
 Bagaimana dengan b,c,d?
 Berapa nilai L yang diperoleh?
 Bandingkan dengan solusi sejatinya, 
berapa galat yang terjadi?
Kesimpulan tentang teknik komputasi

 Solusi hampiran untuk masalah ini dapat ditingkatkan 
ketelitiannya dengan memperbanyak jumlah trapesium 
yang berarti lebar trapesium diperkecil.
 Cobalah dengan 8 trapesium. Bagaimana pengaruhnya 
terhadap galat yang terbentuk? 
 Bagaimana jika 100 atau bahkan 1000 trapesium?
 Jadi, yang harus diusahakan dalam teknik komputasi 
adalah menghindari terjadinya kesalahan karena 
galat yang terlampau besar.
 Next, we will study about “computer arithmetic and 
error analysis”

 About the references of this lecture
  Chapra, Steven C. Numerical Methods for Engineers 5th  
Edition.
 An on line resource at 
https://ece.uwaterloo.ca/~dwharder/NumericalAnalysis/
 Other resources
Assessment 
 As usual, there will be some components, i.e. 
 Final exam
 Mid term exam
 Quiz and individual assignments

You might also like