logo

Mapleda tenglamalar sistemasi va tenglamalarni yechish

Загружено в:

08.08.2023

Скачано:

0

Размер:

782.7841796875 KB
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. Endi no’malumlarni topamiz.
>  x1:=x/Determinant(A); := 	x1	-50
>  x2:=y/Determinant(A);	
 := 	x2	62
>  x3:=z/Determinant(A);	
 := 	x3	-3
>  x4:=t/Determinant(A);	
 := 	x4	15
>  # Axtamov Javohir 203-guruh.
Berilgan tenglamalar sistemasini Gaus usulida yechamiz.
3x+2y+z=5  (-2)        (-2)
2x+3y+z=1   (3)
2x+y+3z=11              (3)        
3x+2y+z=5
        5y+z=-7
      -y+7z=23    (5)
3x+2y+z=5
        5y+z=-7
           36z=108
Bundan  z=3, y=-2, x=2   ligi kelib chiqadi.
Berilgan tenglamalar sistemasini Maple dasturida yechamiz.
>  restart;
>  a:={3*x+2*y+z=5,2*x+3*y+z=1,2*x+y+3*z=11};	
 := a	{	}	,	,				2x	y	3z	11				2x	3y	z	1				3x	2y	z	5
>  solve(a,{x,y,z});	
{	}	,	,	x	2	y	-2	z	3    >  # Axtamov Javohir 203-guruh.
Endi Kramer usulida yechamiz.
KRAMER FORMULASINI QO’LLASH UCHUN ZARURIY SHART
>  with(Student[LinearAlgebra]):
>  A:=<<3,2,2>|<2,3,1>|<1,1,3>>;
 := A 




 




3 2 1
2 3 1
2 1 3
>  Determinant(A);12
>  # Axtamov Javohir 203-guruh.
Zaruriy shart bajarildi, Ya’ni 12 ≠  0  ga.
YORDAMCHI DETERMINANTLARNI HISOLASH
>  x:=<<5,1,11>|<2,3,1>|<1,1,3>>;
 := x 




 




5 2 1
1 3 1
11 1 3
>  Determinant(x);
24
>  y:=<<3,2,2>|<5,1,11>|<1,1,3>>;
 := y 




 




3 5 1
2 1 1
2 11 3
>  Determinant(y);
-24
>  z:=<<3,2,2>|<2,3,1>|<5,1,11>>;
 := z 




 




3 2 5
2 3 1
2 1 11
>  Determinant(z);
36
>  # Axtamov Javohir 203-guruh. Endi no’malumlarni topamiz.
>  x:=Determinant(x)/Determinant(A); := x	2
>  y:=Determinant(y)/Determinant(A);	
 := y	-2
>  z:=Determinant(z)/Determinant(A);	
 := z	3
>  # Axtamov Javohir 203-guruh.
           A *X =B
Ko’rinishida berilgan matrisali tenglamani quyidagicha yechamiz.
X=B/A = A (-1)
*B
A (-1)
 bu A matritsaning teskarisi.
Berilgan matritsali tenglamalani Maple dasturida yechamiz.
>  restart;
>  A:=<<4,1,3>|<-2,1,-2>|<0,2,0>>;
 := A 




 




4 -2 0
1 1 2
3 -2 0
>  A^(-1);	


	


	
1	0	-1	
3
2	0	-2	
-5
4	
1
2	
3
2
>  B:=<<0,2,0>|<-2,4,-3>|<6,3,4>>;
 := B 




 




0 -2 6
2 4 3
0 -3 4
>  X:=A^(-1).B;
 := X 




 




0 1 2
0 3 1
1 0 0
>  # Axtamov Javohir 203-guruh. Javob X matritsamiz:
 := X 




 




0 1 2
0 3 1
1 0 0
  ga teng.
                                              
                  Foydalanilgan adabiyotlar
1.Maple 12 dasturining Help menyusi.
2.Olimov B.A , Masharipov M.P, Nuriddinova D. “ Matematik paket
“Maple” dasturida matematik masalalarni yechish”.  Toshkent - 2016.
                 Foydalanilgan interset sayt
https://fr.maplesoft.com/products/Maple/index.aspx

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.