`2. Menyelesaikan persamaan dengan satu variabel Contoh: Berdasarkan Hukum Archimedes, suatu benda padat yang lebih ringan daripada air dimasukkan ke dalam air, maka benda tersebut akan mengapung. Berat bagian benda yang tenggelam akan sama dengan berat bagian air yang dipindah. Misal suatu bola dengan jarijari satu mengapung di air dengan kedalaman x yang ditentukan oleh, gravitasi tertentu dari bola,. 1-x 1 X r Gambar 1 Volume dari bagian bola yang tenggelam adalah, dimana dan dihubungkan oleh teorema Pythagoras. Untuk mencari kedalaman x, kita harus menyelesaikan persamaan dimana volume bagian bola yang tenggelam sama dengan kali volume dari seluruh bola atau atau yang disederhanakan menjadi. (*) Yang dicari: kedalaman x dari persamaan (*), artinya dicari akar dari persamaan tersebut. Kita gunakan metode numerik. Metode menggunakan iterasi (Metode tidak langsung): - Tetapkan rumus iterasi: - pilih tebakan awal, terapkan rumus iterasinya untuk menghasilkan, sebagai tebakan, terapkan rumus iterasinya kembali, dan seterusnya. - Akan dihasilkan barisan yang diharapkan konvergen ke akar persamaan yang dicari. Terdapat beberapa metode: 1. Metode Selang tertutup (Pengurung) - Bagidua (Bisection)
- Posisi Palsu (Regula Falsi) - Modifikasi Posisi Palsu 2. Metode Titik Tetap 3. Metode Selang terbuka - Newton-Raphson - Tali Busur (Secant) Perhatikan fungsi berikut: dan dicari akar yang memenuhi. Berarti kita mencari dimana memotong sumbu x. Metode Bagidua (Bisection) Gambar 2 Dari contoh fungsi di atas terlihat solusi dari f(x)=0 berada di antara x = 0 dan. Karena f(0)<0 dan f(1,5)>0 dan grafiknya kontinu maka grafik akan memotong sumbu x. Untuk mencari solusi, selang yang ada dibagi dua dan panjang selang dikurangi, demikian seterusnya sampai dipenuhi kriteria berhenti. Rumus iterasi yang digunakan :. Kriteria berhenti adalah: 1. f(x) = 0 atau f(x) < untuk suatu diberikan 2. b a < 3. Galat relatif dimana adalah nomor iterasi. Metode ini menjamin ditermukannya solusi karena solusi sudah diapit oleh titik titik ujung selang. Akan tetapi metode ini berjalan sangat lambat. Untuk beberapa fungsi, metode ini tidak dapat digunakan. Sebutkan beberapa fungsi tersebut. Metode Posisi Palsu (Regula Falsi)
Untuk mempercepat jalannya metode Bagi Dua, metode ini mengurangi panjang selang [a,b] dengan menggambar perpotongan garis antara f(a) dan f(b). Sehingga calon akar selanjutnya adalah Modifikasi metode posisi palsu Perhatikan gambar di bawah ini: Proses berjalan sangat lambat karena ujung selang a tidak berubah. Oleh karena itu perlu dimodifikasi dengan membagi dua nilai f(a) apabila nilai a tetap selama beberapa kali interasi. Metode Newton-Raphson
Tentukan tebakan awal menyinggung. lalu tentukan titik selanjutnya dengan menarik garis yang Rumus didapat dari persamaan garis antara titik dan dengan gradien. Rumus iterasi umum. (Tunjukkan) Dari contoh sebelumnya: diperoleh hasil berikut ini: Iterasi 0 0.75 0.01831 1.6816 0.73911 1 0.73911 0.00005 1.67363 0.73909 2 0.73909 0.00001 1.67361 0.73909 Hasil diperoleh saat iterasi ke-2. Metode Tali Busur (Secant) Merupakan modifikasi dari Metode Newton Raphson, yaitu mengganti dari ekspansi Taylor: sehingga. Akibatnya diperlukan 2 titik tebakan awal dan sehingga atau rumus umumnya: dengan rumus Laju Kekonvergenan Terdapat 2 jenis kekonvergenan: quotient-convergence (q- convergence) dan rootconvergence (r- convergence). 1. quotient-convergence (q- convergence) Perhitungan menggunakan perbandingan antara galat dari dua hasil iterasi terakhir Misal x* adalah solusi eksak dan Galat pada iterasi ke-n adalah dengan orde-k apabila dimana C bilangan berhingga positif. adalah aproksimasi solusi dengan iterasi ke-n.. Suatu metode disebut q-konvergen
Jika k = 1, C < 1, maka laju konvergennya linier. Jika 1 < k < 2, maka laju kekonvergenannya superlinier Jika k = 2, laju kekonvergenannya kuadratik. 2. root- convergence (r- convergence). Digunakan bila kekonvergenannya tidak monoton. Suatu metode disebut r- convergence bila terdapat barisan { } yang q- convergence berorde k yang mendominasi runtutan galat-galat yang dihasilkan metode, atau untuk semua n. Contoh: Metode Bagi Dua pada iterasi ke-n mempunyai galat yang berada dalam interval sehingga dengan r adalah akar eksaknya. Dengan demikian Jadi Metode Bagi Dua memiliki q-convergence dengan orde 1. Kekonvergenan Metode Iterasi Titik-Tetap ditentukan oleh Jadi metode ini memiliki q-convergence dengan untuk semua di sekitar titik tetap eksaknya. Dalam Metode Newton-Raphson, galat pada iterasi ke-n adalah karena itu, oleh ( ) ( )
Jadi metode NR memiliki q-kuadratik. Lokalisasi Akar Polinom Descartes' rule of signs Positive roots The rule states that if the terms of a single-variable polynomial with real coefficients are ordered by descending variable exponent, then the number of positive roots of the polynomial is either equal to the number of sign differences between consecutive nonzero coefficients, or is less than it by a multiple of 2. Multiple roots of the same value are counted separately. Negative roots As a corollary of the rule, the number of negative roots is the number of sign changes after multiplying the coefficients of odd-power terms by 1, or fewer than it by a multiple of 2. This procedure is equivalent to substituting the negation of the variable for the variable itself: For example, to find the number of negative roots of equivalently ask how many positive roots there are for in, we Using Descartes' rule of signs on gives the number of positive roots of g, and since it gives the number of positive roots of f, which is the same as the number of negative roots of f. Example The polynomial has one sign change between the second and third terms (the sequence of pairs of successive signs is ++, +, ). Therefore it has exactly one positive root. Note that the leading sign needs to be considered although in this particular example it does not affect the answer. To find the number of negative roots, change the signs of the coefficients of the terms with odd exponents, to obtain a second polynomial This polynomial has two sign changes (the sequence of pairs of successive signs is +, ++, + ), meaning that this second polynomial has two or zero positive roots; thus the original polynomial has two or zero negative roots. In fact, the factorization of the first polynomial is
so the roots are 1 (twice) and 1. The factorization of the second polynomial is So here, the roots are 1 (twice) and 1, the negation of the roots of the original polynomial. Complex roots Since any n th degree polynomial has exactly n roots, the minimum number of complex roots is equal to where p denotes the maximum number of positive roots, q denotes the maximum number of negative roots (both of which can be found using Descartes' rule of signs), and n denotes the degree of the equation. A simple example is the polynomial If, this has no sign changes, and the polynomial does not change when odd-powered terms (of which there are none in this example) have their coefficients replaced by -x. Thus the maximum number of positive roots is zero, as is the maximum number of negative roots; so the minimum (and in this case exact) number of complex roots is.