Differensial tenglama (Koshi masalasi yoki chegaraviy masala)ning sonli yechimini topish uchun dsolve komandasida type=numeric (yoki sodda qilib numeric) parametrni ko‟rsatish kifoya. Bunday holda differensial tenglamani yechish komandasi quyidagicha bo‟ladi [13, 17, 19]:
dsolve(eq, vars, type=numeric, options),
bu yerda
eq – tenglama;
vars – noma‟lum funksiyalar ro‟yxati;
options – Differensial tenglamani sonli yechishni ko‟rsatuvchi parametrlar.
Maple da quyidagi usullar ishlab chiqilgan:
method=rk2 –Runge-Kuttaning 2-tartibli usuli;
method=rk3 –Runge-Kuttaning 3-tartibli usuli;
method=rk4 –Runge-Kuttaning 4-tartibli klassik usuli;
method=rkf45 jimlik qoidasi bilan o‟rnatilgan Runge-Kutta-Felbergning 4-5-tartibli usuli;
method=dverk78 –Runge-Kuttaning 7-8-tartibli usuli;
method=classical – Runge-Kuttaning 3-tartibli klassik usuli;
method=gear – Girning bir qadamli usuli;
method=mgear – Girning ko‟p qadamli usuli.
Differensial tenglama sonli yechimining grafigini qurish uchun ushbu
odeplot(dd, [x,y(x)], x=x1..x2)
komandadan foydalanish mumkin, bu yerda funksiya sifatida dd:=dsolve({eq,cond}, y(x), numeric) – sonli yechish komandasidan foydalanil- gan, bundan keyin esa kvadrat qavsda o‟zgaruvchi va noma‟lum funksiya [x,y(x)] hamda grafik qurishning intervali x=x1..x2 kabi ko‟rsatilgan (I.1-rasm).
Muammoni oydinlashtirishni mashqlarda bajarib ko‟raylik va quyidagi tadbiqlarni bajaraylik:
1-misol. Quyidagi Koshi masalasining sonli va taqribiy yechimini 6-tartibli darajali qator ko‟rinishida toping:
y''
x sin( y)
sin x ,
y(0)
1, y'(0) 1 .
Yechish: Avvalo Koshi masalasining sonli yechimini topamiz, keyin esa topilgan yechimning grafigini quramiz:
restart; Ordev=6:
eq:=diff(y(x),x$2)+x*sin(y(x))= - sin(x):
cond:=y(0)=-1, D(y)(0)=1:
de:=dsolve({eq,cond},y(x),numeric);
de:=proc( rkf45_x)...end proc
Eslatma: Natijani chiqarish qatorida rkf45 usuldan foydalanilganlik haqida ma‟lumot chiqadi. Agar satr kerakli ma‟lumot bermasa, bu oraliq komandani ikki nuqta qo‟yish bilan ajratib qo‟yish lozim. Agar x ning biror fiksirlangan qiymati uchun natija olish (masalan, yechimning shu nuqtadagi hosilasi qiymatini chiqa- rish) zarur bo‟lsa, masalan, х=0.5 nuqtada, u holda quyidagilar teriladi (2.2-rasm):
x .5, y( x )
-.506443608478440388 ,
x y( x )
.954574167168752430
with(plots):
odeplot(de,[x,y(x)],-10..10,thickness=2);
2.2-rasm. Koshi masalasi sonli yechimining grafigi.
Endi Koshi masalasining yechimini darajali qator ko‟rinishida topamiz hamda sonli yechim va olingan darajali qatorning grafigini ular mosroq tushishi mumkin bo‟lgan interval uchun yasaymiz (2.3-rasm).
dsolve({eq, cond}, y(x), series);
y( x )
sin( 1 )
1 x3
6
cos( 1 ) x4
sin( 1 ) x5
O( x6 )
convert(%, polynom):p:=rhs(%):
p1:=odeplot(de,[x,y(x)],-3..3, thickness=2, color=black):
p2:=plot(p,x=-3..3,thickness=2,linestyle=3, color=blue):
display(p1,p2);
Yechimning darajali qator bilan juda yaqin qiymatlari < x < 1 ekanligi
grafikdan ko‟rinib turibdi (buni yuqoridagi 1.3-bandning 3-misoli grafigida ham ko‟rgan edik).
2.3-rasm. Koshi masalasi yechimining grafigi.
Dostları ilə paylaş: |