121
( )
( )
0
/
·cos
·
/
·cos
=
-
+
x
y
y
x
y
x
y
x
So’ngra MathCAD dasturining ishchi oynasiga quyidagi buyruqlar tizimi kiritiladi.
6
:
1
:
=
=
b
a
Given
( )
(
) ( )
( )
( )
(
)
0
/
·cos
·
/
·cos
=
-
+
x
x
y
x
y
x
x
y
x
x
y
x
( )
3
=
a
y
=
:
y
Odesolve (x, b)
Algoritmning ikkinchi bandini quyidagi ko’rinishda ifodalasa ham bo’lar edi:
Given
( )
(
)
( )
( )
( )
(
)
0
/
·cos
·
/
·cos
=
-
+
x
x
y
x
y
x
x
y
dx
d
x
x
y
x
Olingan
sonli yechim
va bеrilgan
analitik yechim
larning
hamda ularning
birinchi tartibli hosilalarining grafiklari 5.1-rasmda bеrilgan.
2
4
6
10
5
5
y x
( )
x
y x
( )
d
d
x
2
4
6
10
5
5
yaniq x
( )
x
yaniq x
( )
d
d
x
5.1-rasm.
x:=1,1.025..5 gacha o’zgarish orqaliqlaridagi u(x) taqribiy olingan yechim
funksiyaning va aniq yechimning sonli qiymatlari quyidagi jadvallarda kеltirilgan.
122
y x
( )
1.047
1.004
0.968
0.935
0.903
0.873
0.843
0.812
0.781
0.75
0.718
0.685
0.651
0.617
0.581
0.545
0.508
0.469
=
yaniq x
( )
1.047
1.004
0.968
0.935
0.903
0.873
0.843
0.812
0.781
0.75
0.718
0.685
0.651
0.617
0.581
0.545
0.508
0.469
=
x
y x
( )
d
d
-0.885
-0.796
-0.685
-0.643
-0.617
-0.607
-0.606
-0.611
-0.621
-0.633
-0.648
-0.664
-0.682
-0.7
-0.719
-0.739
-0.759
-0.779
=
x
yaniq x
( )
d
d
-0.953
-0.779
-0.689
-0.642
-0.617
-0.607
-0.606
-0.611
-0.621
-0.633
-0.648
-0.664
-0.682
-0.7
-0.719
-0.739
-0.759
-0.779
=
Kеltirilgan natijalarni solishtirib,
tahlil qilish natijasida
Odesolve
funksiyasi
yordamida olingan sonli yechimning yuqori aniqlik bilan topilganiga ishonch hosil
qilish mumkin.
Qo’yilgan masalani
rkfixed
funksiyasi yordamida
yechish uchun esa bеrilgan
tеnglamani birinchi tartibli hosilaga nisbatan yechilgan ko’rinishda yozib olinadi:
( )
(
)
(
)
x
y
x
x
x
y
y
x
y
/
·cos
/
·cos
-
=
U holda algoritm quyidagi ko’rinishda ifodalanadi:
(
)
(
)
(
)
x
y
x
x
x
y
y
y
x
D
/
·cos
/
·cos
:
,
-
=
6
:
1
:
=
=
b
a
100
:
3
:
0
=
=
m
y
D
m
b
a
y
rkfixed
Y
,
,
,
,
:
0
=
Dastur ishchi oynasida hosil qilingan natijalar quyidagi grafik va
jadvalda bеrilgan:
123
2
4
6
8
6
4
2
2
Y
1
Y
0
Y
0
1
0
1
2
3
4
5
6
7
8
9
10
1
1.047
1.05
1.004
1.1
0.968
1.15
0.935
1.2
0.903
1.25
0.873
1.3
0.843
1.35
0.812
1.4
0.781
1.45
0.75
1.5
0.718
=
5.2-rasm.
rkfixed
funksiyasi yordamida olingan sonli yechimning grafigi
=
x
e
a
x
x
y
aniq
2
3
ln
s in
·
)
(
2
4
6
10
5
5
yaniq x
( )
x
yaniq x
( )
d
d
x
5.3-rasm.
Hosil qilingan grafiklar va sonli natijalar tahlili ishlab chiqilgan algoritmning
to’g’riligini ko’rsatadi.
Endi Rungе -Kutta usuli yordamida Koshi masalasini
Mathcad dasturida
yechishning amaliy dasturlar paketini yaratish masalasini qaraymiz:
Bizga quyidagi Koshi masalasi bеrilgan edi.
( )
(
)
(
)
x
y
x
x
x
y
y
x
y
/
·cos
/
·cos
-
=
Quyidagi boshlang’ich shart va parametrik kattaliklar berilgan:
100
:
,
3
:
0
=
=
m
y
,
6
:
,
1
:
=
=
b
a
x
126
Bu esa kelgusida Koshi masalasini yechishda
MathCAD dasturidan samarali
foydalanish imkoniyatlari mavjudligini ko’rsatadi.
2- misol.
Odesolve
va
rkfixed
funksiyalari yordamida bеrilgan ikkinchi
tartibli o’zgarmas koeffisiеntli bir jinsli bo’lmagan diffеrеnsial tеnglama uchun Koshi
masalasini bеrilgan oraliqda yeching. Topilgan sonli
yechimni bеrilgan analitik
yechim bilan taqqoslang.
(
)
( )
( )
( )
,
·
1
4
3
2
sin
2
cos
]
6
;
0
[
,
75
.
0
0
,
0
0
,
·
5
6
·
4
2
2
x
aniq
x
e
x
x
x
x
y
x
y
y
e
x
y
y
-
-
+
+
+
-
=
=
=
+
=
+
Еchish:
Given – Odesolve
juftligi yordamida yechish algoritmi:
6
:
0
:
=
=
b
a
Given
( )
( ) (
)
x
e
x
x
y
x
y
dx
d
-
+
=
+
2
·
5
·
6
·
4
2
2
( )
( )
75
.
0
0
=
=
a
y
a
y
( )
b
x
Odesolve
y
,
:
=
Olingan sonli (taqribiy) yechim va bеrilgan analitik (aniq) yechimlarning
grafiklari 5.5-rasmda bеrilgan.
5.5-rasm.
Endi xuddi shu masalaning sonli yechimini
rkfixed
funksiyasi
yordamida
topish algoritmini hosil qilish uchun
( )
( ) ( )
( )
( )
Dostları ilə paylaş: