tomleslie

13876 Reputation

20 Badges

15 years, 174 days

MaplePrimes Activity


These are answers submitted by tomleslie

In order to produce any kind of answer, I have to make a lot of assumptions about values for various parameters. Some \value has to be given for "infinity", so that the boundary conditions can be applied. The precise values selected for theparameters may have an effect on the "appropiate" value for "infinity.

It is not obvious to me where/how you want to apply a "shooting" method!?

The shooting technique is used (essentially) to replace values of the dependent variable on one boundary (in your case infinity?) with values of the derivatives of these variables on the other boundary (in your case 0). So, for example, one replaces the condition F(infinity) with (some function of) D(F)(0), and so on

Anyhow, some variaton on the attached, may be the solution to your problem


 

  restart;
#
# Define the ODE system
#
  odeSys:= { diff(F(eta), eta$2)+2*eta*diff(F(eta),eta)-4*M^2*F(eta)=0,
             diff(theta(eta), eta$2)+2*Pr*eta*diff(theta(eta),eta)+Pr*Nb*diff(theta(eta), eta)*diff(psi(eta), eta)+Pr*Nt*diff(theta(eta),  eta)^2=0,
             diff(psi(eta), eta$2)+2*Pr*Le*eta*diff(psi(eta),eta)+(Nt/Nb)*diff(theta(eta), eta$2)=0
           };
#
# Define the first set of boundary conditions
#
  bcs1:= { F(0)=1, theta(0)=1, psi(0)=1,
           F(inf)=0, theta(inf)=0, psi(inf)=0
         };
#
# Need some parameter values for numeric
# solution - pick these at "random", but
# note that "infinity"=10
#
  pList:= [ Le=1, M=1, Nb=1,
            Nt=1, Pr=1, inf=10
          ]:
         

{diff(diff(F(eta), eta), eta)+2*eta*(diff(F(eta), eta))-4*M^2*F(eta) = 0, diff(diff(psi(eta), eta), eta)+2*Pr*Le*eta*(diff(psi(eta), eta))+Nt*(diff(diff(theta(eta), eta), eta))/Nb = 0, diff(diff(theta(eta), eta), eta)+2*Pr*eta*(diff(theta(eta), eta))+Pr*Nb*(diff(theta(eta), eta))*(diff(psi(eta), eta))+Pr*Nt*(diff(theta(eta), eta))^2 = 0}

 

{F(0) = 1, F(inf) = 0, psi(0) = 1, psi(inf) = 0, theta(0) = 1, theta(inf) = 0}

(1)

#
# Generate solution with first set of BCs
#
  sol1:= dsolve( eval
                 ( `union`( odeSys, bcs1),
                   pList
                 ),
                 numeric
               );
#
# and plot
#
  plots:-odeplot( sol1,
                  [ [eta, F(eta)],
                    [eta, theta(eta)],
                    [eta,psi(eta)]
                  ],
                  eta=0..5,
                  color = [red, green, blue],
                  title = "Pure BV problem",
                  titlefont = [times, bold, 20]
                );

proc (x_bvp) local res, data, solnproc, _ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x_bvp) else outpoint := evalf(x_bvp) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(34, {(1) = .0, (2) = .2380123849261573, (3) = .47789365571297593, (4) = .722064735662657, (5) = .9728936653236921, (6) = 1.2329866452984901, (7) = 1.5043595006384363, (8) = 1.7873142261970394, (9) = 2.081138602811187, (10) = 2.383711617742643, (11) = 2.6926636686302414, (12) = 3.006288916610139, (13) = 3.323332697501669, (14) = 3.6426909788310287, (15) = 3.96337282665639, (16) = 4.2848620748455115, (17) = 4.60680333742736, (18) = 4.9289685818758135, (19) = 5.251221772123199, (20) = 5.573515792748296, (21) = 5.895610168012576, (22) = 6.217539212039117, (23) = 6.539555728944924, (24) = 6.861893818578187, (25) = 7.184304061136146, (26) = 7.506683535305285, (27) = 7.8290277449564165, (28) = 8.151359647280843, (29) = 8.473719634237078, (30) = 8.796136973239305, (31) = 9.1186302583329, (32) = 9.438729598670927, (33) = 9.742405997244644, (34) = 10.0}, datatype = float[8], order = C_order); Y := Matrix(34, 6, {(1, 1) = 1.0, (1, 2) = -2.256758334225869, (1, 3) = 1.0, (1, 4) = -1.1046521520640211, (1, 5) = 1.0, (1, 6) = -.4574423080562462, (2, 1) = .566077447903811, (2, 2) = -1.431360388126188, (2, 3) = .7617451848191231, (2, 4) = -.8834047187641761, (2, 5) = .8709623284201068, (2, 6) = -.6240892365575098, (3, 1) = .29798726284560034, (3, 2) = -.8418300912219238, (3, 3) = .5801887254230795, (3, 4) = -.6361098225450209, (3, 5) = .705313443650868, (3, 6) = -.7437955949160183, (4, 1) = .14377030219786655, (4, 2) = -.4526223041531358, (4, 3) = .44842140452625456, (4, 4) = -.46082062022664405, (4, 5) = .5189675579755266, (4, 6) = -.7627149186082532, (5, 1) = 0.6247572847242458e-1, (5, 2) = -.2186944869477713, (5, 3) = .3442241979974015, (5, 4) = -.38455229219582976, (5, 5) = .3378852576600364, (5, 6) = -.6631619538428932, (6, 1) = 0.23920384829197023e-1, (6, 2) = -0.9292867596649534e-1, (6, 3) = .24793409676240463, (6, 4) = -.3578988284045769, (6, 5) = .18848545934259994, (6, 6) = -.4776962884393211, (7, 1) = 0.7877177133800532e-2, (7, 2) = -0.339049007558943e-1, (7, 3) = .15632950943486654, (7, 4) = -.3097422691609852, (7, 5) = 0.8696035126785284e-1, (7, 6) = -.275686240256454, (8, 1) = 0.218628346495752e-2, (8, 2) = -0.10403083199546486e-1, (8, 3) = 0.8123951915613362e-1, (8, 4) = -.21584690299099507, (8, 5) = 0.32272919683038095e-1, (8, 6) = -.12367364525362602, (9, 1) = 0.5030187154027723e-3, (9, 2) = -0.26385888451191234e-2, (9, 3) = 0.3340025378842085e-1, (9, 4) = -.11335249983005874, (9, 5) = 0.9504386773090984e-2, (9, 6) = -0.4258951478566115e-1, (10, 1) = 0.9518250996971206e-4, (10, 2) = -0.5483594172887024e-3, (10, 3) = 0.10681046745682682e-1, (10, 4) = -0.4419241546334942e-1, (10, 5) = 0.22272985314407317e-2, (10, 6) = -0.11366400152902717e-1, (11, 1) = 0.14775227660095928e-4, (11, 2) = -0.9308186392081005e-4, (11, 3) = 0.26565256583483392e-2, (11, 4) = -0.12923073625759224e-1, (11, 5) = 0.4189684548536517e-3, (11, 6) = -0.2392023924358283e-2, (12, 1) = 0.1877652598174277e-5, (12, 2) = -0.12875532530954151e-4, (12, 3) = 0.5166316139631985e-3, (12, 4) = -0.28792573385198806e-2, (12, 5) = 0.635779678196666e-4, (12, 6) = -0.4014356289937108e-3, (13, 1) = 0.1950520255723045e-6, (13, 2) = -0.14491526543994265e-5, (13, 3) = 0.7903093775889504e-4, (13, 4) = -0.4953267870546222e-3, (13, 5) = 0.779633399994364e-5, (13, 6) = -0.5398782329317191e-4, (14, 1) = 0.165644927140037e-7, (14, 2) = -0.13273512063018782e-6, (14, 3) = 0.9569744737651708e-5, (14, 4) = -0.6652833823114246e-4, (14, 5) = 0.7739644053012265e-6, (14, 6) = -0.5837413375043285e-5, (15, 1) = 0.11504140364419622e-8, (15, 2) = -0.9899151422373308e-8, (15, 3) = 0.9237897895521946e-6, (15, 4) = -0.7047457670929068e-5, (15, 5) = 0.6239347216797149e-7, (15, 6) = -0.5094030278624803e-6, (16, 1) = 0.650277256738697e-10, (16, 2) = -0.5984056825169569e-9, (16, 3) = 0.7140428246673527e-7, (16, 4) = -0.592670806618642e-6, (16, 5) = 0.40824630426980095e-8, (16, 6) = -0.3588156740395189e-7, (17, 1) = 0.2967248665452794e-11, (17, 2) = -0.29090765755550425e-10, (17, 3) = 0.4415994756985435e-8, (17, 4) = -0.39600460768048433e-7, (17, 5) = 0.21565872412478203e-9, (17, 6) = -0.20305302086993395e-8, (18, 1) = 0.10776356256914893e-12, (18, 2) = -0.11217893688892368e-11, (18, 3) = 0.21714589359704164e-9, (18, 4) = -0.2091376363778614e-8, (18, 5) = 0.9116700696930435e-11, (18, 6) = -0.9154971026952435e-10, (19, 1) = 0.31045640069997582e-14, (19, 2) = -0.3419388853553939e-13, (19, 3) = 0.8380932918695681e-11, (19, 4) = -0.8627430049840777e-10, (19, 5) = 0.30217772768888455e-12, (19, 6) = -0.32246992610260285e-11, (20, 1) = 0.6208350884401482e-16, (20, 2) = -0.7250094323717951e-15, (20, 3) = 0.24932983981471123e-12, (20, 4) = -0.27281837045178956e-11, (20, 5) = 0.8082869333217836e-14, (20, 6) = -0.9118721802018868e-13, (21, 1) = 0.27946301564937824e-17, (21, 2) = -0.33345256553209295e-16, (21, 3) = 0.58935467423053745e-14, (21, 4) = -0.6909039190138805e-13, (21, 5) = 0.869105354480347e-16, (21, 6) = -0.107341313206463e-14, (22, 1) = -0.4732462153871571e-18, (22, 2) = 0.5813659707734513e-17, (22, 3) = 0.5305774709195551e-17, (22, 4) = 0.12522956061244237e-15, (22, 5) = 0.2147010241631035e-16, (22, 6) = -0.25867078276633224e-15, (23, 1) = 0.1557577142121007e-18, (23, 2) = -0.20079757021514426e-17, (23, 3) = 0.37060034221438215e-16, (23, 4) = -0.5365867195376322e-15, (23, 5) = -0.5863742470217224e-17, (23, 6) = 0.7380401830399008e-16, (24, 1) = -0.5284443129097663e-19, (24, 2) = 0.7126205506309868e-18, (24, 3) = -0.14129907929758515e-16, (24, 4) = 0.21055463312120054e-15, (24, 5) = 0.19381787899520903e-17, (24, 6) = -0.2557817063253278e-16, (25, 1) = 0.18976233580199313e-19, (25, 2) = -0.26710505764116325e-18, (25, 3) = 0.5710883506465868e-17, (25, 4) = -0.8756110444544181e-16, (25, 5) = -0.6776902177554719e-18, (25, 6) = 0.9349602425285053e-17, (26, 1) = -0.7150892913478765e-20, (26, 2) = 0.1050157454214446e-18, (26, 3) = -0.23615221303492892e-17, (26, 4) = 0.37480347051794483e-16, (26, 5) = 0.249428975220336e-18, (26, 6) = -0.3597886773699928e-17, (27, 1) = 0.2827610738862944e-20, (27, 2) = -0.43103644474711577e-19, (27, 3) = 0.10144521301456549e-17, (27, 4) = -0.16533957149859523e-16, (27, 5) = -0.9680677360401243e-19, (27, 6) = 0.14496505335853767e-17, (28, 1) = -0.11535714178684715e-20, (28, 2) = 0.18401267030195964e-19, (28, 3) = -0.4396071821621378e-18, (28, 4) = 0.7511832416241572e-17, (28, 5) = 0.38699885547406664e-19, (28, 6) = -0.6088609117762913e-18, (29, 1) = 0.5004615110252668e-21, (29, 2) = -0.8139243231825375e-20, (29, 3) = 0.20526280550875618e-18, (29, 4) = -0.35109016943183045e-17, (29, 5) = -0.16630527284164486e-19, (29, 6) = 0.26557753250787453e-18, (30, 1) = -0.21136320952918815e-21, (30, 2) = 0.3723694596895634e-20, (30, 3) = -0.889652588394161e-19, (30, 4) = 0.1685763720915889e-17, (30, 5) = 0.6851418600773702e-20, (30, 6) = -0.11991572686425969e-18, (31, 1) = 0.10644894919247057e-21, (31, 2) = -0.17527254424253154e-20, (31, 3) = 0.4897213094941149e-19, (31, 4) = -0.8303202362628123e-18, (31, 5) = -0.3472389187203421e-20, (31, 6) = 0.5589077958524229e-19, (32, 1) = -0.38484600420786786e-22, (32, 2) = 0.8471718760842209e-21, (32, 3) = -0.17221833778970258e-19, (32, 4) = 0.4167363490952901e-18, (32, 5) = 0.12044625169643423e-20, (32, 6) = -0.26669527837399922e-19, (33, 1) = 0.29287997611548864e-22, (33, 2) = -0.4008243933648129e-21, (33, 3) = 0.14716637271890096e-19, (33, 4) = -0.20639092086403247e-18, (33, 5) = -0.9358080768755682e-21, (33, 6) = 0.12573795644234053e-19, (34, 1) = .0, (34, 2) = 0.17342781348896414e-21, (34, 3) = .0, (34, 4) = 0.9212865454979675e-19, (34, 5) = .0, (34, 6) = -0.5308035829442962e-20}, datatype = float[8], order = C_order); YP := Matrix(34, 6, {(1, 1) = -2.256758334225869, (1, 2) = 4.0, (1, 3) = -1.1046521520640211, (1, 4) = .714568095239291, (1, 5) = -.4574423080562462, (1, 6) = -.714568095239291, (2, 1) = -1.431360388126188, (2, 2) = 2.9456727909487324, (2, 3) = -.8834047187641761, (2, 4) = 1.0642513444283421, (2, 5) = -.6240892365575098, (2, 6) = -.6437288164921764, (3, 1) = -.8418300912219238, (3, 2) = 1.9965595709488677, (3, 3) = -.6361098225450209, (3, 4) = .9234428760549676, (3, 5) = -.7437955949160183, (3, 6) = -.3154571789930228, (4, 1) = -.4526223041531358, (4, 2) = 1.2287264175981796, (4, 3) = -.46082062022664405, (4, 4) = .497234355398804, (4, 5) = -.7627149186082532, (4, 6) = .16825028326490277, (5, 1) = -.2186944869477713, (5, 2) = .6754358758751015, (5, 3) = -.38455229219582976, (5, 4) = .1526890766432628, (5, 5) = -.6631619538428932, (5, 6) = .5955679014827937, (6, 1) = -0.9292867596649534e-1, (6, 2) = .3248411721807071, (6, 3) = -.3578988284045769, (6, 4) = .1037433492273124, (6, 5) = -.4776962884393211, (6, 6) = .778825602354326, (7, 1) = -0.339049007558943e-1, (7, 2) = .1335190276758679, (7, 3) = -.3097422691609852, (7, 4) = .2638596059733312, (7, 5) = -.275686240256454, (7, 6) = .6680678447499403, (8, 1) = -0.10403083199546486e-1, (8, 2) = 0.4593229105755178e-1, (8, 3) = -.21584690299099507, (8, 4) = .37147489349777396, (8, 5) = -.12367364525362602, (8, 6) = .40009758729498157, (9, 1) = -0.26385888451191234e-2, (9, 2) = 0.12994613066659881e-1, (9, 3) = -.11335249983005874, (9, 4) = .301176654389275, (9, 5) = -0.4258951478566115e-1, (9, 6) = .1706278718536925, (10, 1) = -0.5483594172887024e-3, (10, 2) = 0.299499146725818e-2, (10, 3) = -0.4419241546334942e-1, (10, 4) = .15712701184973504, (10, 5) = -0.11366400152902717e-1, (10, 6) = 0.5355693646245627e-1, (11, 1) = -0.9308186392081005e-4, (11, 2) = 0.5603772170162824e-3, (11, 3) = -0.12923073625759224e-1, (11, 4) = 0.56749783926747094e-1, (11, 5) = -0.2392023924358283e-2, (11, 6) = 0.12845197751484003e-1, (12, 1) = -0.12875532530954151e-4, (12, 2) = 0.8492575187921863e-4, (12, 3) = -0.28792573385198806e-2, (12, 4) = 0.14899412872413975e-1, (12, 5) = -0.4014356289937108e-3, (12, 6) = 0.24123459773074765e-2, (13, 1) = -0.14491526543994265e-5, (13, 2) = 0.10412240902363117e-4, (13, 3) = -0.4953267870546222e-3, (13, 4) = 0.29334620741999803e-2, (13, 5) = -0.5398782329317191e-4, (13, 6) = 0.358809340534165e-3, (14, 1) = -0.13273512063018782e-6, (14, 2) = 0.10332840238432817e-5, (14, 3) = -0.6652833823114246e-4, (14, 4) = 0.4421569913692549e-3, (14, 5) = -0.5837413375043285e-5, (14, 6) = 0.4252736365314921e-4, (15, 1) = -0.9899151422373308e-8, (15, 2) = 0.8306971165455049e-7, (15, 3) = -0.7047457670929068e-5, (15, 4) = 0.5182550007253724e-4, (15, 5) = -0.5094030278624803e-6, (15, 6) = 0.4037904387405564e-5, (16, 1) = -0.5984056825169569e-9, (16, 2) = 0.5388282531473384e-8, (16, 3) = -0.592670806618642e-6, (16, 4) = 0.47715302121396654e-5, (16, 5) = -0.3588156740395189e-7, (16, 6) = 0.30749511215696836e-6, (17, 1) = -0.29090765755550425e-10, (17, 2) = 0.2798998682037857e-9, (17, 3) = -0.39600460768048433e-7, (17, 4) = 0.34615456305998014e-6, (17, 5) = -0.20305302086993395e-8, (17, 6) = 0.18708506599833396e-7, (18, 1) = -0.11217893688892368e-11, (18, 2) = 0.11489583359751287e-10, (18, 3) = -0.2091376363778614e-8, (18, 4) = 0.19714165488888154e-7, (18, 5) = -0.9154971026952435e-10, (18, 6) = 0.9024912909967919e-9, (19, 1) = -0.3419388853553939e-13, (19, 2) = 0.37153763993075565e-12, (19, 3) = -0.8627430049840777e-10, (19, 4) = 0.8722237483680662e-9, (19, 5) = -0.32246992610260285e-11, (19, 6) = 0.3386722193581034e-10, (20, 1) = -0.7250094323717951e-15, (20, 2) = 0.8330037077807415e-14, (20, 3) = -0.27281837045178956e-11, (20, 4) = 0.29394683125833723e-10, (20, 5) = -0.9118721802018868e-13, (20, 6) = 0.101646679946435e-11, (21, 1) = -0.33345256553209295e-16, (21, 2) = 0.4043597878061525e-15, (21, 3) = -0.6909039190138805e-13, (21, 4) = 0.8020031832598374e-12, (21, 5) = -0.107341313206463e-14, (21, 6) = 0.12656850751756843e-13, (22, 1) = 0.5813659707734513e-17, (22, 2) = -0.7418629925813105e-16, (22, 3) = 0.12522956061244237e-15, (22, 4) = -0.47738308769456256e-14, (22, 5) = -0.25867078276633224e-15, (22, 6) = 0.3216591469717046e-14, (23, 1) = -0.20079757021514426e-17, (23, 2) = 0.2688556887002175e-16, (23, 3) = -0.5365867195376322e-15, (23, 4) = 0.79833684930942e-14, (23, 5) = 0.7380401830399008e-16, (23, 6) = -0.9652909814380287e-15, (24, 1) = 0.7126205506309868e-18, (24, 2) = -0.9991230827897011e-17, (24, 3) = 0.21055463312120054e-15, (24, 4) = -0.32406364528825573e-14, (24, 5) = -0.2557817063253278e-16, (24, 6) = 0.3510293819078296e-15, (25, 1) = -0.26710505764116325e-18, (25, 2) = 0.3913832835043624e-17, (25, 3) = -0.8756110444544181e-16, (25, 4) = 0.13924719698778752e-14, (25, 5) = 0.9349602425285053e-17, (25, 6) = -0.13434077334796753e-15, (26, 1) = 0.1050157454214446e-18, (26, 2) = -0.16052435058598542e-17, (26, 3) = 0.37480347051794483e-16, (26, 4) = -0.61672260303451905e-15, (26, 5) = -0.3597886773699928e-17, (26, 6) = 0.5401639481205181e-16, (27, 1) = -0.43103644474711577e-19, (27, 2) = 0.6862296999579603e-18, (27, 3) = -0.16533957149859523e-16, (27, 4) = 0.28158832701620306e-15, (27, 5) = 0.14496505335853767e-17, (27, 6) = -0.22698708495861575e-16, (28, 1) = 0.18401267030195964e-19, (28, 2) = -0.3046049767290315e-18, (28, 3) = 0.7511832416241572e-17, (28, 4) = -0.13238938380389518e-15, (28, 5) = -0.6088609117762913e-18, (28, 6) = 0.9926088534119764e-17, (29, 1) = -0.8139243231825375e-20, (29, 2) = 0.13994117640680093e-18, (29, 3) = -0.35109016943183045e-17, (29, 4) = 0.6400165234529091e-16, (29, 5) = 0.26557753250787453e-18, (29, 6) = -0.45008591032484245e-17, (30, 1) = 0.3723694596895634e-20, (30, 2) = -0.66353708279727e-19, (30, 3) = 0.1685763720915889e-17, (30, 4) = -0.3176600750487459e-16, (30, 5) = -0.11991572686425969e-18, (30, 6) = 0.21095903174871607e-17, (31, 1) = -0.17527254424253154e-20, (31, 2) = 0.3239070630446868e-19, (31, 3) = -0.8303202362628123e-18, (31, 4) = 0.16162061168760015e-16, (31, 5) = 0.5589077958524229e-19, (31, 6) = -0.101929470777561e-17, (32, 1) = 0.8471718760842209e-21, (32, 2) = -0.16146390925598576e-19, (32, 3) = 0.4167363490952901e-18, (32, 4) = -0.8370376349658438e-17, (32, 5) = -0.26669527837399922e-19, (32, 6) = 0.5034529235628897e-18, (33, 1) = -0.4008243933648129e-21, (33, 2) = 0.7927139937964794e-20, (33, 3) = -0.20639092086403247e-18, (33, 4) = 0.4266486334590219e-17, (33, 5) = 0.12573795644234053e-19, (33, 6) = -0.24499804418502886e-18, (34, 1) = 0.17342781348896414e-21, (34, 2) = -0.3468556269779283e-20, (34, 3) = 0.9212865454979675e-19, (34, 4) = -0.1948733807584794e-17, (34, 5) = -0.5308035829442962e-20, (34, 6) = 0.10616071658885924e-18}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(34, {(1) = .0, (2) = .2380123849261573, (3) = .47789365571297593, (4) = .722064735662657, (5) = .9728936653236921, (6) = 1.2329866452984901, (7) = 1.5043595006384363, (8) = 1.7873142261970394, (9) = 2.081138602811187, (10) = 2.383711617742643, (11) = 2.6926636686302414, (12) = 3.006288916610139, (13) = 3.323332697501669, (14) = 3.6426909788310287, (15) = 3.96337282665639, (16) = 4.2848620748455115, (17) = 4.60680333742736, (18) = 4.9289685818758135, (19) = 5.251221772123199, (20) = 5.573515792748296, (21) = 5.895610168012576, (22) = 6.217539212039117, (23) = 6.539555728944924, (24) = 6.861893818578187, (25) = 7.184304061136146, (26) = 7.506683535305285, (27) = 7.8290277449564165, (28) = 8.151359647280843, (29) = 8.473719634237078, (30) = 8.796136973239305, (31) = 9.1186302583329, (32) = 9.438729598670927, (33) = 9.742405997244644, (34) = 10.0}, datatype = float[8], order = C_order); Y := Matrix(34, 6, {(1, 1) = .0, (1, 2) = 0.34965933346235575e-10, (1, 3) = .0, (1, 4) = 0.283946119233054e-9, (1, 5) = .0, (1, 6) = -0.46065838250245604e-10, (2, 1) = 0.33466267380013054e-10, (2, 2) = -0.3303506440736877e-12, (2, 3) = 0.2278520446660651e-9, (2, 4) = 0.5415238798838085e-10, (2, 5) = -0.14292553230926882e-9, (2, 6) = -0.6467175455127182e-10, (3, 1) = 0.55131392095968005e-10, (3, 2) = -0.7828421618780733e-10, (3, 3) = -0.6149190347532138e-10, (3, 4) = 0.779528228683982e-10, (3, 5) = -0.41939748193667276e-10, (3, 6) = -0.3222760000677436e-10, (4, 1) = 0.40522588093996456e-10, (4, 2) = -0.10862570736540541e-9, (4, 3) = -0.5579294326899872e-9, (4, 4) = 0.13222203751475954e-8, (4, 5) = 0.14116668112745802e-9, (4, 6) = -0.33985803440561855e-9, (5, 1) = -0.40622961747765446e-10, (5, 2) = 0.575717957293942e-10, (5, 3) = 0.17725406620629472e-9, (5, 4) = -0.16638541825050827e-10, (5, 5) = -0.7169539613751982e-10, (5, 6) = 0.10854444750330308e-9, (6, 1) = -0.1857521171979237e-9, (6, 2) = 0.5213938635684384e-9, (6, 3) = 0.10356867133733375e-8, (6, 4) = -0.28705546114293597e-8, (6, 5) = -0.9028351645754367e-10, (6, 6) = 0.4781116783988112e-9, (7, 1) = -0.3025624501523116e-9, (7, 2) = 0.10623254428169461e-8, (7, 3) = 0.8540191397774789e-9, (7, 4) = -0.4449677403338873e-8, (7, 5) = -0.3438689073365454e-9, (7, 6) = 0.6887522393494983e-9, (8, 1) = -0.22969142124840386e-9, (8, 2) = 0.979898813045886e-9, (8, 3) = -0.3908443856298229e-8, (8, 4) = 0.11013452119607333e-7, (8, 5) = -0.12366571544780109e-9, (8, 6) = 0.8466564809121998e-9, (9, 1) = -0.8809963935851612e-11, (9, 2) = 0.13244416080364183e-9, (9, 3) = -0.1782188334089209e-8, (9, 4) = 0.16218694744538896e-7, (9, 5) = 0.18041852857626733e-8, (9, 6) = -0.6778798040490775e-8, (10, 1) = 0.9564280952586821e-10, (10, 2) = -0.41494809670364024e-9, (10, 3) = 0.7551393153730879e-8, (10, 4) = -0.35815320783091306e-7, (10, 5) = -0.9574471346794944e-9, (10, 6) = 0.34283045883352914e-8, (11, 1) = 0.17691392365258364e-10, (11, 2) = -0.8519461375001902e-10, (11, 3) = -0.1404593050656779e-8, (11, 4) = 0.4911897706373593e-9, (11, 5) = -0.10734697093910102e-8, (11, 6) = 0.5296758573688577e-8, (12, 1) = -0.39377583337421646e-10, (12, 2) = 0.21762258927499256e-9, (12, 3) = -0.28955589234988743e-8, (12, 4) = 0.17674368151127838e-7, (12, 5) = 0.43691411880157814e-9, (12, 6) = -0.2264889941574407e-8, (13, 1) = -0.2037651419595134e-10, (13, 2) = 0.1080032872011042e-9, (13, 3) = 0.1128738281027482e-8, (13, 4) = -0.5798838793930303e-8, (13, 5) = 0.20268009282845e-9, (13, 6) = -0.1116968302743075e-8, (14, 1) = 0.2510950391657638e-12, (14, 2) = -0.17313433997884648e-10, (14, 3) = 0.5112847585754912e-9, (14, 4) = -0.3662867990809231e-8, (14, 5) = -0.7468360653120224e-10, (14, 6) = 0.5308306383731994e-9, (15, 1) = 0.25447102857173088e-11, (15, 2) = -0.24843829258404605e-10, (15, 3) = -0.21002920794279144e-9, (15, 4) = 0.1446191074791717e-8, (15, 5) = -0.30818921652598555e-10, (15, 6) = 0.20661784269448855e-9, (16, 1) = 0.762663010440105e-12, (16, 2) = -0.7363711949501142e-11, (16, 3) = -0.6161033938281862e-10, (16, 4) = 0.4846010760900748e-9, (16, 5) = 0.255595288796151e-11, (16, 6) = -0.33215259120185303e-10, (17, 1) = 0.1098016362498028e-12, (17, 2) = -0.11042406702432041e-11, (17, 3) = 0.111271070857117e-10, (17, 4) = -0.101301011040273e-9, (17, 5) = 0.20968341326502643e-11, (17, 6) = -0.21007721223320396e-10, (18, 1) = 0.9997466286395624e-14, (18, 2) = -0.10554700848062627e-12, (18, 3) = 0.4108304777767975e-11, (18, 4) = -0.39669078966742146e-10, (18, 5) = 0.3308342045954333e-12, (18, 6) = -0.34215645621933575e-11, (19, 1) = 0.5657524542447957e-15, (19, 2) = -0.6306631794550673e-14, (19, 3) = 0.5305720613596419e-12, (19, 4) = -0.5448125470786864e-11, (19, 5) = 0.3092301720428391e-13, (19, 6) = -0.33431781073261117e-12, (20, 1) = 0.30681781262839814e-16, (20, 2) = -0.3554779989149341e-15, (20, 3) = 0.3913101616873117e-13, (20, 4) = -0.4309711345092558e-12, (20, 5) = 0.13954537014773177e-14, (20, 6) = -0.1608534709736445e-13, (21, 1) = -0.9936394991090252e-18, (21, 2) = 0.11218418171397315e-16, (21, 3) = 0.15664559261613367e-14, (21, 4) = -0.1747714714894993e-13, (21, 5) = 0.1330249178371693e-15, (21, 6) = -0.15530639546444712e-14, (22, 1) = 0.5234986695250838e-18, (22, 2) = -0.64492340452644296e-17, (22, 3) = 0.15156658800670238e-15, (22, 4) = -0.20568575836829e-14, (22, 5) = -0.18326607133663088e-16, (22, 6) = 0.21864633001895145e-15, (23, 1) = -0.16186840157515594e-18, (23, 2) = 0.20865212941959473e-17, (23, 3) = -0.36110681895489057e-16, (23, 4) = 0.5267365702900565e-15, (23, 5) = 0.6165003660258568e-17, (23, 6) = -0.7763154904737724e-16, (24, 1) = 0.5504990009868202e-19, (24, 2) = -0.7423641662291501e-18, (24, 3) = 0.14748969878024373e-16, (24, 4) = -0.2197391331365795e-15, (24, 5) = -0.20183195972799737e-17, (24, 6) = 0.26635388690586298e-16, (25, 1) = -0.1976688365177037e-19, (25, 2) = 0.2782340467702281e-18, (25, 3) = -0.5948557079920014e-17, (25, 4) = 0.9120550269072065e-16, (25, 5) = 0.7059323983168753e-18, (25, 6) = -0.9739242883065523e-17, (26, 1) = 0.744884693004534e-20, (26, 2) = -0.10939140371245046e-18, (26, 3) = 0.24599208322984407e-17, (26, 4) = -0.3904205713354852e-16, (26, 5) = -0.2598218174513235e-18, (26, 6) = 0.37477982427965905e-17, (27, 1) = -0.2945427852380233e-20, (27, 2) = 0.4489962965152619e-19, (27, 3) = -0.10567209587868836e-17, (27, 4) = 0.17222871874056516e-16, (27, 5) = 0.10084038931931907e-18, (27, 6) = -0.1510052641490673e-17, (28, 1) = 0.12016368936149115e-20, (28, 2) = -0.19167986489819534e-19, (28, 3) = 0.4579241481245587e-18, (28, 4) = -0.7824825434215867e-17, (28, 5) = -0.4031238077803359e-19, (28, 6) = 0.6342301164251861e-18, (29, 1) = -0.521314073984658e-21, (29, 2) = 0.8478378366484942e-20, (29, 3) = -0.21381542240485142e-18, (29, 4) = 0.3657189264913136e-17, (29, 5) = 0.17323465921007022e-19, (29, 6) = -0.27664326302907194e-18, (30, 1) = 0.22017000992624905e-21, (30, 2) = -0.38788485384331265e-20, (30, 3) = 0.926721446243949e-19, (30, 4) = -0.17560038759541646e-17, (30, 5) = -0.7136894375806258e-20, (30, 6) = 0.1249122154836103e-18, (31, 1) = -0.11088432207549396e-21, (31, 2) = 0.1825755669193138e-20, (31, 3) = -0.51012636405639305e-19, (31, 4) = 0.8649169127737871e-18, (31, 5) = 0.36170720700037594e-20, (31, 6) = -0.5821956206796378e-19, (32, 1) = 0.4008812543832123e-22, (32, 2) = -0.8824707042544434e-21, (32, 3) = 0.1793941018642853e-19, (32, 4) = -0.4341003636409362e-18, (32, 5) = -0.12546484551712225e-20, (32, 6) = 0.2778075816396004e-19, (33, 1) = -0.30508330845364807e-22, (33, 2) = 0.4175254097550293e-21, (33, 3) = -0.15329830491552553e-19, (33, 4) = 0.21499054256671041e-18, (33, 5) = 0.974800080078771e-21, (33, 6) = -0.13097703796077572e-19, (34, 1) = .0, (34, 2) = -0.18065397238434391e-21, (34, 3) = .0, (34, 4) = -0.9596734848937558e-19, (34, 5) = .0, (34, 6) = 0.5529203989003238e-20}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[34] elif outpoint = "order" then return 8 elif outpoint = "error" then return HFloat(3.5815320783091306e-8) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [6, 34, [F(eta), diff(F(eta), eta), psi(eta), diff(psi(eta), eta), theta(eta), diff(theta(eta), eta)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[34] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[34] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(6, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(34, 6, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(6, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(34, 6, X, Y, outpoint, yout, L, V) end if; [eta = outpoint, seq('[F(eta), diff(F(eta), eta), psi(eta), diff(psi(eta), eta), theta(eta), diff(theta(eta), eta)]'[i] = yout[i], i = 1 .. 6)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[34] elif outpoint = "order" then return 8 elif outpoint = "error" then return HFloat(3.5815320783091306e-8) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [6, 34, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[34] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[34] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(34, 6, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(6, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0.}); `dsolve/numeric/hermite`(34, 6, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 6)] end proc, (2) = Array(0..0, {}), (3) = [eta, F(eta), diff(F(eta), eta), psi(eta), diff(psi(eta), eta), theta(eta), diff(theta(eta), eta)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(x_bvp) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x_bvp) else _ndsol := pointto(data[2][0]); return ('_ndsol')(x_bvp) end if end if; try res := solnproc(outpoint); [eta = res[1], seq('[F(eta), diff(F(eta), eta), psi(eta), diff(psi(eta), eta), theta(eta), diff(theta(eta), eta)]'[i] = res[i+1], i = 1 .. 6)] catch: error  end try end proc

 

 

#
# Notice from the previous problem that D(theta)(0)
# and D(psi)(0) are both negative - it therefore is
# impossible for the BC
#
# Nb*D(psi)(0)+Nt*D(theta)(0)=0  
#
# to be true, unless one of Nt, Nb is negative -
# and I don't know the values for either of
# these parameters. I'm going to ignore this
# issue for the moment
#
# Define the second set of boundary conditions

  bcs2:= { F(0)=1, theta(0)=1, Nb*D(psi)(0)+Nt*D(theta)(0)=0,
           F(inf)=0, theta(inf)=0, psi(inf)=0
         };
#
# Generate solution with second set of BCs
#
  sol2:= dsolve( eval
                 ( `union`( odeSys, bcs2),
                   pList
                 ),
                 numeric
               );
#
# and plot
#
  plots:-odeplot( sol2,
                  [ [eta, F(eta)],
                    [eta, theta(eta)],
                    [eta, psi(eta)]
                  ],
                  eta=0..5,
                  color = [red, green, blue],
                  title = "Mixed BV/IV problem",
                  titlefont = [times, bold, 20]
                );

{Nb*(D(psi))(0)+Nt*(D(theta))(0) = 0, F(0) = 1, F(inf) = 0, psi(inf) = 0, theta(0) = 1, theta(inf) = 0}

 

proc (x_bvp) local res, data, solnproc, _ndsol, outpoint, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then outpoint := evalf[_EnvDSNumericSaveDigits](x_bvp) else outpoint := evalf(x_bvp) end if; data := Array(1..4, {(1) = proc (outpoint) local X, Y, YP, yout, errproc, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; X := Vector(34, {(1) = .0, (2) = .2343842143171114, (3) = .4708183593688573, (4) = .7118535148689288, (5) = .9598168089513965, (6) = 1.2173517081477976, (7) = 1.486564819774295, (8) = 1.7680727536355723, (9) = 2.061453020903797, (10) = 2.3646655999607806, (11) = 2.6752530680315387, (12) = 2.9906515364612627, (13) = 3.309291638807914, (14) = 3.6301570201803144, (15) = 3.952236758960863, (16) = 4.275053403434863, (17) = 4.598289303149153, (18) = 4.92173724705545, (19) = 5.245266581865292, (20) = 5.568825516453132, (21) = 5.892176127711305, (22) = 6.215354551740697, (23) = 6.5386166439782345, (24) = 6.862197505282042, (25) = 7.185849410017798, (26) = 7.509469050857628, (27) = 7.8330516868477, (28) = 8.156622368667398, (29) = 8.480224782528584, (30) = 8.80388995475139, (31) = 9.127637289443834, (32) = 9.447794615584518, (33) = 9.746787754844187, (34) = 10.0}, datatype = float[8], order = C_order); Y := Matrix(34, 6, {(1, 1) = 1.0, (1, 2) = -2.256758334222045, (1, 3) = -.4762353938328856, (1, 4) = 1.0263709476096419, (1, 5) = 1.0, (1, 6) = -1.0263709476096419, (2, 1) = .5712900894241217, (2, 2) = -1.4420758786669914, (2, 3) = -.24401995489951545, (2, 4) = .9221981477215612, (2, 5) = .7635180652223494, (2, 6) = -.9756608572168339, (3, 1) = .30399364631933845, (3, 2) = -.8560464502146562, (3, 3) = -0.5450550685826348e-1, (3, 4) = .6639510263022674, (3, 5) = .5467541076064204, (3, 6) = -.8486361961565907, (4, 1) = .14845666481146205, (4, 2) = -.4653094917673255, (4, 3) = 0.679042328658019e-1, (4, 4) = .35267461727188926, (4, 5) = .3621405282433861, (4, 6) = -.6791003627889548, (5, 1) = 0.6539397303648418e-1, (5, 2) = -.22767810811329764, (5, 3) = .119971719130165, (5, 4) = 0.8178872208027846e-1, (5, 5) = .21689824350697587, (5, 6) = -.49246866986608684, (6, 1) = 0.25413657478506217e-1, (6, 2) = -0.9812973280442885e-1, (6, 3) = .11645032910188574, (6, 4) = -0.884005627029151e-1, (6, 5) = .11380946147552806, (6, 6) = -.3127312328817185, (7, 1) = 0.850209033653986e-2, (7, 2) = -0.3635650835775421e-1, (7, 3) = 0.8282987974968858e-1, (7, 4) = -.14318003438899105, (7, 5) = 0.5048932608361854e-1, (7, 6) = -.1663934139879095, (8, 1) = 0.2395180430794629e-2, (8, 2) = -0.11321930873970825e-1, (8, 3) = 0.4513033534459292e-1, (8, 4) = -.11587520380116943, (8, 5) = 0.18379121228563697e-1, (8, 6) = -0.7137576560191339e-1, (9, 1) = 0.5575557965406443e-3, (9, 2) = -0.2906217912615536e-2, (9, 3) = 0.18897013344848803e-1, (9, 4) = -0.6341653279072378e-1, (9, 5) = 0.5384120677895583e-2, (9, 6) = -0.2413539256475826e-1, (10, 1) = 0.10618791558821003e-3, (10, 2) = -0.6082769947413864e-3, (10, 3) = 0.60837554675483895e-2, (10, 4) = -0.25013321190854462e-1, (10, 5) = 0.1262540537396918e-2, (10, 6) = -0.6414491982795676e-2, (11, 1) = 0.16483649624413244e-4, (11, 2) = -0.10333945305789604e-3, (11, 3) = 0.15134267669089912e-2, (11, 4) = -0.7326650200174823e-2, (11, 5) = 0.23737856264042723e-3, (11, 6) = -0.13482678422751671e-2, (12, 1) = 0.20897209832909457e-5, (12, 2) = -0.14271200043117643e-4, (12, 3) = 0.2937464103974935e-3, (12, 4) = -0.16304317229255435e-2, (12, 5) = 0.3597505105970514e-4, (12, 6) = -0.2260989298491779e-3, (13, 1) = 0.2164609700782715e-6, (13, 2) = -0.16026889254056569e-5, (13, 3) = 0.4482902573768494e-4, (13, 4) = -0.2799944216488622e-3, (13, 5) = 0.4404492456176782e-5, (13, 6) = -0.3038141564752703e-4, (14, 1) = 0.1831276834232785e-7, (14, 2) = -0.14632234930771098e-6, (14, 3) = 0.5410860559217429e-5, (14, 4) = -0.37506648184045686e-4, (14, 5) = 0.4360767209199397e-6, (14, 6) = -0.32783903694574197e-5, (15, 1) = 0.12661171872113015e-8, (15, 2) = -0.10868553866546637e-7, (15, 3) = 0.5202686384457746e-6, (15, 4) = -0.3959438482320933e-5, (15, 5) = 0.3502636067809508e-7, (15, 6) = -0.2852064960720923e-6, (16, 1) = 0.7117582315096296e-10, (16, 2) = -0.6536715542316057e-9, (16, 3) = 0.4001376575721204e-7, (16, 4) = -0.33145932932594207e-6, (16, 5) = 0.2280616064557433e-8, (16, 6) = -0.2000083661158158e-7, (17, 1) = 0.3225513534922548e-11, (17, 2) = -0.3157063023498068e-10, (17, 3) = 0.24587684252075587e-8, (17, 4) = -0.22013235508746866e-7, (17, 5) = 0.1196983083947678e-9, (17, 6) = -0.11250007948010919e-8, (18, 1) = 0.11610931261926292e-12, (18, 2) = -0.12070593987761014e-11, (18, 3) = 0.1199160102392892e-9, (18, 4) = -0.11534464776727402e-8, (18, 5) = 0.5017894091495262e-11, (18, 6) = -0.50317217919298215e-10, (19, 1) = 0.33121354591018758e-14, (19, 2) = -0.3644014239202702e-13, (19, 3) = 0.4580418760864209e-11, (19, 4) = -0.47104642367169585e-10, (19, 5) = 0.16457965959168204e-12, (19, 6) = -0.17543460584285789e-11, (20, 1) = 0.6440067388521428e-16, (20, 2) = -0.7519907343228058e-15, (20, 3) = 0.1346576646676216e-12, (20, 4) = -0.14723244049227199e-11, (20, 5) = 0.43495589041610415e-14, (20, 6) = -0.4902602686911094e-13, (21, 1) = 0.31749920022478234e-17, (21, 2) = -0.3779313932709499e-16, (21, 3) = 0.31149040425696626e-14, (21, 4) = -0.36518856104269933e-13, (21, 5) = 0.4447302349929444e-16, (21, 6) = -0.5505923790681467e-15, (22, 1) = -0.5764472103854067e-18, (22, 2) = 0.7078227462446087e-17, (22, 3) = 0.6506383976305795e-17, (22, 4) = 0.27338048258708396e-16, (22, 5) = 0.1183477221936366e-16, (22, 6) = -0.14244719573390598e-15, (23, 1) = 0.18952322694965253e-18, (23, 2) = -0.24420511778927667e-17, (23, 3) = 0.18501484210393556e-16, (23, 4) = -0.27177971036450334e-15, (23, 5) = -0.32692765585905005e-17, (23, 6) = 0.4112832726273701e-16, (24, 1) = -0.6457155961472713e-19, (24, 2) = 0.8704877721131974e-18, (24, 3) = -0.720772897920949e-17, (24, 4) = 0.10855768132208902e-15, (24, 5) = 0.10847109198627862e-17, (24, 6) = -0.1431022065179641e-16, (25, 1) = 0.2327933434775583e-19, (25, 2) = -0.32762281717845306e-18, (25, 3) = 0.29605787350251e-17, (25, 4) = -0.45765135906945534e-16, (25, 5) = -0.3808279722630556e-18, (25, 6) = 0.5253152407721749e-17, (26, 1) = -0.8806567183784348e-20, (26, 2) = 0.12932886804114838e-18, (26, 3) = -0.12396062730856473e-17, (26, 4) = 0.1980729705839144e-16, (26, 5) = 0.14072749016166114e-18, (26, 6) = -0.20298952988553868e-17, (27, 1) = 0.34954990868387114e-20, (27, 2) = -0.53292240138181895e-19, (27, 3) = 0.5381030554925686e-18, (27, 4) = -0.881963030623152e-17, (27, 5) = -0.5483029142463242e-19, (27, 6) = 0.8211914720472564e-18, (28, 1) = -0.14314588785308702e-20, (28, 2) = 0.22838566537503922e-19, (28, 3) = -0.2352136420928892e-18, (28, 4) = 0.40397368121457306e-17, (28, 5) = 0.22005262485162492e-19, (28, 6) = -0.346268630050804e-18, (29, 1) = 0.62315751834979805e-21, (29, 2) = -0.10140166841623481e-19, (29, 3) = 0.11069455491400594e-18, (29, 4) = -0.19018776232887336e-17, (29, 5) = -0.9488708970540707e-20, (29, 6) = 0.15162254518421876e-18, (30, 1) = -0.26431525357975835e-21, (30, 2) = 0.46562726936387295e-20, (30, 3) = -0.48327160250979105e-19, (30, 4) = 0.9192466279741314e-18, (30, 5) = 0.3927395176485356e-20, (30, 6) = -0.6872141587895395e-19, (31, 1) = 0.13333540951196105e-21, (31, 2) = -0.21997232769803124e-20, (31, 3) = 0.26734287953842375e-19, (31, 4) = -0.4555427443506504e-18, (31, 5) = -0.19927165080118232e-20, (31, 6) = 0.3214899627820968e-19, (32, 1) = -0.48450957604350975e-22, (32, 2) = 0.1064116796830968e-20, (32, 3) = -0.9470328954405168e-20, (32, 4) = 0.2293750826908202e-18, (32, 5) = 0.6956891523469595e-21, (32, 6) = -0.153547177104455e-19, (33, 1) = 0.36186181635909283e-22, (33, 2) = -0.4979690955838544e-21, (33, 3) = 0.7974112431132876e-20, (33, 4) = -0.11268717855541876e-18, (33, 5) = -0.529627911715435e-21, (33, 6) = 0.7158428878559022e-20, (34, 1) = .0, (34, 2) = 0.2121520995405498e-21, (34, 3) = .0, (34, 4) = 0.49703554471789827e-19, (34, 5) = .0, (34, 6) = -0.297515637221149e-20}, datatype = float[8], order = C_order); YP := Matrix(34, 6, {(1, 1) = -2.256758334222045, (1, 2) = 4.0, (1, 3) = 1.0263709476096419, (1, 4) = .0, (1, 5) = -1.0263709476096419, (1, 6) = .0, (2, 1) = -1.4420758786669914, (2, 2) = 2.9611600013105286, (2, 3) = .9221981477215612, (2, 4) = -.837494910538989, (2, 5) = -.9756608572168339, (2, 6) = .40519753394216174, (3, 1) = -.8560464502146562, (3, 2) = 2.0220593557445508, (3, 3) = .6639510263022674, (3, 4) = -1.2675771489290462, (3, 5) = -.8486361961565907, (3, 6) = .642376483119241, (4, 1) = -.4653094917673255, (4, 2) = 1.2562910536787393, (4, 3) = .35267461727188926, (4, 4) = -1.2472694500159671, (4, 5) = -.6791003627889548, (4, 6) = .7451641181958699, (5, 1) = -.22767810811329764, (5, 2) = .6986344425407296, (5, 3) = 0.8178872208027846e-1, (5, 4) = -.9001167872826724, (5, 5) = -.49246866986608684, (5, 6) = .7431124068120614, (6, 1) = -0.9812973280442885e-1, (6, 2) = .34057142561314174, (6, 3) = -0.884005627029151e-1, (6, 4) = -.42073220808297296, (6, 5) = -.3127312328817185, (6, 6) = .6359613600982134, (7, 1) = -0.3635650835775421e-1, (7, 2) = .14210097393509452, (7, 3) = -.14318003438899105, (7, 4) = -0.1750540396419468e-1, (7, 5) = -.1663934139879095, (7, 6) = .4431982079976904, (8, 1) = -0.11321930873970825e-1, (8, 2) = 0.4961671671680491e-1, (8, 3) = -.11587520380116943, (8, 4) = .1707216697652347, (8, 5) = -0.7137576560191339e-1, (8, 6) = .23902991156039885, (9, 1) = -0.2906217912615536e-2, (9, 2) = 0.14212286576894625e-1, (9, 3) = -0.6341653279072378e-1, (9, 4) = .16406555045497953, (9, 5) = -0.2413539256475826e-1, (9, 6) = 0.9739485573838494e-1, (10, 1) = -0.6082769947413864e-3, (10, 2) = 0.33014950317778024e-2, (10, 3) = -0.25013321190854462e-1, (10, 4) = 0.8816161671132403e-1, (10, 5) = -0.6414491982795676e-2, (10, 6) = 0.3013466361024313e-1, (11, 1) = -0.10333945305789604e-3, (11, 2) = 0.6188529761813281e-3, (11, 3) = -0.7326650200174823e-2, (11, 4) = 0.31999067602704365e-1, (11, 5) = -0.13482678422751671e-2, (11, 6) = 0.7202219250118799e-2, (12, 1) = -0.14271200043117643e-4, (12, 2) = 0.9371925660535541e-4, (12, 3) = -0.16304317229255435e-2, (12, 4) = 0.8400159810227365e-2, (12, 5) = -0.2260989298491779e-3, (12, 6) = 0.13519464642975578e-2, (13, 1) = -0.16026889254056569e-5, (13, 2) = 0.11473374001223048e-4, (13, 3) = -0.2799944216488622e-3, (13, 4) = 0.1652093897053176e-2, (13, 5) = -0.3038141564752703e-4, (13, 6) = 0.2010724998976984e-3, (14, 1) = -0.14632234930771098e-6, (14, 2) = 0.11355972804666377e-5, (14, 3) = -0.37506648184045686e-4, (14, 4) = 0.2485080344976163e-3, (14, 5) = -0.32783903694574197e-5, (14, 6) = 0.23802009919877162e-4, (15, 1) = -0.10868553866546637e-7, (15, 2) = 0.9097466496506889e-7, (15, 3) = -0.3959438482320933e-5, (15, 4) = 0.29042870644605233e-4, (15, 5) = -0.2852064960720923e-6, (15, 6) = 0.2254405984740779e-5, (16, 1) = -0.6536715542316057e-9, (16, 2) = 0.5873664897896617e-8, (16, 3) = -0.33145932932594207e-6, (16, 4) = 0.26630033856439357e-5, (16, 5) = -0.2000083661158158e-7, (16, 6) = 0.17100928222627552e-6, (17, 1) = -0.3157063023498068e-10, (17, 2) = 0.30324383674606805e-9, (17, 3) = -0.22013235508746866e-7, (17, 4) = 0.19210029251964188e-6, (17, 5) = -0.11250007948010919e-8, (17, 6) = 0.1034615821550578e-7, (18, 1) = -0.12070593987761014e-11, (18, 2) = 0.12346095655206444e-10, (18, 3) = -0.11534464776727402e-8, (18, 4) = 0.10858624732151014e-7, (18, 5) = -0.50317217919298215e-10, (18, 6) = 0.4952962511426619e-9, (19, 1) = -0.3644014239202702e-13, (19, 2) = 0.3955250640910317e-12, (19, 3) = -0.47104642367169585e-10, (19, 4) = 0.4757487874119419e-9, (19, 5) = -0.17543460584285789e-11, (19, 6) = 0.18404025506519324e-10, (20, 1) = -0.7519907343228058e-15, (20, 2) = 0.8633013074407196e-14, (20, 3) = -0.14723244049227199e-11, (20, 4) = 0.1585220065046266e-10, (20, 5) = -0.4902602686911094e-13, (20, 6) = 0.5460347787979691e-12, (21, 1) = -0.3779313932709499e-16, (21, 2) = 0.458067634677744e-15, (21, 3) = -0.36518856104269933e-13, (21, 4) = 0.4238626897537169e-12, (21, 5) = -0.5505923790681467e-15, (21, 6) = 0.6488374544090196e-14, (22, 1) = 0.7078227462446087e-17, (22, 2) = -0.902931753954822e-16, (22, 3) = 0.27338048258708396e-16, (22, 4) = -0.2110550978135801e-14, (22, 5) = -0.14244719573390598e-15, (22, 6) = 0.17707196527748612e-14, (23, 1) = -0.24420511778927667e-17, (23, 2) = 0.32693365862231205e-16, (23, 3) = -0.27177971036450334e-15, (23, 4) = 0.4091971405728083e-14, (23, 5) = 0.4112832726273701e-16, (23, 6) = -0.537844730358232e-15, (24, 1) = 0.8704877721131974e-18, (24, 2) = -0.12205204274806321e-16, (24, 3) = 0.10855768132208902e-15, (24, 4) = -0.16862876208088704e-14, (24, 5) = -0.1431022065179641e-16, (24, 6) = 0.19639912091358579e-15, (25, 1) = -0.32762281717845306e-18, (25, 2) = 0.4801613792451335e-17, (25, 3) = -0.45765135906945534e-16, (25, 4) = 0.7332194739721396e-15, (25, 5) = 0.5253152407721749e-17, (25, 6) = -0.7549672425952181e-16, (26, 1) = 0.12932886804114838e-18, (26, 2) = -0.19776085326100452e-17, (26, 3) = 0.1980729705839144e-16, (26, 4) = -0.3279714403287395e-15, (26, 5) = -0.20298952988553868e-17, (26, 6) = 0.30486871846471843e-16, (27, 1) = -0.53292240138181895e-19, (27, 2) = 0.8488637393679116e-18, (27, 3) = -0.881963030623152e-17, (27, 4) = 0.15103411058588922e-15, (27, 5) = 0.8211914720472564e-18, (27, 6) = -0.12864870490689415e-16, (28, 1) = 0.22838566537503922e-19, (28, 2) = -0.3782969608903299e-18, (28, 3) = 0.40397368121457306e-17, (28, 4) = -0.7154998019783439e-16, (28, 5) = -0.346268630050804e-18, (28, 6) = 0.5648764906880407e-17, (29, 1) = -0.10140166841623481e-19, (29, 2) = 0.1744744183720193e-18, (29, 3) = -0.19018776232887336e-17, (29, 4) = 0.3482828603922191e-16, (29, 5) = 0.15162254518421876e-18, (29, 6) = -0.25715865305225436e-17, (30, 1) = 0.46562726936387295e-20, (30, 2) = -0.8304388580253745e-19, (30, 3) = 0.9192466279741314e-18, (30, 4) = -0.1739592387378712e-16, (30, 5) = -0.6872141587895395e-19, (30, 6) = 0.12100315658660308e-17, (31, 1) = -0.21997232769803124e-20, (31, 2) = 0.40689894056894016e-19, (31, 3) = -0.4555427443506504e-18, (31, 4) = 0.8902946635035506e-17, (31, 5) = 0.3214899627820968e-19, (31, 6) = -0.58688875449435545e-18, (32, 1) = 0.1064116796830968e-20, (32, 2) = -0.2030091771732273e-19, (32, 3) = 0.2293750826908202e-18, (32, 4) = -0.4624313781008304e-17, (32, 5) = -0.153547177104455e-19, (32, 6) = 0.2901364386171345e-18, (33, 1) = -0.4979690955838544e-21, (33, 2) = 0.985194289279873e-20, (33, 3) = -0.11268717855541876e-18, (33, 4) = 0.2336219398018716e-17, (33, 5) = 0.7158428878559022e-20, (33, 6) = -0.13954337387492415e-18, (34, 1) = 0.2121520995405498e-21, (34, 2) = -0.4243041990810996e-20, (34, 3) = 0.49703554471789827e-19, (34, 4) = -0.10535742168800264e-17, (34, 5) = -0.297515637221149e-20, (34, 6) = 0.595031274442298e-19}, datatype = float[8], order = C_order); errproc := proc (x_bvp) local outpoint, X, Y, yout, L, V, i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; Digits := 15; outpoint := evalf(x_bvp); X := Vector(34, {(1) = .0, (2) = .2343842143171114, (3) = .4708183593688573, (4) = .7118535148689288, (5) = .9598168089513965, (6) = 1.2173517081477976, (7) = 1.486564819774295, (8) = 1.7680727536355723, (9) = 2.061453020903797, (10) = 2.3646655999607806, (11) = 2.6752530680315387, (12) = 2.9906515364612627, (13) = 3.309291638807914, (14) = 3.6301570201803144, (15) = 3.952236758960863, (16) = 4.275053403434863, (17) = 4.598289303149153, (18) = 4.92173724705545, (19) = 5.245266581865292, (20) = 5.568825516453132, (21) = 5.892176127711305, (22) = 6.215354551740697, (23) = 6.5386166439782345, (24) = 6.862197505282042, (25) = 7.185849410017798, (26) = 7.509469050857628, (27) = 7.8330516868477, (28) = 8.156622368667398, (29) = 8.480224782528584, (30) = 8.80388995475139, (31) = 9.127637289443834, (32) = 9.447794615584518, (33) = 9.746787754844187, (34) = 10.0}, datatype = float[8], order = C_order); Y := Matrix(34, 6, {(1, 1) = .0, (1, 2) = 0.3111840686650258e-10, (1, 3) = -0.11178661553067201e-9, (1, 4) = -0.4912773280339177e-11, (1, 5) = .0, (1, 6) = 0.4912773280339177e-11, (2, 1) = 0.292421379329371e-10, (2, 2) = 0.8191556596947416e-12, (2, 3) = -0.12029584139791178e-9, (2, 4) = 0.25604300178281974e-9, (2, 5) = -0.348575081447834e-10, (2, 6) = -0.5926105156529915e-10, (3, 1) = 0.4878756035421094e-10, (3, 2) = -0.6774554234636524e-10, (3, 3) = 0.22581442280558885e-9, (3, 4) = -0.32751059100275583e-9, (3, 5) = -0.18540015016035715e-9, (3, 6) = 0.2686923316645235e-9, (4, 1) = 0.3736711536383049e-10, (4, 2) = -0.9895703967643994e-10, (4, 3) = 0.3125978588486745e-9, (4, 4) = -0.7372729829156088e-9, (4, 5) = -0.12095652331953564e-9, (4, 6) = 0.30972357777660305e-9, (5, 1) = -0.3428729504688406e-10, (5, 2) = 0.42807984158493814e-10, (5, 3) = -0.45797096705341125e-10, (5, 4) = 0.88125285879478e-10, (5, 5) = 0.9575388143971474e-10, (5, 6) = -0.1379108134514465e-9, (6, 1) = -0.17093971101744888e-9, (6, 2) = 0.4708980060511075e-9, (6, 3) = -0.15480433008957327e-9, (6, 4) = 0.520484846491495e-9, (6, 5) = 0.1398228442256018e-9, (6, 6) = -0.3613610426905786e-9, (7, 1) = -0.2958689581472768e-9, (7, 2) = 0.10243466544348187e-8, (7, 3) = -0.1197418018769835e-9, (7, 4) = -0.5620873053574579e-9, (7, 5) = -0.22252337307480355e-9, (7, 6) = 0.5437780766641117e-9, (8, 1) = -0.2514656146115342e-9, (8, 2) = 0.10533509515903089e-8, (8, 3) = -0.1467957589078851e-8, (8, 4) = 0.5381581607737173e-8, (8, 5) = 0.10651435980159191e-9, (8, 6) = -0.13948875644156835e-9, (9, 1) = -0.3933137287256785e-10, (9, 2) = 0.26965643052740803e-9, (9, 3) = 0.11814588318964848e-8, (9, 4) = -0.8912326130007848e-9, (9, 5) = 0.4962707311598738e-9, (9, 6) = -0.2101744030143906e-8, (10, 1) = 0.9215893252294493e-10, (10, 2) = -0.38873525000704135e-9, (10, 3) = 0.33444715458175074e-8, (10, 4) = -0.17092143463295875e-7, (10, 5) = -0.6431011350254042e-9, (10, 6) = 0.2491983803758834e-8, (11, 1) = 0.27263919211128072e-10, (11, 2) = -0.13302425393272652e-9, (11, 3) = -0.14529578336815846e-8, (11, 4) = 0.4444554673082341e-8, (11, 5) = -0.36728707925699267e-9, (11, 6) = 0.18545417619306134e-8, (12, 1) = -0.38364643424679524e-10, (12, 2) = 0.21194441102557884e-9, (12, 3) = -0.1223053308673868e-8, (12, 4) = 0.7636046273240048e-8, (12, 5) = 0.243650219380411e-9, (12, 6) = -0.12329423111947049e-8, (13, 1) = -0.22847641242904187e-10, (13, 2) = 0.12335073252061435e-9, (13, 3) = 0.7186593891919385e-9, (13, 4) = -0.3893235112597361e-8, (13, 5) = 0.7523491800585749e-10, (13, 6) = -0.3962652572121107e-9, (14, 1) = -0.3249167572500688e-12, (14, 2) = -0.140707461552991e-10, (14, 3) = 0.22786976018244138e-9, (14, 4) = -0.16397806321125194e-8, (14, 5) = -0.45928860931767285e-10, (14, 6) = 0.3120690141943487e-9, (15, 1) = 0.2680922613455451e-11, (15, 2) = -0.26255689346774302e-10, (15, 3) = -0.12786323256055346e-9, (15, 4) = 0.893803302311678e-9, (15, 5) = -0.14998595817806714e-10, (15, 6) = 0.9439547970757486e-10, (16, 1) = 0.8270328187372676e-12, (16, 2) = -0.7975527143204759e-11, (16, 3) = -0.313353962954659e-10, (16, 4) = 0.24584475753288673e-9, (16, 5) = 0.21030618994092133e-11, (16, 6) = -0.2470119465718317e-10, (17, 1) = 0.1194859945987745e-12, (17, 2) = -0.11999601365848266e-11, (17, 3) = 0.714467353631047e-11, (17, 4) = -0.6473700091131332e-10, (17, 5) = 0.1254268532280451e-11, (17, 6) = -0.12509689912568485e-10, (18, 1) = 0.1086315425390604e-13, (18, 2) = -0.11453354317392923e-12, (18, 3) = 0.23918184973601857e-11, (18, 4) = -0.23059876118573338e-10, (18, 5) = 0.19020695828900916e-12, (18, 6) = -0.19630595742881332e-11, (19, 1) = 0.6065676364879667e-15, (19, 2) = -0.6756516225428481e-14, (19, 3) = 0.30088144059049495e-12, (19, 4) = -0.3086742453917204e-11, (19, 5) = 0.1735875512276226e-13, (19, 6) = -0.1874321195690918e-12, (20, 1) = 0.3354747647806017e-16, (20, 2) = -0.38795321818532305e-15, (20, 3) = 0.21640469441963535e-13, (20, 4) = -0.23817813495786515e-12, (20, 5) = 0.7707300164557153e-15, (20, 6) = -0.8875893256489042e-14, (21, 1) = -0.13109106841220827e-17, (21, 2) = 0.1489699293058414e-16, (21, 3) = 0.8768952027469858e-15, (21, 4) = -0.9779794678835447e-14, (21, 5) = 0.7286289133164702e-16, (21, 6) = -0.8497861017400576e-15, (22, 1) = 0.6317597105735202e-18, (22, 2) = -0.7776144157814026e-17, (22, 3) = 0.7600215938889534e-16, (22, 4) = -0.10433178988287476e-14, (22, 5) = -0.10207524232931201e-16, (22, 6) = 0.12171620362821684e-15, (23, 1) = -0.19703838426045956e-18, (23, 2) = 0.2538651274522639e-17, (23, 3) = -0.17981058180208845e-16, (23, 4) = 0.2664255231772491e-15, (23, 5) = 0.34348708862376455e-17, (23, 6) = -0.4323008749160089e-16, (24, 1) = 0.6726560683448776e-19, (24, 2) = -0.9068084562181161e-18, (24, 3) = 0.7523439874434631e-17, (24, 4) = -0.11328976958720566e-15, (24, 5) = -0.1129595473405075e-17, (24, 6) = 0.14902162954480084e-16, (25, 1) = -0.2424928126826093e-19, (25, 2) = 0.34127339405899567e-18, (25, 3) = -0.30837972972535246e-17, (25, 4) = 0.47670040673186914e-16, (25, 5) = 0.3966983180383809e-18, (25, 6) = -0.54720701685342124e-17, (26, 1) = 0.9173507619204781e-20, (26, 2) = -0.13471757296915234e-18, (26, 3) = 0.12912574758281272e-17, (26, 4) = -0.20632615111219708e-16, (26, 5) = -0.14659112030817353e-18, (26, 6) = 0.21144740385987066e-17, (27, 1) = -0.3641144881575623e-20, (27, 2) = 0.5551275013516905e-19, (27, 3) = -0.5605240113844243e-18, (27, 4) = 0.9187114828475818e-17, (27, 5) = 0.5711488697009433e-19, (27, 6) = -0.8554077844770614e-18, (28, 1) = 0.1491102998471355e-20, (28, 2) = -0.23790173476594834e-19, (28, 3) = 0.24501421053118745e-18, (28, 4) = -0.4208059179606014e-17, (28, 5) = -0.22922148421811075e-19, (28, 6) = 0.36069648963242984e-18, (29, 1) = -0.6491224149477236e-21, (29, 2) = 0.10562673793358223e-19, (29, 3) = -0.11530682803537826e-18, (29, 4) = 0.198112252425832e-17, (29, 5) = 0.9884071844314321e-20, (29, 6) = -0.15794015123358082e-18, (30, 1) = 0.2753283891455926e-21, (30, 2) = -0.4850284055873946e-20, (30, 3) = 0.5034079192810537e-19, (30, 4) = -0.9575485708064207e-18, (30, 5) = -0.4091036642172382e-20, (30, 6) = 0.7158480820724583e-19, (31, 1) = -0.1388910515749645e-21, (31, 2) = 0.22913784135212836e-20, (31, 3) = -0.278482166185867e-19, (31, 4) = 0.4745236920319542e-18, (31, 5) = 0.2075746362512424e-20, (31, 6) = -0.33488537789802427e-19, (32, 1) = 0.50469747504534414e-22, (32, 2) = -0.1108454996698971e-20, (32, 3) = 0.986492599417256e-20, (32, 4) = -0.2389323778029437e-18, (32, 5) = -0.7246762003614457e-21, (32, 6) = 0.15994497615048035e-19, (33, 1) = -0.37693939204073653e-22, (33, 2) = 0.5187178078998655e-21, (33, 3) = -0.8306367115763673e-20, (33, 4) = 0.11738247766189717e-18, (33, 5) = 0.5516957413702698e-21, (33, 6) = -0.7456696748499305e-20, (34, 1) = .0, (34, 2) = -0.22099177035474813e-21, (34, 3) = .0, (34, 4) = -0.51774535908116086e-19, (34, 5) = .0, (34, 6) = 0.30991212210537953e-20}, datatype = float[8], order = C_order); if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "right" then return X[34] elif outpoint = "order" then return 8 elif outpoint = "error" then return HFloat(1.7092143463295875e-8) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [6, 34, [F(eta), diff(F(eta), eta), psi(eta), diff(psi(eta), eta), theta(eta), diff(theta(eta), eta)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[34] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[34] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(6, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(34, 6, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(6, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(34, 6, X, Y, outpoint, yout, L, V) end if; [eta = outpoint, seq('[F(eta), diff(F(eta), eta), psi(eta), diff(psi(eta), eta), theta(eta), diff(theta(eta), eta)]'[i] = yout[i], i = 1 .. 6)] end proc; if not type(outpoint, 'numeric') then if outpoint = "start" or outpoint = "left" then return X[1] elif outpoint = "method" then return "bvp" elif outpoint = "right" then return X[34] elif outpoint = "order" then return 8 elif outpoint = "error" then return HFloat(1.7092143463295875e-8) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [6, 34, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[34] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[34] end if; if Digits <= trunc(evalhf(Digits)) and (_EnvInFsolve <> true or _EnvDSNumericSaveDigits <= trunc(evalhf(Digits))) then V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = .0, (1, 2) = .0, (2, 1) = .0, (2, 2) = .0, (3, 1) = .0, (3, 2) = .0, (4, 1) = .0, (4, 2) = .0, (5, 1) = .0, (5, 2) = .0, (6, 1) = .0, (6, 2) = .0, (7, 1) = .0, (7, 2) = .0}, datatype = float[8], order = C_order); yout := Vector(6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(34, 6, X, Y, YP, outpoint, var(yout), var(L), var(V))) else if _EnvInFsolve = true then Digits := _EnvDSNumericSaveDigits end if; V := array( 1 .. 6, [( 1 ) = (7), ( 2 ) = (0), ( 3 ) = (false), ( 4 ) = (false), ( 5 ) = (false), ( 6 ) = (false)  ] ); L := Matrix(7, 2, {(1, 1) = 0., (1, 2) = 0., (2, 1) = 0., (2, 2) = 0., (3, 1) = 0., (3, 2) = 0., (4, 1) = 0., (4, 2) = 0., (5, 1) = 0., (5, 2) = 0., (6, 1) = 0., (6, 2) = 0., (7, 1) = 0., (7, 2) = 0.}, order = C_order); yout := Vector(6, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0., (6) = 0.}); `dsolve/numeric/hermite`(34, 6, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 6)] end proc, (2) = Array(0..0, {}), (3) = [eta, F(eta), diff(F(eta), eta), psi(eta), diff(psi(eta), eta), theta(eta), diff(theta(eta), eta)], (4) = 0}); solnproc := data[1]; if not type(outpoint, 'numeric') then if outpoint = "solnprocedure" then return eval(solnproc) elif member(outpoint, ["start", "left", "right", "errorproc", "rawdata", "order", "error"]) then return solnproc(x_bvp) elif outpoint = "sysvars" then return data[3] elif procname <> unknown then return ('procname')(x_bvp) else _ndsol := pointto(data[2][0]); return ('_ndsol')(x_bvp) end if end if; try res := solnproc(outpoint); [eta = res[1], seq('[F(eta), diff(F(eta), eta), psi(eta), diff(psi(eta), eta), theta(eta), diff(theta(eta), eta)]'[i] = res[i+1], i = 1 .. 6)] catch: error  end try end proc

 

 

#
# Recast the first of these as a pure IV
# problem. This involves the "shooting"
# principle where, rather using values at
# "infinity", use derivatives at 0.
#
# Get the values for D(F)(0), D(theta)(0),
# D(psi)(0). Use these in the original BCs
# in place of the conditions at "infinity"
#
  dIV:= eval( [ diff(F(eta),eta),
                diff(theta(eta),eta),
                diff(psi(eta),eta)
              ],
              sol1(0)
             );
  bcs1a:= { F(0)=1, theta(0)=1, psi(0)=1,
            D(F)(0)=dIV[1], D(theta)(0)=dIV[2], D(psi)(0)=dIV[3]
          };
  sol1a:= dsolve( eval
                  ( `union`( odeSys, bcs1a),
                    pList[1..5]
                  ),
                  numeric
                );
  plots:-odeplot( sol1a,
                  [ [eta, F(eta)],
                    [eta, theta(eta)],
                    [eta,psi(eta)]
                  ],
                  eta=0..5,
                  color = [red, green, blue],
                  title = "Pure IV problem",
                  titlefont = [times, bold, 20]
                );

[HFloat(-2.2567583342258684), HFloat(-0.4574423080562461), HFloat(-1.104652152064021)]

 

{F(0) = 1, psi(0) = 1, theta(0) = 1, (D(F))(0) = HFloat(-2.2567583342258684), (D(psi))(0) = HFloat(-1.104652152064021), (D(theta))(0) = HFloat(-0.4574423080562461)}

 

proc (x_rkf45) local _res, _dat, _vars, _solnproc, _xout, _ndsol, _pars, _n, _i; option `Copyright (c) 2000 by Waterloo Maple Inc. All rights reserved.`; if 1 < nargs then error "invalid input: too many arguments" end if; _EnvDSNumericSaveDigits := Digits; Digits := 15; if _EnvInFsolve = true then _xout := evalf[_EnvDSNumericSaveDigits](x_rkf45) else _xout := evalf(x_rkf45) end if; _dat := Array(1..4, {(1) = proc (_xin) local _xout, _dtbl, _dat, _vmap, _x0, _y0, _val, _dig, _n, _ne, _nd, _nv, _pars, _ini, _par, _i, _j, _k, _src; option `Copyright (c) 2002 by Waterloo Maple Inc. All rights reserved.`; table( [( "complex" ) = false ] ) _xout := _xin; _pars := []; _dtbl := array( 1 .. 4, [( 1 ) = (array( 1 .. 26, [( 1 ) = (datatype = float[8], order = C_order, storage = rectangular), ( 2 ) = (datatype = float[8], order = C_order, storage = rectangular), ( 3 ) = ([0, 0, 0, Array(1..0, 1..2, {}, datatype = float[8], order = C_order)]), ( 4 ) = (Array(1..63, {(1) = 6, (2) = 6, (3) = 0, (4) = 0, (5) = 0, (6) = 0, (7) = 1, (8) = 0, (9) = 0, (10) = 0, (11) = 0, (12) = 0, (13) = 0, (14) = 0, (15) = 0, (16) = 0, (17) = 0, (18) = 1, (19) = 30000, (20) = 0, (21) = 0, (22) = 1, (23) = 4, (24) = 0, (25) = 1, (26) = 15, (27) = 1, (28) = 0, (29) = 1, (30) = 3, (31) = 3, (32) = 0, (33) = 1, (34) = 0, (35) = 0, (36) = 0, (37) = 0, (38) = 0, (39) = 0, (40) = 0, (41) = 0, (42) = 0, (43) = 1, (44) = 0, (45) = 0, (46) = 0, (47) = 0, (48) = 0, (49) = 0, (50) = 50, (51) = 1, (52) = 0, (53) = 0, (54) = 0, (55) = 0, (56) = 0, (57) = 0, (58) = 0, (59) = 10000, (60) = 0, (61) = 1000, (62) = 0, (63) = 0}, datatype = integer[8])), ( 5 ) = (Array(1..28, {(1) = .0, (2) = 0.10e-5, (3) = .0, (4) = 0.500001e-14, (5) = .0, (6) = 0.24603541049202943e-1, (7) = .0, (8) = 0.10e-5, (9) = .0, (10) = .0, (11) = .0, (12) = .0, (13) = 1.0, (14) = .0, (15) = .49999999999999, (16) = .0, (17) = 1.0, (18) = 1.0, (19) = .0, (20) = .0, (21) = 1.0, (22) = 1.0, (23) = .0, (24) = .0, (25) = 0.10e-14, (26) = .0, (27) = .0, (28) = .0}, datatype = float[8], order = C_order)), ( 6 ) = (Array(1..6, {(1) = 1.0, (2) = -2.2567583342258684, (3) = 1.0, (4) = -1.104652152064021, (5) = 1.0, (6) = -.4574423080562461}, datatype = float[8], order = C_order)), ( 7 ) = ([Array(1..4, 1..7, {(1, 1) = .0, (1, 2) = .203125, (1, 3) = .3046875, (1, 4) = .75, (1, 5) = .8125, (1, 6) = .40625, (1, 7) = .8125, (2, 1) = 0.6378173828125e-1, (2, 2) = .0, (2, 3) = .279296875, (2, 4) = .27237892150878906, (2, 5) = -0.9686851501464844e-1, (2, 6) = 0.1956939697265625e-1, (2, 7) = .5381584167480469, (3, 1) = 0.31890869140625e-1, (3, 2) = .0, (3, 3) = -.34375, (3, 4) = -.335235595703125, (3, 5) = .2296142578125, (3, 6) = .41748046875, (3, 7) = 11.480712890625, (4, 1) = 0.9710520505905151e-1, (4, 2) = .0, (4, 3) = .40350341796875, (4, 4) = 0.20297467708587646e-1, (4, 5) = -0.6054282188415527e-2, (4, 6) = -0.4770040512084961e-1, (4, 7) = .77858567237854}, datatype = float[8], order = C_order), Array(1..6, 1..6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = 1.0, (2, 1) = .25, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = 1.0, (3, 1) = .1875, (3, 2) = .5625, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = 2.0, (4, 1) = .23583984375, (4, 2) = -.87890625, (4, 3) = .890625, (4, 4) = .0, (4, 5) = .0, (4, 6) = .2681884765625, (5, 1) = .1272735595703125, (5, 2) = -.5009765625, (5, 3) = .44921875, (5, 4) = -0.128936767578125e-1, (5, 5) = .0, (5, 6) = 0.626220703125e-1, (6, 1) = -0.927734375e-1, (6, 2) = .626220703125, (6, 3) = -.4326171875, (6, 4) = .1418304443359375, (6, 5) = -0.861053466796875e-1, (6, 6) = .3131103515625}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .386, (3) = .21, (4) = .63, (5) = 1.0, (6) = 1.0}, datatype = float[8], order = C_order), Array(1..6, {(1) = .25, (2) = -.1043, (3) = .1035, (4) = -0.362e-1, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, 1..5, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (2, 1) = 1.544, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (3, 1) = .9466785280815533, (3, 2) = .25570116989825814, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (4, 1) = 3.3148251870684886, (4, 2) = 2.896124015972123, (4, 3) = .9986419139977808, (4, 4) = .0, (4, 5) = .0, (5, 1) = 1.2212245092262748, (5, 2) = 6.019134481287752, (5, 3) = 12.537083329320874, (5, 4) = -.687886036105895, (5, 5) = .0, (6, 1) = 1.2212245092262748, (6, 2) = 6.019134481287752, (6, 3) = 12.537083329320874, (6, 4) = -.687886036105895, (6, 5) = 1.0}, datatype = float[8], order = C_order), Array(1..6, 1..5, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (2, 1) = -5.6688, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (3, 1) = -2.4300933568337584, (3, 2) = -.20635991570891224, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (4, 1) = -.10735290581452621, (4, 2) = -9.594562251021896, (4, 3) = -20.470286148096154, (4, 4) = .0, (4, 5) = .0, (5, 1) = 7.496443313968615, (5, 2) = -10.246804314641219, (5, 3) = -33.99990352819906, (5, 4) = 11.708908932061595, (5, 5) = .0, (6, 1) = 8.083246795922411, (6, 2) = -7.981132988062785, (6, 3) = -31.52159432874373, (6, 4) = 16.319305431231363, (6, 5) = -6.0588182388340535}, datatype = float[8], order = C_order), Array(1..3, 1..5, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (2, 1) = 10.126235083446911, (2, 2) = -7.487995877607633, (2, 3) = -34.800918615557414, (2, 4) = -7.9927717075687275, (2, 5) = 1.0251377232956207, (3, 1) = -.6762803392806898, (3, 2) = 6.087714651678606, (3, 3) = 16.43084320892463, (3, 4) = 24.767225114183653, (3, 5) = -6.5943891257167815}, datatype = float[8], order = C_order)]), ( 9 ) = ([Array(1..6, {(1) = .1, (2) = .1, (3) = .1, (4) = .1, (5) = .1, (6) = .1}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, 1..6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (4, 5) = .0, (4, 6) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (5, 5) = .0, (5, 6) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (6, 5) = .0, (6, 6) = .0}, datatype = float[8], order = C_order), Array(1..6, 1..6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (4, 5) = .0, (4, 6) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (5, 5) = .0, (5, 6) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (6, 5) = .0, (6, 6) = .0}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, 1..6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (4, 5) = .0, (4, 6) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (5, 5) = .0, (5, 6) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (6, 5) = .0, (6, 6) = .0}, datatype = float[8], order = C_order), Array(1..6, 1..6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (4, 5) = .0, (4, 6) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (5, 5) = .0, (5, 6) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (6, 5) = .0, (6, 6) = .0}, datatype = float[8], order = C_order), Array(1..6, {(1) = 0, (2) = 0, (3) = 0, (4) = 0, (5) = 0, (6) = 0}, datatype = integer[8]), Array(1..6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..12, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0, (7) = .0, (8) = .0, (9) = .0, (10) = .0, (11) = .0, (12) = .0}, datatype = float[8], order = C_order)]), ( 8 ) = ([Array(1..6, {(1) = 1.0, (2) = -2.2567583342258684, (3) = 1.0, (4) = -1.104652152064021, (5) = 1.0, (6) = -.4574423080562461}, datatype = float[8], order = C_order), Array(1..6, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0, (6) = .0}, datatype = float[8], order = C_order), Array(1..6, {(1) = -2.2567583342258684, (2) = 4.0, (3) = -1.104652152064021, (4) = .7145680952392907, (5) = -.4574423080562461, (6) = -.7145680952392907}, datatype = float[8], order = C_order), 0, 0]), ( 11 ) = (Array(1..6, 0..6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = .0, (1, 4) = .0, (1, 5) = .0, (1, 6) = .0, (2, 0) = .0, (2, 1) = .0, (2, 2) = .0, (2, 3) = .0, (2, 4) = .0, (2, 5) = .0, (2, 6) = .0, (3, 0) = .0, (3, 1) = .0, (3, 2) = .0, (3, 3) = .0, (3, 4) = .0, (3, 5) = .0, (3, 6) = .0, (4, 0) = .0, (4, 1) = .0, (4, 2) = .0, (4, 3) = .0, (4, 4) = .0, (4, 5) = .0, (4, 6) = .0, (5, 0) = .0, (5, 1) = .0, (5, 2) = .0, (5, 3) = .0, (5, 4) = .0, (5, 5) = .0, (5, 6) = .0, (6, 0) = .0, (6, 1) = .0, (6, 2) = .0, (6, 3) = .0, (6, 4) = .0, (6, 5) = .0, (6, 6) = .0}, datatype = float[8], order = C_order)), ( 10 ) = ([proc (N, X, Y, YP) option `[Y[1] = F(eta), Y[2] = diff(F(eta),eta), Y[3] = psi(eta), Y[4] = diff(psi(eta),eta), Y[5] = theta(eta), Y[6] = diff(theta(eta),eta)]`; YP[2] := -2*X*Y[2]+4*Y[1]; YP[4] := -2*X*Y[4]+2*X*Y[6]+Y[6]*Y[4]+Y[6]^2; YP[6] := -2*X*Y[6]-Y[6]*Y[4]-Y[6]^2; YP[1] := Y[2]; YP[3] := Y[4]; YP[5] := Y[6]; 0 end proc, -1, 0, 0, 0, 0, 0, 0]), ( 13 ) = (), ( 12 ) = (), ( 15 ) = ("rkf45"), ( 14 ) = ([0, 0]), ( 18 ) = ([]), ( 19 ) = (0), ( 16 ) = ([0, 0, 0, []]), ( 17 ) = ([proc (N, X, Y, YP) option `[Y[1] = F(eta), Y[2] = diff(F(eta),eta), Y[3] = psi(eta), Y[4] = diff(psi(eta),eta), Y[5] = theta(eta), Y[6] = diff(theta(eta),eta)]`; YP[2] := -2*X*Y[2]+4*Y[1]; YP[4] := -2*X*Y[4]+2*X*Y[6]+Y[6]*Y[4]+Y[6]^2; YP[6] := -2*X*Y[6]-Y[6]*Y[4]-Y[6]^2; YP[1] := Y[2]; YP[3] := Y[4]; YP[5] := Y[6]; 0 end proc, -1, 0, 0, 0, 0, 0, 0]), ( 22 ) = (0), ( 23 ) = (0), ( 20 ) = ([]), ( 21 ) = (0), ( 26 ) = (Array(1..0, {})), ( 25 ) = (Array(1..0, {})), ( 24 ) = (0)  ] ))  ] ); _y0 := Array(0..6, {(1) = 0., (2) = 1., (3) = HFloat(-2.2567583342258684), (4) = 1., (5) = HFloat(-1.104652152064021), (6) = 1.}); _vmap := array( 1 .. 6, [( 1 ) = (1), ( 2 ) = (2), ( 3 ) = (3), ( 4 ) = (4), ( 5 ) = (5), ( 6 ) = (6)  ] ); _x0 := _dtbl[1][5][5]; _n := _dtbl[1][4][1]; _ne := _dtbl[1][4][3]; _nd := _dtbl[1][4][4]; _nv := _dtbl[1][4][16]; if not type(_xout, 'numeric') then if member(_xout, ["start", "left", "right"]) then if _Env_smart_dsolve_numeric = true or _dtbl[1][4][10] = 1 then if _xout = "left" then if type(_dtbl[2], 'table') then return _dtbl[2][5][1] end if elif _xout = "right" then if type(_dtbl[3], 'table') then return _dtbl[3][5][1] end if end if end if; return _dtbl[1][5][5] elif _xout = "method" then return _dtbl[1][15] elif _xout = "storage" then return evalb(_dtbl[1][4][10] = 1) elif _xout = "leftdata" then if not type(_dtbl[2], 'array') then return NULL else return eval(_dtbl[2]) end if elif _xout = "rightdata" then if not type(_dtbl[3], 'array') then return NULL else return eval(_dtbl[3]) end if elif _xout = "enginedata" then return eval(_dtbl[1]) elif _xout = "enginereset" then _dtbl[2] := evaln(_dtbl[2]); _dtbl[3] := evaln(_dtbl[3]); return NULL elif _xout = "initial" then return procname(_y0[0]) elif _xout = "laxtol" then return _dtbl[`if`(member(_dtbl[4], {2, 3}), _dtbl[4], 1)][5][18] elif _xout = "numfun" then return `if`(member(_dtbl[4], {2, 3}), _dtbl[_dtbl[4]][4][18], 0) elif _xout = "parameters" then return [seq(_y0[_n+_i], _i = 1 .. nops(_pars))] elif _xout = "initial_and_parameters" then return procname(_y0[0]), [seq(_y0[_n+_i], _i = 1 .. nops(_pars))] elif _xout = "last" then if _dtbl[4] <> 2 and _dtbl[4] <> 3 or _x0-_dtbl[_dtbl[4]][5][1] = 0. then error "no information is available on last computed point" else _xout := _dtbl[_dtbl[4]][5][1] end if elif _xout = "function" then if _dtbl[1][4][33]-2. = 0 then return eval(_dtbl[1][10], 1) else return eval(_dtbl[1][10][1], 1) end if elif _xout = "map" then return copy(_vmap) elif type(_xin, `=`) and type(rhs(_xin), 'list') and member(lhs(_xin), {"initial", "parameters", "initial_and_parameters"}) then _ini, _par := [], []; if lhs(_xin) = "initial" then _ini := rhs(_xin) elif lhs(_xin) = "parameters" then _par := rhs(_xin) elif select(type, rhs(_xin), `=`) <> [] then _par, _ini := selectremove(type, rhs(_xin), `=`) elif nops(rhs(_xin)) < nops(_pars)+1 then error "insufficient data for specification of initial and parameters" else _par := rhs(_xin)[-nops(_pars) .. -1]; _ini := rhs(_xin)[1 .. -nops(_pars)-1] end if; _xout := lhs(_xout); if _par <> [] then `dsolve/numeric/process_parameters`(_n, _pars, _par, _y0) end if; if _ini <> [] then `dsolve/numeric/process_initial`(_n-_ne, _ini, _y0, _pars, _vmap) end if; `dsolve/numeric/SC/reinitialize`(_dtbl, _y0, _n, procname, _pars); if _Env_smart_dsolve_numeric = true and type(_y0[0], 'numeric') and _dtbl[1][4][10] <> 1 then procname("right") := _y0[0]; procname("left") := _y0[0] end if; if _xout = "initial" then return [_y0[0], seq(_y0[_vmap[_i]], _i = 1 .. _n-_ne)] elif _xout = "parameters" then return [seq(_y0[_n+_i], _i = 1 .. nops(_pars))] else return [_y0[0], seq(_y0[_vmap[_i]], _i = 1 .. _n-_ne)], [seq(_y0[_n+_i], _i = 1 .. nops(_pars))] end if elif _xin = "eventstop" then if _nv = 0 then error "this solution has no events" end if; _i := _dtbl[4]; if _i <> 2 and _i <> 3 then return 0 end if; if _dtbl[_i][4][10] = 1 and assigned(_dtbl[5-_i]) and _dtbl[_i][4][9] < 100 and 100 <= _dtbl[5-_i][4][9] then _i := 5-_i; _dtbl[4] := _i; _j := round(_dtbl[_i][4][17]); return round(_dtbl[_i][3][1][_j, 1]) elif 100 <= _dtbl[_i][4][9] then _j := round(_dtbl[_i][4][17]); return round(_dtbl[_i][3][1][_j, 1]) else return 0 end if elif _xin = "eventstatus" then if _nv = 0 then error "this solution has no events" end if; _i := [selectremove(proc (a) options operator, arrow; _dtbl[1][3][1][a, 7] = 1 end proc, {seq(_j, _j = 1 .. round(_dtbl[1][3][1][_nv+1, 1]))})]; return ':-enabled' = _i[1], ':-disabled' = _i[2] elif _xin = "eventclear" then if _nv = 0 then error "this solution has no events" end if; _i := _dtbl[4]; if _i <> 2 and _i <> 3 then error "no events to clear" end if; if _dtbl[_i][4][10] = 1 and assigned(_dtbl[5-_i]) and _dtbl[_i][4][9] < 100 and 100 < _dtbl[5-_i][4][9] then _dtbl[4] := 5-_i; _i := 5-_i end if; if _dtbl[_i][4][9] < 100 then error "no events to clear" elif _nv < _dtbl[_i][4][9]-100 then error "event error condition cannot be cleared" else _j := _dtbl[_i][4][9]-100; if irem(round(_dtbl[_i][3][1][_j, 4]), 2) = 1 then error "retriggerable events cannot be cleared" end if; _j := round(_dtbl[_i][3][1][_j, 1]); for _k to _nv do if _dtbl[_i][3][1][_k, 1] = _j then if _dtbl[_i][3][1][_k, 2] = 3 then error "range events cannot be cleared" end if; _dtbl[_i][3][1][_k, 8] := _dtbl[_i][3][1][_nv+1, 8] end if end do; _dtbl[_i][4][17] := 0; _dtbl[_i][4][9] := 0; if _dtbl[1][4][10] = 1 then if _i = 2 then try procname(procname("left")) catch:  end try else try procname(procname("right")) catch:  end try end if end if end if; return  elif type(_xin, `=`) and member(lhs(_xin), {"eventdisable", "eventenable"}) then if _nv = 0 then error "this solution has no events" end if; if type(rhs(_xin), {('list')('posint'), ('set')('posint')}) then _i := {op(rhs(_xin))} elif type(rhs(_xin), 'posint') then _i := {rhs(_xin)} else error "event identifiers must be integers in the range 1..%1", round(_dtbl[1][3][1][_nv+1, 1]) end if; if select(proc (a) options operator, arrow; _nv < a end proc, _i) <> {} then error "event identifiers must be integers in the range 1..%1", round(_dtbl[1][3][1][_nv+1, 1]) end if; _k := {}; for _j to _nv do if member(round(_dtbl[1][3][1][_j, 1]), _i) then _k := `union`(_k, {_j}) end if end do; _i := _k; if lhs(_xin) = "eventdisable" then _dtbl[4] := 0; _j := [evalb(assigned(_dtbl[2]) and member(_dtbl[2][4][17], _i)), evalb(assigned(_dtbl[3]) and member(_dtbl[3][4][17], _i))]; for _k in _i do _dtbl[1][3][1][_k, 7] := 0; if assigned(_dtbl[2]) then _dtbl[2][3][1][_k, 7] := 0 end if; if assigned(_dtbl[3]) then _dtbl[3][3][1][_k, 7] := 0 end if end do; if _j[1] then for _k to _nv+1 do if _k <= _nv and not type(_dtbl[2][3][4][_k, 1], 'undefined') then userinfo(3, {'events', 'eventreset'}, `reinit #2, event code `, _k, ` to defined init `, _dtbl[2][3][4][_k, 1]); _dtbl[2][3][1][_k, 8] := _dtbl[2][3][4][_k, 1] elif _dtbl[2][3][1][_k, 2] = 0 and irem(iquo(round(_dtbl[2][3][1][_k, 4]), 32), 2) = 1 then userinfo(3, {'events', 'eventreset'}, `reinit #2, event code `, _k, ` to rate hysteresis init `, _dtbl[2][5][24]); _dtbl[2][3][1][_k, 8] := _dtbl[2][5][24] elif _dtbl[2][3][1][_k, 2] = 0 and irem(iquo(round(_dtbl[2][3][1][_k, 4]), 2), 2) = 0 then userinfo(3, {'events', 'eventreset'}, `reinit #2, event code `, _k, ` to initial init `, _x0); _dtbl[2][3][1][_k, 8] := _x0 else userinfo(3, {'events', 'eventreset'}, `reinit #2, event code `, _k, ` to fireinitial init `, _x0-1); _dtbl[2][3][1][_k, 8] := _x0-1 end if end do; _dtbl[2][4][17] := 0; _dtbl[2][4][9] := 0; if _dtbl[1][4][10] = 1 then procname(procname("left")) end if end if; if _j[2] then for _k to _nv+1 do if _k <= _nv and not type(_dtbl[3][3][4][_k, 2], 'undefined') then userinfo(3, {'events', 'eventreset'}, `reinit #3, event code `, _k, ` to defined init `, _dtbl[3][3][4][_k, 2]); _dtbl[3][3][1][_k, 8] := _dtbl[3][3][4][_k, 2] elif _dtbl[3][3][1][_k, 2] = 0 and irem(iquo(round(_dtbl[3][3][1][_k, 4]), 32), 2) = 1 then userinfo(3, {'events', 'eventreset'}, `reinit #3, event code `, _k, ` to rate hysteresis init `, _dtbl[3][5][24]); _dtbl[3][3][1][_k, 8] := _dtbl[3][5][24] elif _dtbl[3][3][1][_k, 2] = 0 and irem(iquo(round(_dtbl[3][3][1][_k, 4]), 2), 2) = 0 then userinfo(3, {'events', 'eventreset'}, `reinit #3, event code `, _k, ` to initial init `, _x0); _dtbl[3][3][1][_k, 8] := _x0 else userinfo(3, {'events', 'eventreset'}, `reinit #3, event code `, _k, ` to fireinitial init `, _x0+1); _dtbl[3][3][1][_k, 8] := _x0+1 end if end do; _dtbl[3][4][17] := 0; _dtbl[3][4][9] := 0; if _dtbl[1][4][10] = 1 then procname(procname("right")) end if end if else for _k in _i do _dtbl[1][3][1][_k, 7] := 1 end do; _dtbl[2] := evaln(_dtbl[2]); _dtbl[3] := evaln(_dtbl[3]); _dtbl[4] := 0; if _dtbl[1][4][10] = 1 then if _x0 <= procname("right") then try procname(procname("right")) catch:  end try end if; if procname("left") <= _x0 then try procname(procname("left")) catch:  end try end if end if end if; return  elif type(_xin, `=`) and lhs(_xin) = "eventfired" then if not type(rhs(_xin), 'list') then error "'eventfired' must be specified as a list" end if; if _nv = 0 then error "this solution has no events" end if; if _dtbl[4] <> 2 and _dtbl[4] <> 3 then error "'direction' must be set prior to calling/setting 'eventfired'" end if; _i := _dtbl[4]; _val := NULL; if not assigned(_EnvEventRetriggerWarned) then _EnvEventRetriggerWarned := false end if; for _k in rhs(_xin) do if type(_k, 'integer') then _src := _k elif type(_k, 'integer' = 'anything') and type(evalf(rhs(_k)), 'numeric') then _k := lhs(_k) = evalf[max(Digits, 18)](rhs(_k)); _src := lhs(_k) else error "'eventfired' entry is not valid: %1", _k end if; if _src < 1 or round(_dtbl[1][3][1][_nv+1, 1]) < _src then error "event identifiers must be integers in the range 1..%1", round(_dtbl[1][3][1][_nv+1, 1]) end if; _src := {seq(`if`(_dtbl[1][3][1][_j, 1]-_src = 0., _j, NULL), _j = 1 .. _nv)}; if nops(_src) <> 1 then error "'eventfired' can only be set/queried for root-finding events and time/interval events" end if; _src := _src[1]; if _dtbl[1][3][1][_src, 2] <> 0. and _dtbl[1][3][1][_src, 2]-2. <> 0. then error "'eventfired' can only be set/queried for root-finding events and time/interval events" elif irem(round(_dtbl[1][3][1][_src, 4]), 2) = 1 then if _EnvEventRetriggerWarned = false then WARNING(`'eventfired' has no effect on events that retrigger`) end if; _EnvEventRetriggerWarned := true end if; if _dtbl[_i][3][1][_src, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_src, 4]), 32), 2) = 1 then _val := _val, undefined elif type(_dtbl[_i][3][4][_src, _i-1], 'undefined') or _i = 2 and _dtbl[2][3][1][_src, 8] < _dtbl[2][3][4][_src, 1] or _i = 3 and _dtbl[3][3][4][_src, 2] < _dtbl[3][3][1][_src, 8] then _val := _val, _dtbl[_i][3][1][_src, 8] else _val := _val, _dtbl[_i][3][4][_src, _i-1] end if; if type(_k, `=`) then if _dtbl[_i][3][1][_src, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_src, 4]), 32), 2) = 1 then error "cannot set event code for a rate hysteresis event" end if; userinfo(3, {'events', 'eventreset'}, `manual set event code `, _src, ` to value `, rhs(_k)); _dtbl[_i][3][1][_src, 8] := rhs(_k); _dtbl[_i][3][4][_src, _i-1] := rhs(_k) end if end do; return [_val] elif type(_xin, `=`) and lhs(_xin) = "direction" then if not member(rhs(_xin), {-1, 1, ':-left', ':-right'}) then error "'direction' must be specified as either '1' or 'right' (positive) or '-1' or 'left' (negative)" end if; _src := `if`(_dtbl[4] = 2, -1, `if`(_dtbl[4] = 3, 1, undefined)); _i := `if`(member(rhs(_xin), {1, ':-right'}), 3, 2); _dtbl[4] := _i; _dtbl[_i] := `dsolve/numeric/SC/IVPdcopy`(_dtbl[1], `if`(assigned(_dtbl[_i]), _dtbl[_i], NULL)); if 0 < _nv then for _j to _nv+1 do if _j <= _nv and not type(_dtbl[_i][3][4][_j, _i-1], 'undefined') then userinfo(3, {'events', 'eventreset'}, `reinit #4, event code `, _j, ` to defined init `, _dtbl[_i][3][4][_j, _i-1]); _dtbl[_i][3][1][_j, 8] := _dtbl[_i][3][4][_j, _i-1] elif _dtbl[_i][3][1][_j, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_j, 4]), 32), 2) = 1 then userinfo(3, {'events', 'eventreset'}, `reinit #4, event code `, _j, ` to rate hysteresis init `, _dtbl[_i][5][24]); _dtbl[_i][3][1][_j, 8] := _dtbl[_i][5][24] elif _dtbl[_i][3][1][_j, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_j, 4]), 2), 2) = 0 then userinfo(3, {'events', 'eventreset'}, `reinit #4, event code `, _j, ` to initial init `, _x0); _dtbl[_i][3][1][_j, 8] := _x0 else userinfo(3, {'events', 'eventreset'}, `reinit #4, event code `, _j, ` to fireinitial init `, _x0-2*_i+5.0); _dtbl[_i][3][1][_j, 8] := _x0-2*_i+5.0 end if end do end if; return _src elif _xin = "eventcount" then if _dtbl[1][3][1] = 0 or _dtbl[4] <> 2 and _dtbl[4] <> 3 then return 0 else return round(_dtbl[_dtbl[4]][3][1][_nv+1, 12]) end if else return "procname" end if end if; if _xout = _x0 then return [_x0, seq(evalf(_dtbl[1][6][_vmap[_i]]), _i = 1 .. _n-_ne)] end if; _i := `if`(_x0 <= _xout, 3, 2); if _xin = "last" and 0 < _dtbl[_i][4][9] and _dtbl[_i][4][9] < 100 then _dat := eval(_dtbl[_i], 2); _j := _dat[4][20]; return [_dat[11][_j, 0], seq(_dat[11][_j, _vmap[_i]], _i = 1 .. _n-_ne-_nd), seq(_dat[8][1][_vmap[_i]], _i = _n-_ne-_nd+1 .. _n-_ne)] end if; if not type(_dtbl[_i], 'array') then _dtbl[_i] := `dsolve/numeric/SC/IVPdcopy`(_dtbl[1], `if`(assigned(_dtbl[_i]), _dtbl[_i], NULL)); if 0 < _nv then for _j to _nv+1 do if _j <= _nv and not type(_dtbl[_i][3][4][_j, _i-1], 'undefined') then userinfo(3, {'events', 'eventreset'}, `reinit #5, event code `, _j, ` to defined init `, _dtbl[_i][3][4][_j, _i-1]); _dtbl[_i][3][1][_j, 8] := _dtbl[_i][3][4][_j, _i-1] elif _dtbl[_i][3][1][_j, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_j, 4]), 32), 2) = 1 then userinfo(3, {'events', 'eventreset'}, `reinit #5, event code `, _j, ` to rate hysteresis init `, _dtbl[_i][5][24]); _dtbl[_i][3][1][_j, 8] := _dtbl[_i][5][24] elif _dtbl[_i][3][1][_j, 2] = 0 and irem(iquo(round(_dtbl[_i][3][1][_j, 4]), 2), 2) = 0 then userinfo(3, {'events', 'eventreset'}, `reinit #5, event code `, _j, ` to initial init `, _x0); _dtbl[_i][3][1][_j, 8] := _x0 else userinfo(3, {'events', 'eventreset'}, `reinit #5, event code `, _j, ` to fireinitial init `, _x0-2*_i+5.0); _dtbl[_i][3][1][_j, 8] := _x0-2*_i+5.0 end if end do end if end if; if _xin <> "last" then if 0 < 0 then if `dsolve/numeric/checkglobals`(op(_dtbl[1][14]), _pars, _n, _y0) then `dsolve/numeric/SC/reinitialize`(_dtbl, _y0, _n, procname, _pars, _i) end if end if; if _dtbl[1][4][7] = 0 then error "parameters must be initialized before solution can be computed" end if end if; _dat := eval(_dtbl[_i], 2); _dtbl[4] := _i; try _src := `dsolve/numeric/SC/IVPrun`(_dat, _xout) catch: userinfo(2, `dsolve/debug`, print(`Exception in solnproc:`, [lastexception][2 .. -1])); error  end try; if _dat[17] <> _dtbl[1][17] then _dtbl[1][17] := _dat[17]; _dtbl[1][10] := _dat[10] end if; if _src = 0 and 100 < _dat[4][9] then _val := _dat[3][1][_nv+1, 8] else _val := _dat[11][_dat[4][20], 0] end if; if _src <> 0 or _dat[4][9] <= 0 then _dtbl[1][5][1] := _xout else _dtbl[1][5][1] := _val end if; if _i = 3 and _val < _xout then Rounding := -infinity; if _dat[4][9] = 1 then error "cannot evaluate the solution further right of %1, probably a singularity", evalf[8](_val) elif _dat[4][9] = 2 then error "cannot evaluate the solution further right of %1, maxfun limit exceeded (see ?dsolve,maxfun for details)", evalf[8](_val) elif _dat[4][9] = 3 then if _dat[4][25] = 3 then error "cannot evaluate the solution past the initial point, problem may be initially singular or improperly set up" else error "cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up" end if elif _dat[4][9] = 4 then error "cannot evaluate the solution further right of %1, accuracy goal cannot be achieved with specified 'minstep'", evalf[8](_val) elif _dat[4][9] = 5 then error "cannot evaluate the solution further right of %1, too many step failures, tolerances may be too loose for problem", evalf[8](_val) elif _dat[4][9] = 6 then error "cannot evaluate the solution further right of %1, cannot downgrade delay storage for problems with delay derivative order > 1, try increasing delaypts", evalf[8](_val) elif _dat[4][9] = 10 then error "cannot evaluate the solution further right of %1, interrupt requested", evalf[8](_val) elif 100 < _dat[4][9] then if _dat[4][9]-100 = _nv+1 then error "constraint projection failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nv+2 then error "index-1 and derivative evaluation failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nv+3 then error "maximum number of event iterations reached (%1) at t=%2", round(_dat[3][1][_nv+1, 3]), evalf[8](_val) else if _Env_dsolve_nowarnstop <> true then `dsolve/numeric/warning`(StringTools:-FormatMessage("cannot evaluate the solution further right of %1, event #%2 triggered a halt", evalf[8](_val), round(_dat[3][1][_dat[4][9]-100, 1]))) end if; Rounding := 'nearest'; _xout := _val end if else error "cannot evaluate the solution further right of %1", evalf[8](_val) end if elif _i = 2 and _xout < _val then Rounding := infinity; if _dat[4][9] = 1 then error "cannot evaluate the solution further left of %1, probably a singularity", evalf[8](_val) elif _dat[4][9] = 2 then error "cannot evaluate the solution further left of %1, maxfun limit exceeded (see ?dsolve,maxfun for details)", evalf[8](_val) elif _dat[4][9] = 3 then if _dat[4][25] = 3 then error "cannot evaluate the solution past the initial point, problem may be initially singular or improperly set up" else error "cannot evaluate the solution past the initial point, problem may be complex, initially singular or improperly set up" end if elif _dat[4][9] = 4 then error "cannot evaluate the solution further left of %1, accuracy goal cannot be achieved with specified 'minstep'", evalf[8](_val) elif _dat[4][9] = 5 then error "cannot evaluate the solution further left of %1, too many step failures, tolerances may be too loose for problem", evalf[8](_val) elif _dat[4][9] = 6 then error "cannot evaluate the solution further left of %1, cannot downgrade delay storage for problems with delay derivative order > 1, try increasing delaypts", evalf[8](_val) elif _dat[4][9] = 10 then error "cannot evaluate the solution further right of %1, interrupt requested", evalf[8](_val) elif 100 < _dat[4][9] then if _dat[4][9]-100 = _nv+1 then error "constraint projection failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nv+2 then error "index-1 and derivative evaluation failure on event at t=%1", evalf[8](_val) elif _dat[4][9]-100 = _nv+3 then error "maximum number of event iterations reached (%1) at t=%2", round(_dat[3][1][_nv+1, 3]), evalf[8](_val) else if _Env_dsolve_nowarnstop <> true then `dsolve/numeric/warning`(StringTools:-FormatMessage("cannot evaluate the solution further left of %1, event #%2 triggered a halt", evalf[8](_val), round(_dat[3][1][_dat[4][9]-100, 1]))) end if; Rounding := 'nearest'; _xout := _val end if else error "cannot evaluate the solution further left of %1", evalf[8](_val) end if end if; if _EnvInFsolve = true then _dig := _dat[4][26]; if type(_EnvDSNumericSaveDigits, 'posint') then _dat[4][26] := _EnvDSNumericSaveDigits else _dat[4][26] := Digits end if; _Env_dsolve_SC_native := true; if _dat[4][25] = 1 then _i := 1; _dat[4][25] := 2 else _i := _dat[4][25] end if; _val := `dsolve/numeric/SC/IVPval`(_dat, _xout, _src); _dat[4][25] := _i; _dat[4][26] := _dig; [_xout, seq(_val[_vmap[_i]], _i = 1 .. _n-_ne)] else Digits := _dat[4][26]; _val := `dsolve/numeric/SC/IVPval`(eval(_dat, 2), _xout, _src); [_xout, seq(_val[_vmap[_i]], _i = 1 .. _n-_ne)] end if end proc, (2) = Array(0..0, {}), (3) = [eta, F(eta), diff(F(eta), eta), psi(eta), diff(psi(eta), eta), theta(eta), diff(theta(eta), eta)], (4) = []}); _vars := _dat[3]; _pars := map(rhs, _dat[4]); _n := nops(_vars)-1; _solnproc := _dat[1]; if not type(_xout, 'numeric') then if member(x_rkf45, ["start", 'start', "method", 'method', "left", 'left', "right", 'right', "leftdata", "rightdata", "enginedata", "eventstop", 'eventstop', "eventclear", 'eventclear', "eventstatus", 'eventstatus', "eventcount", 'eventcount', "laxtol", 'laxtol', "numfun", 'numfun', NULL]) then _res := _solnproc(convert(x_rkf45, 'string')); if 1 < nops([_res]) then return _res elif type(_res, 'array') then return eval(_res, 1) elif _res <> "procname" then return _res end if elif member(x_rkf45, ["last", 'last', "initial", 'initial', "parameters", 'parameters', "initial_and_parameters", 'initial_and_parameters', NULL]) then _xout := convert(x_rkf45, 'string'); _res := _solnproc(_xout); if _xout = "parameters" then return [seq(_pars[_i] = _res[_i], _i = 1 .. nops(_pars))] elif _xout = "initial_and_parameters" then return [seq(_vars[_i+1] = [_res][1][_i+1], _i = 0 .. _n), seq(_pars[_i] = [_res][2][_i], _i = 1 .. nops(_pars))] else return [seq(_vars[_i+1] = _res[_i+1], _i = 0 .. _n)] end if elif type(_xout, `=`) and member(lhs(_xout), ["initial", 'initial', "parameters", 'parameters', "initial_and_parameters", 'initial_and_parameters', NULL]) then _xout := convert(lhs(x_rkf45), 'string') = rhs(x_rkf45); if type(rhs(_xout), 'list') then _res := _solnproc(_xout) else error "initial and/or parameter values must be specified in a list" end if; if lhs(_xout) = "initial" then return [seq(_vars[_i+1] = _res[_i+1], _i = 0 .. _n)] elif lhs(_xout) = "parameters" then return [seq(_pars[_i] = _res[_i], _i = 1 .. nops(_pars))] else return [seq(_vars[_i+1] = [_res][1][_i+1], _i = 0 .. _n), seq(_pars[_i] = [_res][2][_i], _i = 1 .. nops(_pars))] end if elif type(_xout, `=`) and member(lhs(_xout), ["eventdisable", 'eventdisable', "eventenable", 'eventenable', "eventfired", 'eventfired', "direction", 'direction', NULL]) then return _solnproc(convert(lhs(x_rkf45), 'string') = rhs(x_rkf45)) elif _xout = "solnprocedure" then return eval(_solnproc) elif _xout = "sysvars" then return _vars end if; if procname <> unknown then return ('procname')(x_rkf45) else _ndsol := 1; _ndsol := _ndsol; _ndsol := pointto(_dat[2][0]); return ('_ndsol')(x_rkf45) end if end if; try _res := _solnproc(_xout); [seq(_vars[_i+1] = _res[_i+1], _i = 0 .. _n)] catch: error  end try end proc

 

 

 

NULL


 

Download bvivShoot.mw

you are "guessing" more or less the cmplee form of the solution, I don't think you actually need to use either dsolve() or pdsolve() commands - it is more a case of using solve() to work out the various constants.

Assuming I haven't screwed up somewhere, the attached shows the method (and may even get the correct answer!) but I'd read it very carefully. My classical mechanics is very rusty

NULL

  restart;
#
# Define PDE
#
  pde:= E*M*diff(w(x,t),x$4)+A*rho*diff(w(x,t),t$2)=0;

E*M*(diff(diff(diff(diff(w(x, t), x), x), x), x))+A*rho*(diff(diff(w(x, t), t), t)) = 0

(1)

#
# Assume a solution of the given form and substitute
# in the original pde to derive an ODE in 'x' only
#
  test1:=w(x,t)=W(x)*cos(omega*t+phi);
  pde1:=expand(eval(pde, test1)/(cos(omega*t)*E*M));
#
# Tidy up all the constants
#
  ode:=algsubs(A*rho*omega^2/(E*M)=alpha^4, pde1);
  sol:=simplify( convert(dsolve(ode), trig));
  sol:=subs( [ op([2,1,1],sol)=D1,
               op([2,2,1],sol)=D2,
               op([2,3,1],sol)=D3,
               op([2,4,1],sol)=D4
             ],
             sol
           );
#
# Try the first couple of boundary conditions
#
  b1:= simplify(rhs(eval( diff(sol, x), x=0))=0);
  b2:= simplify(rhs(eval( diff(sol, x$3), x=0))=0);
#
# Solve these BCs for S=D1, D3, and substitute the
# result back into the ODE solution
#
  bc1:=solve([b1, b2], [D1, D3])[];
  sol:=eval(sol, bc1);
 

w(x, t) = W(x)*cos(omega*t+phi)

 

(diff(diff(diff(diff(W(x), x), x), x), x))*cos(phi)-(diff(diff(diff(diff(W(x), x), x), x), x))*sin(omega*t)*sin(phi)/cos(omega*t)-A*rho*W(x)*omega^2*cos(phi)/(E*M)+A*rho*W(x)*omega^2*sin(omega*t)*sin(phi)/(cos(omega*t)*E*M) = 0

 

(-W(x)*cos(phi)*alpha^4*cos(omega*t)+W(x)*sin(omega*t)*sin(phi)*alpha^4+(diff(diff(diff(diff(W(x), x), x), x), x))*cos(phi)*cos(omega*t)-(diff(diff(diff(diff(W(x), x), x), x), x))*sin(omega*t)*sin(phi))/cos(omega*t) = 0

 

W(x) = _C3*sin(alpha*x)+_C4*cos(alpha*x)+(-_C1+_C2)*sinh(alpha*x)+(_C1+_C2)*cosh(alpha*x)

 

W(x) = D1*sin(alpha*x)+D2*cos(alpha*x)+D3*sinh(alpha*x)+D4*cosh(alpha*x)

 

alpha*(D1+D3) = 0

 

-alpha^3*(D1-D3) = 0

 

[D1 = 0, D3 = 0]

 

W(x) = D2*cos(alpha*x)+D4*cosh(alpha*x)

(2)

#
# Now try the second pair of boundary conditions
#
   b3:= simplify(rhs(eval( diff(sol, x), x=L))/alpha=0);
   b4:= simplify(rhs(eval( diff(sol, x$3), x=L))/alpha^3=0);
#
# Consider
#
  b4-b3;
#
# This can only be true if either
#
#      D2=0, or
#      alpha*L=n*Pi (n an integer)
#
# Now consider
#
  b4+b3;
#
# This can only be true if either
#
#      D4=0, or
#      alpha*L=0
#
# I think(?) the only combination of the above two
# conditions which leads to non-trivial solutions
# is to have D4=0, and alpha*L=n*Pi. The latter
# condition however means restricting one of the
# variables in the definition of alpha - maybe
# omega??? Consider this later - for now, just make
# the substitutions D4=0, and alpha=n*Pi/L
#
  sol:=eval(sol, [D4=0, alpha=n*Pi/L]);
 

-D2*sin(alpha*L)+D4*sinh(alpha*L) = 0

 

D2*sin(alpha*L)+D4*sinh(alpha*L) = 0

 

2*D2*sin(alpha*L) = 0

 

2*D4*sinh(alpha*L) = 0

 

W(x) = D2*cos(n*Pi*x/L)

(3)

#
# Rebuild the complete solution
#
  ans:=eval(test1, sol);

w(x, t) = D2*cos(n*Pi*x/L)*cos(omega*t+phi)

(4)

#
# Notice that earlier, alpha=n*Pi/L was
# required, which in turn means that there
# is a restriction on omega, which can be
# determined as
#
  omega__n:= rhs~
             ( [ ( allvalues
                   ( isolate
                     ( A*rho*omega^2/(E*M)=(n*Pi/L)^4,
                       omega
                     )
                   )
                 )
               ]
             );
#
# Assuming negative frequencies are not allowed
# substitute the first of the omega__n values
# in the general solution
#
  ans:=eval(ans, omega=omega__n[1]);

[(n^4*Pi^4*E*M/(L^4*A*rho))^(1/2), -(n^4*Pi^4*E*M/(L^4*A*rho))^(1/2)]

 

w(x, t) = D2*cos(n*Pi*x/L)*cos((n^4*Pi^4*E*M/(L^4*A*rho))^(1/2)*t+phi)

(5)

 

NULL


 

Download beam.mw

 

 to fix the problem so that the code executes - but don't do it!!!

Consider the number of times that your 11 nested for loops will execute. The back of my cigarette packet  says that this will be

11*101*5*5*1*11*59*1*1*1*1 = 18,025,975

That's 18 million (and change)

So your print statement is going to execute 18  million times. Each time it executes, it will produce 2 lines of output (because it is long and the output will "wrap") - so 36 million lines of output. If I "full-screen" Maple nn my reasonably large, high resolution monitor with small fonts I can get about 40 lines per screenful

Therefore you want to produce ~900,000 screenfuls of output.

Assuming that you can read/digest a screenful in 30secs (because you are not storing this data for further processing, so simple reading is your only option) then simply reading it will take 312 days (assuming you read for 24 hours/day)

Simply not going to happen - think again!!

 

plot( [ -arccosh(1/cos(x)),
            arccosh(1/cos(x))
         ],
         x=-Pi/2..Pi/2,
         color=[red, red],
         tickmarks=[decimalticks, decimalticks]
      );

 

as in the attached

  restart:
  ans := w(x) = _C1*exp(-I*(-K*E^3*i^3)^(1/4)*x/(E*i))+
                _C2*exp(-(-K*E^3*i^3)^(1/4)*x/(E*i))+
                _C3*exp(I*(-K*E^3*i^3)^(1/4)*x/(E*i))+
                _C4*exp((-K*E^3*i^3)^(1/4)*x/(E*i)):
  map2(op, 2, [op(rhs(ans))]);

[exp(-I*(-K*E^3*i^3)^(1/4)*x/(E*i)), exp(-(-K*E^3*i^3)^(1/4)*x/(E*i)), exp(I*(-K*E^3*i^3)^(1/4)*x/(E*i)), exp((-K*E^3*i^3)^(1/4)*x/(E*i))]

(1)

 

Download doMap.mw

 

L1:=[CPC_h, CPC_m, CPC_l]:
L2:=[SIZE_h, SIZE_m,SIZE_L]:
L3:=[SH_h, SH_m, SH_l]:
[seq(seq( [i,j], i in L1), j in L2)];
[seq(seq(seq( [i,j, k], i in L1), j in L2), k in L3)];

 

Post code - use the big green up-arrow in the Mapleprimes toolbar.

Diagnosing a code problem from a non-editable/non-executable "picture" is pretty difficult - so I'm going to make a suggestion (which I obviously can't check from your picture).

In the solve() statement there appears to be a space (or non-printing character?) between the 'name' and the 'subscript' for MBC ie it appears to be M BC rather than MBC. Obviously I can't verify/correct this in a code "picture"

I don't even know what you think the problem is with your second solve() command - although again, if you had provided executable code........

is to determine how to organise the results - ie how to "order" the terms and their associated coefficients.

Probably the simplest(?) method is shown in the attached where two lists are determined: one is the terms, and the other is the coefficients.

The order in the "term" list is the same as the order in the "coefficient" list

restart;
L:= Vector( [ a*x^2+b*x*y-1,
              -(a*b-b)*x*y/a-z^2+(a-1)/a,
              -a*c*z^2/(b*(a-1))+(b+c)/b,
               a*x^2+b*x*y-1,
              -(a*b-b)*x*y/a-z^2+(a-1)/a,
              1
            ]
          ):
C:= Matrix( numelems(L),
            2,
            (i,j)-> `if`( j=1,
                          [ coeffs(L[i],[x,y,z], 't') ],
                          [t]
                        )
          );

Matrix(6, 2, {(1, 1) = [a, b, -1], (1, 2) = [x^2, x*y, 1], (2, 1) = [(a-1)/a, -(a*b-b)/a, -1], (2, 2) = [1, x*y, z^2], (3, 1) = [(b+c)/b, -a*c/(b*(a-1))], (3, 2) = [1, z^2], (4, 1) = [a, b, -1], (4, 2) = [x^2, x*y, 1], (5, 1) = [(a-1)/a, -(a*b-b)/a, -1], (5, 2) = [1, x*y, z^2], (6, 1) = [1], (6, 2) = [1]})

(1)

 

Download getCoeffs.mw

if you actually supplied the function F(omega), because it would be (numerically) safer to perform the integration analytically, then evaluate the result at the required limits.

If for some reason you cannot do this, then it is possible to "numerically integrate" a list of values using Simpson's Rule (more or less)

Depending on the nature of the required integrand, I can think ways where either/both of these methods might produce erroneous results (or fail completely!).

The attached shows both ways to achieve this for some "toy" function F(omega)

Download numInt.mw

Realistically, the there is no such thing as a "best" way to do this. It depends so much on what you aresubsequently going to do with the data. The only thing I can suggest is that you read the associated help pages (very carefully) and master the basics. To be fair, the help pages do seem to focus more on obtaining 'plots' rather than values.

The attached shows the most basic(?) method(s) of obtaining values from both ODEs and PDEs

  restart;
  PDE := (diff(u(x,y), x,x))-1/x*(diff(u(x, y), x)) -x^2*(diff(u(x,y), y,y))= 2;
  BCs := u(0, y) = 0, u(1, y) = 0:
  ICs := u(x, 0) = 0, D[2](u)(x, 0) = 2:
  num_sol := pdsolve(PDE, {BCs,ICs}, numeric);
#
# Access the procedure which will return the value
# of u(x,y) for any supplied values of the arguments
# x,y
#
  getUxy:=eval( u(x,y),
                num_sol:-value( u(x,y),
                                output=listprocedure
                              )
              );
#
# Now compute u(x,y) for any supplied x,y
#
  getUxy(0.1,2);
  getUxy(0.2,5);
  getUxy(0.3,7);
#
# Obviously you can compute/organise the data in a
# variety of ways - for example if you want a matrix
# of values for u(x,y) where rows correspond to
# x=0,0.1,0.2...0.5 and columns correspond to
# y=0,1,2..5, then you could use
#
  resMat:= Matrix
           ( 6,
             6,
             (i,j)-> getUxy((i-1)/10, j-1)
           );

PDE := diff(u(x, y), x, x)-(diff(u(x, y), x))/x-x^2*(diff(u(x, y), y, y)) = 2

 

"num_sol:=module() ... end module"

 

"getUxy:=proc() ... end proc"

 

-0.133986802878421300e-1

 

-0.972195361293502758e-1

 

-.121322446822491159

 

Matrix(%id = 18446744074390309814)

(1)

  restart;
  ODE:=diff(y(x),x,x)+16*diff(y(x),x)=0:BCs:=y(0) =0, y(2)=3:
  ode_num_sol:=dsolve({ODE,BCs},numeric, output=listprocedure);
#
# Access the procedure which will return the value
# of y(x) for any supplied value of 'x'
#
  getY:=eval(y(x), ode_num_sol);
#
# Now compute the y(x) for any supplied x
#
  getY(0.1);
  getY(0.2);
  getY(0.5);
#
# Or if you wanted a matrix with x-values in column one, and
# associated y(x) values in column two, then you could use
#
  resMat:= Matrix
           ( 10,
             2,
             (i,j)->`if`( j=1,
                          (i-1.0)/10,
                          getY((i-1)/10)
                        )
           );

"ode_num_sol:=[x=proc(x) ... end proc,y(x)=proc(x) ... end proc,(&DifferentialD;)/(&DifferentialD;x) y(x)=proc(x) ... end proc]"

 

"getY:=proc(x) ... end proc"

 

2.39431044591507

 

2.87771338807757

 

2.99899361211452

 

Matrix(%id = 18446744074337277582)

(2)

 

Download opdevals.mw

but something wrong with "thinking" - because it counts triangles multiple times. Consider for example the triangle with edges [5, 15, 16]. Under the terms of the problem, this is the same as the triangles [5, 16, 15], [15,5,16], [15, 16, 5], [16, 5, 15] and [16, 15, 5]: but your code counts this as six triangles rather than one!

You might be tempted to divide the obtained answer by 6. However this would still be wrong for the case where there are two sides of the same length, eg [6, 15, 15], where you also count [15,6,15] and [15, 15, 6], sothe code counts three triangles rather than one.

If all sides are the same length, eg [12, 12, 12], then the code only counts this triangle once.

The easy way to avoid this issue is to adjust the limits of the 'for' loops to avoid the multiple countng, as in the attached (which also shows how the same answer can be obtained directly from Alcuin's sequence)

 

  restart;
#
# Alcuin's series. The coefficient of
# x^n ought to give the correct result.
# OP has n=36
#
  n:=36;
  expr:= x^3/((1-x^2)*(1-x^3)*(1-x^4)):
  ser:=taylor( expr, x=0, n+1):
  coeff(convert(ser, polynom), x, n);

36

 

27

(1)

#
# OP's calculation: code fine, but concept is wrong
#
  L := []:
  for a from 1 to 18 do
      for b from 1 to 18 do
          for c from 1 to 18 do
              if   `and`( a < b+c, b < a+c, c < b+a,
                          a > abs(b-c), b > abs(a-c), c > abs(a-b),
                          a+b+c = 36
                        )
              then L := [op(L), [a, b, c]]
              end if:
          end do:
      end do:
  end do;
  L;
  nops(L);

[[2, 17, 17], [3, 16, 17], [3, 17, 16], [4, 15, 17], [4, 16, 16], [4, 17, 15], [5, 14, 17], [5, 15, 16], [5, 16, 15], [5, 17, 14], [6, 13, 17], [6, 14, 16], [6, 15, 15], [6, 16, 14], [6, 17, 13], [7, 12, 17], [7, 13, 16], [7, 14, 15], [7, 15, 14], [7, 16, 13], [7, 17, 12], [8, 11, 17], [8, 12, 16], [8, 13, 15], [8, 14, 14], [8, 15, 13], [8, 16, 12], [8, 17, 11], [9, 10, 17], [9, 11, 16], [9, 12, 15], [9, 13, 14], [9, 14, 13], [9, 15, 12], [9, 16, 11], [9, 17, 10], [10, 9, 17], [10, 10, 16], [10, 11, 15], [10, 12, 14], [10, 13, 13], [10, 14, 12], [10, 15, 11], [10, 16, 10], [10, 17, 9], [11, 8, 17], [11, 9, 16], [11, 10, 15], [11, 11, 14], [11, 12, 13], [11, 13, 12], [11, 14, 11], [11, 15, 10], [11, 16, 9], [11, 17, 8], [12, 7, 17], [12, 8, 16], [12, 9, 15], [12, 10, 14], [12, 11, 13], [12, 12, 12], [12, 13, 11], [12, 14, 10], [12, 15, 9], [12, 16, 8], [12, 17, 7], [13, 6, 17], [13, 7, 16], [13, 8, 15], [13, 9, 14], [13, 10, 13], [13, 11, 12], [13, 12, 11], [13, 13, 10], [13, 14, 9], [13, 15, 8], [13, 16, 7], [13, 17, 6], [14, 5, 17], [14, 6, 16], [14, 7, 15], [14, 8, 14], [14, 9, 13], [14, 10, 12], [14, 11, 11], [14, 12, 10], [14, 13, 9], [14, 14, 8], [14, 15, 7], [14, 16, 6], [14, 17, 5], [15, 4, 17], [15, 5, 16], [15, 6, 15], [15, 7, 14], [15, 8, 13], [15, 9, 12], [15, 10, 11], [15, 11, 10], [15, 12, 9], [15, 13, 8], [15, 14, 7], [15, 15, 6], [15, 16, 5], [15, 17, 4], [16, 3, 17], [16, 4, 16], [16, 5, 15], [16, 6, 14], [16, 7, 13], [16, 8, 12], [16, 9, 11], [16, 10, 10], [16, 11, 9], [16, 12, 8], [16, 13, 7], [16, 14, 6], [16, 15, 5], [16, 16, 4], [16, 17, 3], [17, 2, 17], [17, 3, 16], [17, 4, 15], [17, 5, 14], [17, 6, 13], [17, 7, 12], [17, 8, 11], [17, 9, 10], [17, 10, 9], [17, 11, 8], [17, 12, 7], [17, 13, 6], [17, 14, 5], [17, 15, 4], [17, 16, 3], [17, 17, 2]]

 

136

(2)

#
# Correct calculation. Note lower limits
# on for loops. Ensures that triples can
# only be obtained in increasing order, so
# avoiding the multiple counting
#
  L := []:
  for a from 1 to 18 do
      for b from a to 18 do
          for c from b to 18 do
              if   `and`( a < b+c, b < a+c, c < b+a,
                          a > abs(b-c), b > abs(a-c), c > abs(a-b),
                          a+b+c = 36
                        )
              then L := [op(L), [a, b, c]]
              end if:
          end do:
      end do:
  end do;
  L;
  nops(L);

[[2, 17, 17], [3, 16, 17], [4, 15, 17], [4, 16, 16], [5, 14, 17], [5, 15, 16], [6, 13, 17], [6, 14, 16], [6, 15, 15], [7, 12, 17], [7, 13, 16], [7, 14, 15], [8, 11, 17], [8, 12, 16], [8, 13, 15], [8, 14, 14], [9, 10, 17], [9, 11, 16], [9, 12, 15], [9, 13, 14], [10, 10, 16], [10, 11, 15], [10, 12, 14], [10, 13, 13], [11, 11, 14], [11, 12, 13], [12, 12, 12]]

 

27

(3)

 

Download alcuin.mw

@Regina von Fuerstenmuehl 

This problem crops up reasonably often.

The explanation is that you should not use a name (eg 'A') and an indexed name (eg 'A[0]') at the same time- strange things will happen!

It is perfectly acceptable to use a name (eg 'A') and a subscripted version of the same name (eg 'A__0') at the same time

The difference between an indexed name and a subscripted name is easy to see if you are using 1-D Maple input, but impossible(?) with 2-D Maple input.

If you are using the expression palettes with 2D-Maple input to enter these two entities, it is not obvious whihc entry in the palette is indexed and which is subscripted. The distinction in the palette is that

  1. the indexed name is displayed with different 'colors' for the 'name' and the 'index'. On my setup the 'name' is green and the 'index' is magenta ie ab
  2. the subscripted name has the same 'color' for both the 'name' and the 'subscript', ie ab

otherwise I can only recommend that you read the help at

?examples/NumericDDEs
?dsolve/numeric/delay

Variable delays are handled, although the maximum delay has to be 'known'

The attached "works", although for some reason it is not displaying inline on this site, so just download/execute it

For future reference it would be more helpful if you could post executable code rather pictures. It saves retyping, which can be errorprone. The big green up-arrow in the Mapleprimes toolbar is your friend!

Download dePlot.mw

to achieve this. A couple are shown in the attached

plot( [ seq( Vc^(1/n)-0.5,
             n in [0.1,0.3,0.5,1.0, 3.0, 5.0,10.0]
            )
      ],
      Vc=0..1
    );
plots:-implicitplot( [ seq( Vc=(0.5+t)^n,
             n in [0.1,0.3,0.5,1.0, 3.0, 5.0,10.0]
            )
      ],
      Vc=0..1,
      t=-0.5..0.5
    );

 

plots:-implicitplot( [ seq( Vc=(0.5+t)^n,
             n in [0.1,0.3,0.5,1.0, 3.0, 5.0,10.0]
            )
      ],
      Vc=0..1,
      t=-0.5..0.5
    );

 

 


 

Download doPlots.mw

First 118 119 120 121 122 123 124 Last Page 120 of 207