3. 3E: Runge-Kutta Usuli (Mashqlar) Matematika



Download 72,08 Kb.
bet13/15
Sana19.03.2022
Hajmi72,08 Kb.
#501496
1   ...   7   8   9   10   11   12   13   14   15
Exercise 14
The goal of this problem is to use numerical methods to confirm our theorems regarding autonomous differential equations. We’ll look at the equation [y' = - y^4 + 4 y^3 - y^2 - 6y = - y (y+1) (y-2) (y-3) ,.]
Draw a phase line and indicate the kind of stationary solutions this equation has.
Where should a solution with (y(0) = 1.2) go as (t oinfty) ? Using a computer, perform Euler’s method with (100) steps to estimate (y(10)) to try to confirm this. Use ode45 to plot a solution.
Repeat the previous part using (y(0) = 2.1) .
Qaror
After drawing a quick sign chart, we get the following phase line.

The solution should work its way back toward zero, according to the phase line. Euler’s method 1 gives an estimate that (y(10)approx 4.4705 imes 10^<-40>) , which is indeed awfully close to zero. The ode45 picture below also shows intense convergence to zero.

We expect this solution to rise up to (3) as time increases. Indeed, MATLAB thinks after (100) steps that the answer is indistinguishable from (3) . (It is (3) to within a tolerance of something like (10^<-15>) . This is consistent with what we saw in the previous part, where we found a discrepancy on the order of (10^<-40>) .) The ode45 picture bears this out as well: the solution has reached the vicinity of (3) within one unit of time.

>> y = 1.2 >> for c = 0.1:0.1:10 yp = (1/10) * (-1) * y * (y+1) * (y-2) * (y-3) y = y + yp end ↩
Exercise 15
In this problem we’ll try to “see” that the Runge-Kutta method has an error term of fourth order only by looking at its estimates for a specific problem. To do this we’ll have to know what the error actually is, so we’ll pick a straightforward differential equation whose solution we can get our hands on: [y' - 2 y = e^t ,, qquad y(0) = 2 ,.]
Find the solution to this initial value problem call it (y(t)) . Calculate (y(1)) .
Using a computer programmed to perform the Runge-Kutta method, estimate (y(1)) by using (1) , (2) , (10) , (20) , (32) , (50) , (64) , and (100) steps. Make a table with the number of steps, the estimated value that Runge-Kutta gives, and the error (the absolute value of the difference between the answer to part (a) and the estimate). You’ll need at least eight to ten digits of precision.
For (h = 1) , (10) , (32) , and (50) , calculate [log!left( frac< ext> < ext> ight) cdot frac<1> ,.] What is this number telling us, and why do we expect it to be about (4) if it’s the algorithm is fourth order? [Note. The fact that we get numbers near (4) for this problem is not enough evidence to conclude that the method is fourth order in fact it’s possible for these numbers to be smaller for specific problems. But generally speaking they will be around four.]
Qaror
The appropriate integrating factor is (e^<-2t>) , which leads to the general solution (y(t) = -e^t + c,e^<2t>) . With (y(0) = 2) , we have (c = 3) , so the function we’re interested in is (y(t) = 3e^ <2t>- e^t) . This function has [y(1) = 3 e^2 - e = 19.44888646833 cdots ,.]
My table looks like this if you used a different precision you may have slightly different answers here. [oshlanishi matn & ext & ext hline 1 & 18.3675824225767 & 1.08130404575618 2 & 19.2976527482183 & 0.151233720114565 10 & 19.4484155316473 & 0.000470936685607583 20 & 19.4488544547105 & 0.0000320136223741947 32 & 19.4488814268114 & 0.0000050415215052876 50 & 19.4488856063245 & 0.0000008620084053831 64 & 19.4488861448336 & 0.0000003234993261637 100 & 19.4488864135417 & 0.0000000547912015333 end]
Here’s what I get when I perform the requested task. [oshlanishi h & ext hline 1 & 2.8379 10 & 3.8788 32 & 3.9620 50 & 3.9759 end] Indeed the numbers are close to (4) (discounting the first one, but who expects much out of having just one step). If it’s true that the error with (h) steps is (16) times the error with (2h) steps, then the fraction we were computing should be basically (16 = 2^4) , so if we take the logarithm we should get (4log(2)) , and then we divided by (log(2)) to get just (4) .

Download 72,08 Kb.

Do'stlaringiz bilan baham:
1   ...   7   8   9   10   11   12   13   14   15




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©www.hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish