Mapleda tenglamalar sistemasi va tenglamalarni yechish
Mavzu: Mapleda tenglamalar sistemasi va tenglamalarni yechish. Reja: 1. Nazariy qism 2. Berilgan topshiriqning bajarilish qismi 3. Xulosa 4. Adabiyotlar Quyidagi chiziqli tenglamlar sistemasini: 1) Gauss usulida eching.; 2) Kramer usulida eching.; 3) Matritsa tenglamasini teskari matritsa topish usulida eching. Bunda tenglamalar sistemasi ko’rsatmada ko’rsatilganidek 2 ta usul bilan hamda matritsali tenglama yechiladi. Nazariy qism Tenglamalar sistemasini yechish . Tenglamalar sistemasi ham xuddi shunday solve({t1,t2,…},{x1,x2,…}) buyrug’i yordami bilan yechiladi, faqat endi buyruq parametri sifatida birinchi figurali qavsda bir- biri bilan vergul bilan ajratilgan tenglamalar, ikkinchi figurali qavsda esa noma’lum o’zgaruvchilar ketma-ketligi yoziladi. Masalan: 1)Tenglamalar sistemasini yeching. x-y=1 x+y=3
>eq:={x-y=1,x+y=3}; eq := {x - y = 1, x + y = 3} > s:=solve(eq,{x,y}); Enter tugmasini bosib natija: s := {y = 1, x = 2}. 2)Tenglamalar sistemasini yeching 2x-2y=4 x+4y=6 > eq:={2*x-2*y=4,x+4*y=6}; eq := {x + 4 y = 6, 2 x - 2 y = 4} > s:=solve(eq,{x,y}); Enter tugmasini bosib natija: s := {y = 4/5, x = 14/5} Mapleda tenglamalar sistemasini Gaus usulida yechib bo’lmaydi. Kramer usulini Mapleda ishlash mumkin. Chunki Kramer usulida matritsa va diterminatdan foydalanamiz. Kramer usuli quyidagicha ishlanadi. Bizga quyidagi tenglamalar sistemasi berilgan bo’lsin. KRAMER FORMULASINI QO’LLASH UCHUN ZARURIY SHART YORDAMCHI DETERMINANTLARNI HISOLASH
TENGLAMALAR SISTEMASINI YECHISH UCHUN KRAMER FORMULASI Mapleda matritsalar quyidagicha kiritiladi. 1 2 3 4 A= 5 6 7 8 9 8 6 5 >A:=<<1,5,9>|<2,6,8>|<3,7,6>|<4,8,5>>; Ko’rinishida kiritiladi. Diterminantni hisoblash uchun >Determinant(A); Buyrug’I kritiladi. A matritsaning teskarisi deb A (-1) ga aytiladi. Bizga berilgan 3-misolda tenglama quyidagicha berilhgan. A*X=B Bu yerda X no’malum matritsa. A va B matritsalar berilgan. X=B/A bundan X=A (-1) *B kelib chiqadi. Berilgan topshiriqning bajarilish qismi Berilgan tenglamalar sistemasini Gaus usulida yechamiz.
x 1 +2x 2 +3x 3 -4x 4 =5 (-2) (-3) (-4) 2x 1 +x 2 +2x 3 +3x 4 =1 3x 1 +2x 2 +x 3 +2x 4 =1 4x 1 +3x 2 +2x 3 +x 4 =-5 x 1 +2x 2 +3x 3 -4x 4 =5 -3x 2 -4x 3 +11x 4 =-9 (4) (5) -4x 2 -8x 3 +14x 4 =-14 (-3) -5x 2 -10x 3 +17x 4 =-25 (-3) x 1 +2x 2 +3x 3 -4x 4 =5 -3x 2 -4x 3 +11x 4 =-9 8x 3 +2x 4 =6 (-5) 10x 3 +4x 4 =30 (4) x 1 +2x 2 +3x 3 -4x 4 =5 -3x 2 -4x 3 +11x 4 =-9 8x 3 +2x 4 =6 6x 4 =90 Bundan x 4 =15, x 3 =-3, x 2 =62, x 1 =-50 ligi kelib chiqadi. Berilgan tenglamalar sistemasini Maple dasturida yechamiz. > a:={x1+2*x2+3*x3-4*x4=5, 2*x1+x2+2*x3+3*x4=1, 3*x1+2*x2+x3+2*x4=1, 4*x1+3*x2+2*x3+x4=-5}; a x1 2 x2 3 x3 4 x4 5 2 x1 x2 2 x3 3 x4 1 3 x1 2 x2 x3 2 x4 1, , ,{ := 4 x1 3 x2 2 x3 x4 -5 } > s:=solve(a,{x1,x2,x3,x4}); := s { } , , , x1 -50 x2 62 x3 -3 x4 15 > # Axtamov Javohir 203-guruh. Endi Kramer usulida yechamiz. KRAMER FORMULASINI QO’LLASH UCHUN ZARURIY SHART > with(Student[LinearAlgebra]): > A:=<<1,2,3,4>|<2,1,2,3>|<3,2,1,2>|<-4,3,2,1>>;
:= A 1 2 3 -4 2 1 2 3 3 2 1 2 4 3 2 1> Determinant(A); -4 > # Axtamov Javohir 203-guruh. Zaruriy shart bajarildi, Ya’ni - 4 ≠ 0 ga. YORDAMCHI DETERMINANTLARNI HISOLASH > x1:=<<5,1,1,-5>|<2,1,2,3>|<3,2,1,2>|<-4,3,2,1>>; := x1 5 2 3 -4 1 1 2 3 1 2 1 2 -5 3 2 1 > x:=Determinant(x1); := x 200 > x2:=<<1,2,3,4>|<5,1,1,-5>|<3,2,1,2>|<-4,3,2,1>>; := x2 1 5 3 -4 2 1 2 3 3 1 1 2 4 -5 2 1 > y:=Determinant(x2); := y -248 > x3:=<<1,2,3,4>|<2,1,2,3>|<5,1,1,-5>|<-4,3,2,1>>; := x3 1 2 5 -4 2 1 1 3 3 2 1 2 4 3 -5 1 > z:=Determinant(x3); := z 12 > x4:=<<1,2,3,4>|<2,1,2,3>|<3,2,1,2>|<5,1,1,-5>>; := x4 1 2 3 5 2 1 2 1 3 2 1 1 4 3 2 -5 > t:=Determinant(x4); := t -60 > # Axtamov Javohir 203-guruh.