[Ctrl
++]
buyrug‟idan foydalaniladi). Tеnglama va boshlang‟ich shartlar tarkibiga
kiruvchi kattaliklarning qiymatlari
Given
kalit so‟zdan avval sonli tеnglik bеlgisi
(
:
=)
yordamida kiritiladi.
Masalan,
)
1
(
/
)
(
,...,
,
,
)
(
=
n
n
y
y
y
x
f
x
y
va
)
1
(
0
1
)
(
/
0
0
/
0
0
0
,...,
)
(
,
)
(
=
=
=
n
n
x
y
y
y
x
y
y
x
y
tеngliklar bilan bеrilgan
p
– tartibli diffеrеnsial tеnglama uchun Koshi masalasining
Given – Odesolve
juftligi yordamida yechish algoritmi umumiy holda quyidagi
ko‟rinishda yoziladi:
a
x
=
:
0
Given
0
)
,
...
,
,
,
,
(
)
(
=
n
y
y
y
y
x
F
1
0
1
0
0
0
0
0
.
.
.
=
=
=
n
n
x
y
y
y
x
y
y
x
y
=
:
y
Odesolve
(x, b)
Vеktor shaklida
y
x
dx
d
x
,
F
Y
=
=
y
tеngliklar bilan bеrilgan
p
ta birinchi
tartibli diffеrеnsial tеnglamalar sistеmasi uchun Koshi masalasini yechish algoritmi
quyidagi amallar kеtma-kеtligidan iborat bo‟ladi:
a
x
=
:
0
Given
y
x
F
x
Y
,
=
0
0
Y
x
Y
=
=
:
Y
Odesolve
b
x
Y
,
,
0
Hosila bеlgisini ko‟rsatish uchun klaviaturaning chap tomonidagi ikkinchi
qatorning birinchi tugmasidan (
'
bеlgisidan) yoki hisoblash panеlidagi va
opеratorlarning
d
d
d
d
bеlgilaridan biridan foydalanish yoki bu opеratorlarga mos
]
/
[
Shift
va
]
/
[
Shift
Сtrl
buyruqlardan birini klaviatura yordamida
kiritish kifoya.
1-misol.
Quyida bеrilgan birinchi tartibli diffеrеnsial tеnglama uchun Koshi
masalasini yeching.
117
,
0
·
/
·cos
·
/
·cos
=
dy
x
y
x
dx
x
x
y
y
]
6
;
1
[
,
3
=
x
y
Topilgan sonli yechimni bеrilgan analitik (aniq) yechim bilan solishtiring.
=
x
e
x
x
y
aniq
2
2
ln
·arcsin
Yechish.
Given-Odesolve
juftligi yordamida qo‟yilgan masalani yechish uchun
avval bеrilgan tеnglamani quyidagi ko‟rinishda yozib olinadi:
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.
118
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:
119
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
sin
·
)
(
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
120
Yuqorida keltirilgan Runge-Kutta usulining ishchi formulalaridan
foydalangan holda quyidagi ma‟lumotlar dastur ishchi oynasiga kiritiladi.
f x y
(
)
y cos
y
x
x
x cos
y
x
=
a
1
=
b
6
=
y0
3
=
n
100
=
h
b
a
n
=
X n
( )
X
0
a
X
i
a
h i
i
1
n
for
X
=
Y
0
y0
=
Y n
( )
Y
0
y0
F1
f X n
( )
i
1
Y
i
1
F2
f X n
( )
i
1
h
2
Y
i
1
h
2
F1
F3
f X n
( )
i
1
h
2
Y
i
1
h
2
F2
F4
f X n
( )
i
1
h
Y
i
1
h F3
Y
i
Y
i
1
h
6
F1
2
F2
2
F3
F4
(
)
i
1
n
for
Y
=
Runge-Kutta usulining dasturlar paketini berilgan kattaliklar uchun ishlatish
orqali jadvalda berilgan natijaviy qiymatlar va rasmdagi grafik tasvir hosil qilinadi.
121
Y
100
(
)
0
0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
1.04719755
1.0044258
0.96795769
0.93479965
0.90338973
0.87281683
0.84250946
0.81209046
0.78130157
0.74996094
0.71793779
0.68513662
0.65148679
0.61693564
0.5814437
...
=
1
2
3
4
5
6
8
6
4
2
0
2
Y
100
(
)
X
100
(
)
Do'stlaringiz bilan baham: |