O‟zbekiston respublikasi xalq ta‟lim vazirligi toshkent shahar xalq ta‟limi xodimlarini qayta tayyorlash va ularning malakasini oshirish instituti
Download 0.9 Mb. Pdf ko'rish
|
Maple-dasturida-ishlash
convert(list, vector)buyruqlaridan foydalanishimiz mumkin.
a va b ikki vektorni qo„shish uchun quyidagi ikki buyruq mavjud: 1) evalm(a+b); 2) matadd(a,b).
vektorlarning b a , bu yerda
- skalyar kattaliklar uchun chiziqli kombinatsiyasini hisoblash imkonini beradi.
Ikki vektorlarning skalyar ko„paytmasi i n i i b a 1 ) , ( b a dotprod(a,b)buyrug„i orqali hisoblanadi. Ikki vektorlarning vektor ko„paytmasi ] ,
b a crossprod(a,b) buyrug„i orqali hisoblanadi. Ikki a va b vektor orasidagi burchak angle(a,b) buyrug„i orqali hisoblanadi.
2 2 1 ...
n x x a ga teng bo„lgan ) ,...,
( 1
x x
vektor normasi (uzunligi)
) ,..., ( 1
x x
buyrug„i orqali hisoblanadi.
35
a a
birlik vektor hosil bo„ladi. Vektorlar sistemasining bazisini topish. Vektorlar sistemasini Gramm- Shmidt protsedurasi asosida ortogonallashtirish. n ta } ,..., , { 2 1 n a a a vektorlar sistemasi berilgan bo„lsa, basis([a1,a2,…,an]) buyrug„i orqali sistema bazisini topish mumkin.
} ,..., , { 2 1 n a a a vektorlar sistemasini ortogonallashtirish mumkin. 1- Misol: а (-16,32,8) va b (2,7,6) koordinatalari bilan berilgan. 4 1
+5 b
hisoblang. > with(linalg): >a:=([-16,32,8]); b:=([2,7,6]); a := [-16, 32, 8] b := [2, 7, 6] > matadd(1/4*a,5*b); [6, 43, 32]
(2,-2,1), b (6,7,4), s(2,0,8) vektorlar berilgan. Berilgan vektorlarning yig„indisini hamda yig„indining modulini toping.
> a:=([2,-2,1]); b:=([6,7,4]); c:=([2,0,8]); a := [2, -2, 1] b := [6, 7, 4] c := [2, 0, 8] > d:=evalm(2*a+b-1/2c); d := [9, 3, 2] > norm(d,2); 94
4-Masala: а (4,0,3) va b (12,-5,0) vektorlar berilgan ular orsidagi burchak kosinusini toping. 36
5-Masala: ) 2 , 3 , 1 , 2 (
ва )
, 2 , 2 , 1 ( b икки вектор берилган. ) ,
a ни ҳамда a ва b векторлар орасидаги бурчакни топинг. Бу масалани ечиш учун қуйидаги буйруқларни киритинг: > with(linalg): > a:=([2,1,3,2]); b:=([1,2,-2,1]); a:=[2,1,3,2] b:=[1,2,-2,1] > dotprod(a,b); 0 > phi=angle(a,b); 2
) 1
2 , 2 ( a , ) 6 , 3 , 2 ( b векторларнинг ] ,
b a c вектор кўпайтмани топинг, сўнг ) , ( c a скаляр кўпайтмасни топинг. > restart; with(linalg): > a:=([2,-2,1]); b:=([2,3,6]); a:=[2, 2,1] b:=[2,3,6] > c:=crossprod(a,b); c:=[ 15, 10,10]
> dotprod(a,c); > with(linalg): > a:=([4,0,3]); b:=([12,-5,0]); a := [4, 0, 3] b := [12, -5, 0] > dotprod(a,b); 48 > norm(a,2); 5 > norm(b,2); 13 > alpha= angle(a,b); sosα= arcos( 169 25
48 ) =arcos( 65 48
37
0 7-Masala: ) 1 , 2 , 2 ( a векторнинг нормасини топинг: > restart; with(linalg): > a:=vector([1,2,3,4,5,6]): norm(a,2); 91
) 1 , 2 , 2 , 1 ( 1 a , ) 3 , 5 , 1 , 1 ( 2
, )
, 8 , 2 , 3 ( 3 a , ) 4 , 7 , 1 , 0 ( 4
, )
, 12 , 1 , 2 ( 5 a
векторлан системасининг базисини топинг ва уни Грамм-Шмидт процедураси асосида ортогоналлаштиринг: > restart; with(linalg): > a1:=vector([1,2,2,-1]):
> g:=basis([a1,a2,a3,a4,a5]); g:= [a1, a2, a3, a5] > GramSchmidt(g); [[1,2,2, 1], [2,3, 3,2],
65 549 , 65 327 , 65 93 , 65 81 , 724 355
, 724
71 , 724 923 , 724 1633
38
Maple muxitining grafik imkoniyatlari plot buyrug‟i va uning parametrlari. Bir o‟zgaruvchili f(x) funksiya- ning grafigini (Ox o‟qi bo‟yicha a<=x<=b intervalda va Oy o‟qi bo‟yicha
nishi quyidagicha: plot(f(x), x=a..b, y=c..d, parametr), bu yerda parametr – tasvirni boshqarish parametrlari. Agar u ko‟rsatilmasa jimlik bo‟yicha o‟rnatishdan foydalaniladi. Shu bilan birga tasvirlarga tuzatishlar kiritish vositalar paneli orqali ham amalga oshiriladi.
1) title=”text”, bu yerda text-rasm sarlavhasi. 2) coords=qutb –polyar koordinatani o‟rnatish.
3) axes – koordinata o‟qlari turlarini o‟rnatish: axes=NORMAL – oddiy o‟qlar; axes=BOXED – ramkada shkalali grafika; axes=FRAME – rasmning quyi chap burchagi markazi bo‟lgan o‟qlar; axes=NONE – o‟qsiz.
4) scaling – tasvir masshtabini o‟rnatish: scaling=CONSTRAINED –o‟qlar bo‟yicha bir xil masshtab; scaling=UNCONSTRAINED – grafik oyna o‟lchovi bo‟yicha masshtablanadi.
5) style=LINE(POINT) – chiziqlar (yoki nuqtalar) bilan chiqarish. 6) numpoints=n – grafikaning hisobga olinadigan nuqtalari (jimlik qoidasi bo‟yicha n=49).
7) solor – chiziq rangini o‟rnatish: rangning inglizcha nomi, masalan, yellow – sariq va h.
8) xtickmarks=nx va ytickmarks=ny – mos ravishda , Ox va Oy o‟qlari bo‟yicha belgilar soni.
9) thickness=n, gde n=1,2,3… - chiziq qalinligi (jimlik bo‟yicha n=1). 10) linestyle=n – chiziq turi: uzluksiz, punktirli va h. (n=1 – uzluksiz).
11) symbol=s – nuqtalar orqali hosil bo‟ladigan belgi turi: BOX, CROSS, CIRCLE, POINT, DIAMOND. 39
12) font=[f,style,size] – matnni chiqarish uchun shrift turini o‟rnatish: f shriftlar nomini beradi: TIMES, COURIER, HELVETICA, SYMBOL; style shrift stilini beradi: BOLD, ITALIC, UNDERLINE; size – pt da shrift o‟lchovi.
13) labels=[tx,ty] – koordinata o‟qlari yozuv: tx – Ox o‟qi bo‟yicha va ty – Oy o‟qi bo‟yicha.
14) discont =true – cheksiz uzilishlarni yasash uchun ko‟rsatma. plot buyrug‟i yordamida y=f(x) funksiya grafigi bilan birga, ochiq ko‟rinishda , parametrik berilgan y=y(t), x=x(t) funksiyalar grafigini ham hosil qilish mumkin: plot([y=y(t), x=x(t), t=a..b], parameters).
>plot(sin(x), x=Pi..Pi,labels=[x,y],thickness=2); Natija: Enter tugmasini bosing:
40
>plot(sin(x), x=Pi..Pi,labels=[x,y],thickness=2); Natija: Enter tugmasini bosing:
3) y=tan(x) funksiyaning grafigini “Maple” dasturida quyidagicha kiritiladi.
>plot(tan(x), x=Pi..Pi,labels=[x,y],thickness=2); Natija: Enter tugmasini bosing:
41
boshlanadigan nuqtalar koordinatalari. Tengsizlik bilan berilgan ikki o‟lchovli sohani hosil qilish.
Agar f 1 (x,y)>c1, f2(x,y)>c 2, …,f n (x,y)>c n tengsizliklar sistemasi bilan berilgan ikki o‟lchovli sohani hosil qilish uchun inequal buyrug‟i ishlatiladi.
inequals({f1(x,y)>c1,…,fn(x,y)>cn}, x=x1…x2, y=y1..y2, options) buyrug‟ida figurali qavs ichida sohani aniqlovchi tengsizliklar sistemasi, so‟ngra esa koordinata o‟qlariningg o‟lchovlari va parametrlari ko‟rsatiladi. Parametrlar ochiq va yopiq chegaralar rangini, sohaning ichki va tashqi rangini hamda chiziq chegarasining qalinligini aniqlaydi: optionsfeasible=(color=red) – ichki soha rangini o‟rnatadi; optionsexcluded=(color=yellow) – tashqi soha rangini o‟rnatadi; optionsopen(color=blue, thickness=2) – ochiq chegara chizig‟ining qalinligi va rangini o‟rnatadi; optionsclosed(color=green,thickness=3) – yopiq chegara chizig‟ining qalinligi va rangini o‟rnatadi; Masalan: 1) y=20-x funksiyaning grafigini “Maple” dasturida quyidagicha kiritiladi. >with(plots): > implicitplot(x-y=20, x=-20..20, y=-16..16,color=green, thickness=2);
2) 42
y=2x 2 -3 funksiyaning grafigini “Maple” dasturida quyidagicha kiritiladi. with(plots): > implicitplot(2*x^2-y=3, x=-20..20, y=-16..16,color=green, thickness=8);
2 -3 porabolaning grafigini yasang.
>with(plots): > implicitplot(x^2-y=3, x=-3..3, y=-16..16,color=green, thickness=8);
43
Masalan: y=2x-3 funksiya grafigi: with(plots): > implicitplot(y=2*x-3, x=-3..3,y=-16..16,color=bluee,thickness=8);
2) y=2x+12 funksiyaning grafigi. >with(plots): > implicitplot(y=2*x+12, x=-4..4,y=-16..16,color=bluee,thickness=10);
3) y=5/2x funksiyaning grafigi: 44
>implicitplot(y=5/2*x, x=-2..2,y=-6..6,color=bluee,thickness=5); 4) y=
funksiyaning grafigi: >with(plots): >implicitplot(y=x/3-5, x=-2..2,y=-6..6,color=bluee,thickness=6); 5) y= - funksiyaning grafigi: 45
>implicitplot(y=-x/2, x=-2..2,y=-6..6,color=bluee,thickness=6); 6) y= funksiyaning grafigi:
>implicitplot(y=-(x+6)/2, x=-2..2,y=-6..6,color=bluee,thickness=6);
46
1) y=5/x giporbolaning grafigi: >with(plots): >implicitplot(y=5/x, x=-4..4,y=-16..16,color=bluee,thickness=5);
2) y=5/x 2 giporbolaning grafigi:
>with(plots): > implicitplot(y=5/x^2, x=-2..2,y=-6..6,color=bluee,thickness=5);
3) y= funksiyaning grafigi: 47
>with(plots): >implicitplot(y=2/x-2, x=-2..2,y=-6..6,color=bluee,thickness=5);
4) y= funksiyaning grafigi: >with(plots): >implicitplot(y=-2/x, x=-2..2,y=-6..6,color=bluee,thickness=6);
3 funksiyaning grafigi. 48
1) y=x 3 funksiyaning grafigi:
> implicitplot(y=x^3, x=-2..2,y=-6..6,color=bluee,thickness=5);
2) y=x 3 +3 funksiyaning grafigi: >with(plots): >implicitplot(y=x^3+3, x=-2..2,y=-6..6,color=bluee,thickness=5);
3) y=x 3 -5 funksiyaning grafigi:
49
>with(plots): > implicitplot(y=x^3-5, x=-2..2,y=-6..6,color=bluee,thickness=6);
4) y= -x 3 -4 funksiyaning grafigi: >with(plots): >implicitplot(y=-x^3-4, x=-2..2,y=-6..6,color=bluee,thickness=6);
Maple” dasturida y=x 2 porabolaning funksiyaning grafigi. 50
Masalan: 1) y=x 2 porabolaning grafigi: >with(plots): :implicitplot(y=x^2, x=-2..2,y=-6..6,color=bluee,thickness=6);
2) y=-x 2 porabolaning grafigi:
with(plots): >implicitplot(y=-x^2, x=-2..2,y=-6..6,color=bluee,thickness=6);
51
3) y= x 2 +2x parobaloning grafigi:
>with(plots): >implicitplot(y=x^2+2*x, x=-2..2,y=-6..6,color=bluee,thickness=6);
4) y=-x 2 +5 parobolang grafigi:
>with(plots): >implicitplot(y=-x^2+5, x=-2..2,y=-6..6,color=bluee,thickness=6);
52
5) y= -x 3 +5x funksiyaning grafigi: >with(plots): >implicitplot(y=-x^3+5*x, x=-2..2,y=-6..6,color=bluee,thickness=6);
6)
y=x 3 + funksiyaning grafigi:
>with(plots): >implicitplot(y=x^3+2/x, x=-2..2,y=-6..6,color=bluee,thickness=3);
53
7) y= x 3 + funksiyaning grafigi:
>with(plots): >implicitplot(y=x^3+2/x^2, x=-2..2,y=-6..6,color=bluee,thickness=3);
y=-x 3 + funksiyaning grafigi:
> with(plots): >implicitplot(y=-x^3+2/(-x^2), x=-2..2,y=-6..6,color=bluee,thickness=3);
54
9) y= x 2 + funksiyaning grafigi: >with(plots): >implicitplot(y=x^2+2/x, x=-2..2,y=-6..6,color=bluee,thickness=3); 10) y= x 2 +x 3 funksiyaning grafigi: >with(plots): >implicitplot(y=x^2+x^3, x=-2..2,y=-6..6,color=bluee,thickness=3); |
ma'muriyatiga murojaat qiling