边值问题Matlab可用BVP4C命令,但感觉比较麻烦,下面用1stOpt求解,很简单快捷:CODE:
Constant Pey=9.73, Nox=8.05, uxuy=3, bd=1, cx1e=2.3,
b1=309.7,b2=2832.5, a1=27.8,a2=2.15,a3=-0.84,a4=0.935;
Variable t=[0:0.025:1],x=1,y'=[0,-Pey*bd*y];
Plot x,y,y';
ODEFunction x'=-(Nox/b1)*(b1*x+cx1e-(a1*y+a2)/(a3*y+a4));
y''=-Pey*bd*y'-(Nox*Pey*bd*uxuy/b2)*(b1*x+cx1e-(a1*y+a2)/(a3*y+a4));
边值估算:
y(t=0): 0.32778653211
算法: 龙格-库塔-费尔博格法(Runge-Kutta-Fehlberg Method)
步长值: 0.025
步长数: 40
种群数: 5
结果:
tx(t) y'(t) y(t) x'(t)y''(t) y'(t)
0100.32778653211-7.66600291732416-24.4666416985093 0
10.000693840858838046 -0.00586485658562458 0.000602760183379987 -0.00510084725252375 0.0407853057400083 -0.00586485658562458
结果过程:
No. tx(t) y'(t) y(t) x'(t)y''(t) y'(t)
0 0100.32778653211-7.66600291732416-24.4666416985093 0
1 0.025 0.826313919267495-0.4900753603381930.321182502343127-6.27870464940025-15.2705386363518 -0.490075360338193
2 0.05 0.683848068843495-0.7862643978627070.304892497030711-5.1579190209382-8.81154521345653 -0.786264397862707
3 0.075 0.566664089408245-0.9471759823416360.282992172618731-4.24801699438317-4.34185274765138 -0.947175982341636
4 0.10.470051559334184-1.015303046468920.258303652175927-3.50591713326772-1.3105072646148-1.01530304646892
5 0.125 0.390249601896457-1.021287115609730.232742495433715-2.898296120553690.68698722317898-1.02128711560973
6 0.15 0.324233874445947-0.9870773666765230.207572500259331-2.399202985463761.94702073906203-0.987077366676523
7 0.175 0.269556313218175-0.9282589046563850.183592425130687-1.988224617384672.68638637716003-0.928258904656385
8 0.20.224224427946598-0.8557669589396630.161272572460497-1.649138023237293.06326085759594-0.855766958939663
9 0.225 0.186609425886391-0.7771497964372290.14085444777691-1.368932199524773.19261444219091-0.777149796437229
10 0.25 0.155375287754656-0.6975000843062260.122423216362664-1.137093769373263.15755303846612-0.697500084306226
11 0.275 0.129423296920018-0.611038839880.105960033630092-0.945077702106123.01768430066738-0.61103883988
12 0.30.10784802305656-0.5471333776560430.0913796756856091-0.7859070236275952.81532466545902-0.547133377656043
13 0.325 0.0899021385914759-0.4796464005228980.0785572032799784-0.6538654847358372.58009717001762-0.479646400522898
14 0.35 0.074968022580219-0.4182311389786270.0673466535604279-0.5442573913957932.33234938931414-0.418231138978627
15 0.375 0.0625347128329202-0.3630186106995210.057593889044556-0.4532175467853792.08569220018259-0.363018610699521
16 0.40.0521791123811746-0.3138635875638250.049145428162-0.3775592858651711.84888302113582-0.313863587563825
17 0.425 0.0435506113178284-0.2704476358584350.0418528608540996-0.3146519940503681.62721930221573-0.270447635858435
18 0.45 0.0363584698185308-0.2323521181083760.035578472976028-0.2623217888868751.42356581491271-0.232352118108376
19 0.475 0.0303614453595037-0.1991091004171780.0301948156838825-0.2187706148155211.23910819590991-0.199109100417178
20 0.50.0253592512680494-0.1702361005230470.0255866050433442-0.1825101094170031.07390211666811-0.170236100523047
21 0.525 0.0211855142304534-0.1452591033376540.0216505513938588-0.1523074024042050.927270211329725 -0.145259103337654
22 0.55 0.0177019615432633-0.1237271367984320.0182949507170654-0.1271406048391820.798085959370831 -0.123727136798432
23 0.575 0.0147936190504607-0.105220848412230.0154389909459885-0.1061621985644260.684973980835008 -0.10522084841223
24 0.60.0123648409053087-0.0893568825522887 0.013011899547216-0.0886688856491884 0.586448855258726 -0.0893568825522887
25 0.625 0.0103360247349054-0.0757893783829889 0.010959975861-0.0740767321274094 0.501009027163578 -0.0757893783829889
26 0.65 0.00864089210235943 -0.0642095490478649 0.00920587648845576 -0.0619006582113814 0.427198170126278 -0.0642095490478649
27 0.675 0.00722423559559995 -0.0543440348572125 0.00772726568799934 -0.0517375017368198 0.36364321761 -0.0543440348572125
28 0.70.00604005138059095 -0.0459525242309598 0.00647639968487763 -0.043254132175 0.309075883307506 -0.0459525242309598
29 0.725 0.00504999039082492 -0.0388249890925048 0.00541911382433476 -0.0361653286316663 0.262342698160537 -0.0388249890925048
30 0.75 0.00422207307997283 -0.0327787733794859 0.00452614590083615 -0.0302453015167734 0.222407244050448 -0.0327787733794859
31 0.775 0.00352962231729211 -0.0276556945654436 0.00377248824180515 -0.0252986667688346 0.188347254882715 -0.0276556945654436
32 0.80.00295037694023563 -0.0233192611702517 0.00313681097020956 -0.0211644268962893 0.159348504512056 -0.0233192611702517
33 0.825 0.00246575500715863 -0.0196520685790281 0.00260095269653461 -0.0177084172807521 0.134696842800273 -0.0196520685790281
34 0.85 0.00206024116846864 -0.0165534068636294 0.00214947371190719 -0.0148187912247088 0.113769329539156 -0.0165534068636294
35 0.875 0.00172087700369442 -0.0139370945264954 0.00176926617464773 -0.0124022733798921 0.0960251142514258 -0.0139370945264954
36 0.90.00143683682371022 -0.0117295387756349 0.00144921561232049 -0.0103810490993766 0.0809964905399249 -0.0117295387756349
37 0.925 0.00119907445004718 -0.00986801430609513 0.00117990816225777 -0.0086901804028 0.068280395780233 -0.00986801430609513
38 0.95 0.00100002897020513 -0.00829914727748304 0.00095337824605355 -0.00727545828585919 0.0575305147328749 -0.00829914727748304
39 0.975 0.000833379522126888 -0.00697758825381183 0.000762891746903158 -0.00609161680467778 0.0484500671551354 -0.00697758825381183
40 10.000693840858838046 -0.00586485658562458 0.000602760183379987 -0.00510084725252375 0.0407853057400083 -0.00586485658562458
c1.jpg