Kitonum

21525 Reputation

26 Badges

17 years, 75 days

MaplePrimes Activity


These are answers submitted by Kitonum


 

restart;
c1:=3.2: c2:=3.3: c3:=3.4: R:=-10: A:=1.6:

sol:=dsolve({diff(f(x),x$4) - c1*diff(g(x),x$2) + R*(diff(f(x),x)* diff(f(x),x$2) - f(x)*diff(f(x),x$3))=0,diff(g(x),x$2)+c2*(diff(f(x),x$2)-2*g(x))-c3*(f(x)*diff(g(x),x)-diff(f(x),x)*g(x))=0,D(f)(-1)=0, D(f)(1)=0,f(-1)=1-A,f(1) =1,g(-1)=0,g(1)=0}, numeric);

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(21, {(1) = -1.0, (2) = -.9379808670115692, (3) = -.8737879401746669, (4) = -.8071752365321642, (5) = -.737846554366134, (6) = -.6647730167481146, (7) = -.5846962906002146, (8) = -.4948419722955886, (9) = -.39095850902064355, (10) = -.2727817089533898, (11) = -.13560606119241353, (12) = 0.15609899327280935e-1, (13) = .17138179998337502, (14) = .32004065269496373, (15) = .4574141854843416, (16) = .5796079126672031, (17) = .6886347209415522, (18) = .7846266562404318, (19) = .8653413901795519, (20) = .9361519290003208, (21) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(21, 6, {(1, 1) = -.6, (1, 2) = .0, (1, 3) = 1.933574172895688, (1, 4) = 3.2935327906510654, (1, 5) = .0, (1, 6) = 2.989334789810824, (2, 1) = -.5961626701578583, (2, 2) = .12546644498862447, (2, 3) = 2.1000534596203093, (2, 4) = 2.090992178215719, (2, 5) = .16269807206994533, (2, 6) = 2.277382088918899, (3, 1) = -.5837025183977008, (3, 2) = .26377828746180204, (3, 3) = 2.196917150370234, (3, 4) = .9427342310502282, (3, 5) = .28835968963429326, (3, 6) = 1.6553960068739786, (4, 1) = -.5612247767453585, (4, 2) = .4113861423699064, (4, 3) = 2.222781700020577, (4, 4) = -.14928215645654438, (4, 5) = .3799990966227525, (4, 6) = 1.1116606884000693, (5, 1) = -.527385077285588, (5, 2) = .5642845336873072, (5, 3) = 2.1761822579858228, (5, 4) = -1.1757589520057652, (5, 5) = .44011284779599846, (5, 6) = .6365605592019381, (6, 1) = -.4804332889112951, (6, 2) = .7192893161754781, (6, 3) = 2.0546693921413266, (6, 4) = -2.1263980985175523, (6, 5) = .47090928849845315, (6, 6) = .21946829224336692, (7, 1) = -.4164491770135664, (7, 2) = .8760236754661979, (7, 3) = 1.848339140308811, (7, 4) = -2.99486566803203, (7, 5) = .47299107467294255, (7, 6) = -.1539531348969532, (8, 1) = -.33065976147589365, (8, 2) = 1.0289404469293186, (8, 3) = 1.5443705688574503, (8, 4) = -3.7256130438968027, (8, 5) = .4437076719719681, (8, 6) = -.48300810682801176, (9, 1) = -.21616116481500305, (9, 2) = 1.1682121253580369, (9, 3) = 1.1284035858221788, (9, 4) = -4.218325172351393, (9, 5) = .37825714156206786, (9, 6) = -.7596586345023679, (10, 1) = -0.714031798043051e-1, (10, 2) = 1.271595578001645, (10, 3) = .6192209205456293, (10, 4) = -4.322174364759075, (10, 5) = .27571558419417747, (10, 6) = -.9562772986583437, (11, 1) = .10702098920593602, (11, 2) = 1.3166936422936484, (11, 3) = 0.4684849708352476e-1, (11, 4) = -3.95288179345142, (11, 5) = .1365175395260044, (11, 6) = -1.0518068653915225, (12, 1) = .30448004138140244, (12, 2) = 1.28117401384149, (12, 3) = -.49827772326714526, (12, 4) = -3.229903767975225, (12, 5) = -0.22160310947253917e-1, (12, 6) = -1.0272952971400855, (13, 1) = .4960968363639633, (13, 2) = 1.1675953799259322, (13, 3) = -.9395998350138852, (13, 4) = -2.4462833634708323, (13, 5) = -.17315806804772424, (13, 6) = -.8958170476810169, (14, 1) = .6580438917122471, (14, 2) = 1.0034397433244657, (14, 3) = -1.252120344541368, (14, 4) = -1.7685386814686117, (14, 5) = -.29188336317567026, (14, 6) = -.6884905412860394, (15, 1) = .7833760386113022, (15, 2) = .816634476498511, (15, 3) = -1.453745979067012, (15, 4) = -1.1644466870181112, (15, 5) = -.3690488686597065, (15, 6) = -.4212123297455981, (16, 1) = .8719989299520304, (16, 2) = .6317023102203725, (16, 3) = -1.5613437907241403, (16, 4) = -.5851389666137105, (16, 5) = -.4018282187140272, (16, 6) = -0.9897957049092156e-1, (17, 1) = .9314960462959884, (17, 2) = .4591335944284822, (17, 3) = -1.5933972273271257, (17, 4) = 0.14454651785200952e-1, (17, 5) = -.3923723698236356, (17, 6) = .293052962053937, (18, 1) = .968252273554313, (18, 2) = .3071776561395629, (18, 3) = -1.5624266472437789, (18, 4) = .6523766550656892, (18, 5) = -.3426949154605619, (18, 6) = .7669836164313891, (19, 1) = .9880272727551623, (19, 2) = .18387101334265538, (19, 3) = -1.4840854206694534, (19, 4) = 1.3115956702917055, (19, 5) = -.26003390463049686, (19, 6) = 1.3075390762410004, (20, 1) = .9974140861984128, (20, 2) = 0.8263515866568337e-1, (20, 3) = -1.3668583614521281, (20, 4) = 2.0241991272292283, (20, 5) = -.14619002644293652, (20, 6) = 1.9363934917444479, (21, 1) = 1.0, (21, 2) = .0, (21, 3) = -1.213219755822394, (21, 4) = 2.8158116176608328, (21, 5) = .0, (21, 6) = 2.6741867611734547}, datatype = float[8], order = C_order); YP := Matrix(21, 6, {(1, 1) = .0, (1, 2) = 1.933574172895688, (1, 3) = 3.2935327906510654, (1, 4) = -20.171724029757133, (1, 5) = 2.989334789810824, (1, 6) = -12.479037741769849, (2, 1) = .12546644498862447, (2, 2) = 2.1000534596203093, (2, 3) = 2.090992178215719, (2, 4) = -18.633568323982768, (2, 5) = 2.277382088918899, (2, 6) = -10.54192048283493, (3, 1) = .26377828746180204, (3, 2) = 2.196917150370234, (3, 3) = .9427342310502282, (3, 4) = -17.151996232891765, (3, 5) = 1.6553960068739786, (3, 6) = -8.890546911728242, (4, 1) = .4113861423699064, (4, 2) = 2.222781700020577, (4, 3) = -.14928215645654438, (4, 4) = -15.629356971128114, (4, 5) = 1.1116606884000693, (4, 6) = -7.479926378391591, (5, 1) = .5642845336873072, (5, 2) = 2.1761822579858228, (5, 3) = -1.1757589520057652, (5, 4) = -13.960806821209731, (5, 5) = .6365605592019381, (5, 6) = -6.262465459419724, (6, 1) = .7192893161754781, (6, 2) = 2.0546693921413266, (6, 3) = -2.1263980985175523, (6, 4) = -12.021071149501477, (6, 5) = .21946829224336692, (6, 6) = -5.182551328077048, (7, 1) = .8760236754661979, (7, 2) = 1.848339140308811, (7, 3) = -2.99486566803203, (7, 4) = -9.619681210014855, (7, 5) = -.1539531348969532, (7, 6) = -4.168586329639746, (8, 1) = 1.0289404469293186, (8, 2) = 1.5443705688574503, (8, 3) = -3.7256130438968027, (8, 4) = -6.595488129126174, (8, 5) = -.48300810682801176, (8, 6) = -3.1771994869090414, (9, 1) = 1.1682121253580369, (9, 2) = 1.1284035858221788, (9, 3) = -4.218325172351393, (9, 4) = -2.8844979698863806, (9, 5) = -.7596586345023679, (9, 6) = -2.171332704436469, (10, 1) = 1.271595578001645, (10, 2) = .6192209205456293, (10, 3) = -4.322174364759075, (10, 4) = 1.000341969909436, (10, 5) = -.9562772986583437, (10, 6) = -1.1835856064641754, (11, 1) = 1.3166936422936484, (11, 2) = 0.4684849708352476e-1, (11, 3) = -3.95288179345142, (11, 4) = 4.0553836852185015, (11, 5) = -1.0518068653915225, (11, 6) = -.2474627171510777, (12, 1) = 1.28117401384149, (12, 2) = -.49827772326714526, (12, 3) = -3.229903767975225, (12, 4) = 5.150125875894489, (12, 5) = -1.0272952971400855, (12, 6) = .531099454326164, (13, 1) = 1.1675953799259322, (13, 2) = -.9395998350138852, (13, 3) = -2.4462833634708323, (13, 4) = 4.794786111283175, (13, 5) = -.8958170476810169, (13, 6) = 1.1342425000063217, (14, 1) = 1.0034397433244657, (14, 2) = -1.252120344541368, (14, 3) = -1.7685386814686117, (14, 4) = 4.388656248198329, (14, 5) = -.6884905412860394, (14, 6) = 1.660990204251605, (15, 1) = .816634476498511, (15, 2) = -1.453745979067012, (15, 3) = -1.1644466870181112, (15, 4) = 4.496395866650609, (15, 5) = -.4212123297455981, (15, 6) = 2.2644345012248825, (16, 1) = .6317023102203725, (16, 2) = -1.5613437907241403, (16, 3) = -.5851389666137105, (16, 4) = 5.063219173481798, (16, 5) = -0.9897957049092156e-1, (16, 6) = 3.069955763238939, (17, 1) = .4591335944284822, (17, 2) = -1.5933972273271257, (17, 3) = 0.14454651785200952e-1, (17, 4) = 6.018947447442345, (17, 5) = .293052962053937, (17, 6) = 4.209191850211921, (18, 1) = .3071776561395629, (18, 2) = -1.5624266472437789, (18, 3) = .6523766550656892, (18, 4) = 7.370603573695792, (18, 5) = .7669836164313891, (18, 6) = 5.777087788253219, (19, 1) = .18387101334265538, (19, 2) = -1.4840854206694534, (19, 3) = 1.3115956702917055, (19, 4) = 9.06820312378945, (19, 5) = 1.3075390762410004, (19, 6) = 7.73622779887591, (20, 1) = 0.8263515866568337e-1, (20, 2) = -1.3668583614521281, (20, 3) = 2.0241991272292283, (20, 4) = 11.1722545376268, (20, 5) = 1.9363934917444479, (20, 6) = 10.153564794074244, (21, 1) = .0, (21, 2) = -1.213219755822394, (21, 3) = 2.8158116176608328, (21, 4) = 13.748636406443344, (21, 5) = 2.6741867611734547, (21, 6) = 13.095860182203648}, 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(21, {(1) = -1.0, (2) = -.9379808670115692, (3) = -.8737879401746669, (4) = -.8071752365321642, (5) = -.737846554366134, (6) = -.6647730167481146, (7) = -.5846962906002146, (8) = -.4948419722955886, (9) = -.39095850902064355, (10) = -.2727817089533898, (11) = -.13560606119241353, (12) = 0.15609899327280935e-1, (13) = .17138179998337502, (14) = .32004065269496373, (15) = .4574141854843416, (16) = .5796079126672031, (17) = .6886347209415522, (18) = .7846266562404318, (19) = .8653413901795519, (20) = .9361519290003208, (21) = 1.0}, datatype = float[8], order = C_order); Y := Matrix(21, 6, {(1, 1) = .0, (1, 2) = .0, (1, 3) = 0.20045925470685708e-9, (1, 4) = 0.8277557666289159e-10, (1, 5) = .0, (1, 6) = 0.15114560749105982e-9, (2, 1) = 0.5158879880588224e-12, (2, 2) = 0.14215271091154637e-10, (2, 3) = 0.2004661576674297e-9, (2, 4) = -0.8887372862376951e-10, (2, 5) = 0.757724753264518e-11, (2, 6) = 0.9125228675118423e-10, (3, 1) = 0.2128154366806889e-11, (3, 2) = 0.287530210876931e-10, (3, 3) = 0.18876173516903876e-9, (3, 4) = -0.2540075546656048e-9, (3, 5) = 0.11625606776263755e-10, (3, 6) = 0.40381030163406105e-10, (4, 1) = 0.4963269255937875e-11, (4, 2) = 0.4285152453796549e-10, (4, 3) = 0.16493408755446793e-9, (4, 4) = -0.4053397535086608e-9, (4, 5) = 0.12333029015770294e-10, (4, 6) = -0.1791442382917446e-11, (5, 1) = 0.9116047066444794e-11, (5, 2) = 0.5557925799045456e-10, (5, 3) = 0.12882025439142448e-9, (5, 4) = -0.5332966583436343e-9, (5, 5) = 0.9864457687322937e-11, (5, 6) = -0.35285712141483545e-10, (6, 1) = 0.1470916327690705e-10, (6, 2) = 0.6582207372903393e-10, (6, 3) = 0.795247776128351e-10, (6, 4) = -0.6294952828563126e-9, (6, 5) = 0.4338808545975659e-11, (6, 6) = -0.5975801460942937e-10, (7, 1) = 0.22151231492004536e-10, (7, 2) = 0.7154281326591275e-10, (7, 3) = 0.10655411424085484e-10, (7, 4) = -0.6940013965057971e-9, (7, 5) = -0.449943838899647e-11, (7, 6) = -0.7227437435541223e-10, (8, 1) = 0.3143780948875737e-10, (8, 2) = 0.6535678153294401e-10, (8, 3) = -0.949895573966807e-10, (8, 4) = -0.7449037210337756e-9, (8, 5) = -0.15971470006080478e-10, (8, 6) = -0.5453969567071403e-10, (9, 1) = 0.4092623495751743e-10, (9, 2) = 0.26536027992495592e-10, (9, 3) = -0.2429237937554614e-9, (9, 4) = -0.7138209108619224e-9, (9, 5) = -0.23377481324379515e-10, (9, 6) = 0.5276528968153014e-10, (10, 1) = 0.4415857324275836e-10, (10, 2) = -0.4818863075783663e-10, (10, 3) = -0.19283214523517545e-9, (10, 4) = -0.27860357123918643e-9, (10, 5) = -0.70822957672681055e-11, (10, 6) = 0.25390799175668336e-9, (11, 1) = 0.15523612061727348e-10, (11, 2) = -0.1467030560619035e-10, (11, 3) = 0.23143389392294444e-9, (11, 4) = -0.33032689167286705e-9, (11, 5) = 0.8201024797696422e-10, (11, 6) = 0.8621989339731842e-10, (12, 1) = -0.3641770562042089e-10, (12, 2) = 0.3141601889820978e-9, (12, 3) = -0.13375324270905143e-8, (12, 4) = 0.6162751129968969e-8, (12, 5) = 0.15360239425929725e-9, (12, 6) = -0.8105870771949846e-9, (13, 1) = 0.595678701625678e-10, (13, 2) = -0.13846885765846146e-9, (13, 3) = -0.7955697858200915e-10, (13, 4) = 0.27488667169234544e-8, (13, 5) = -0.16402585258079348e-9, (13, 6) = 0.5119846575641247e-9, (14, 1) = 0.40823635446837066e-10, (14, 2) = -0.2699499524866616e-9, (14, 3) = 0.14760109918441855e-8, (14, 4) = -0.98068495484932e-8, (14, 5) = -0.134851729771407e-9, (14, 6) = 0.6865689447109253e-9, (15, 1) = -0.17210360954127904e-11, (15, 2) = -0.26161657275172888e-10, (15, 3) = -0.16332969772296796e-10, (15, 4) = -0.33046127679841334e-9, (15, 5) = -0.39546372424047783e-10, (15, 6) = -0.14506510660938657e-9, (16, 1) = -0.14336918408313271e-11, (16, 2) = -0.20628752921859975e-10, (16, 3) = -0.725259632009807e-10, (16, 4) = 0.32197505437370873e-9, (16, 5) = -0.4392858251618543e-10, (16, 6) = -0.22314853003345976e-9, (17, 1) = 0.6510741250787862e-12, (17, 2) = -0.28517055679764822e-10, (17, 3) = 0.6972504039318902e-10, (17, 4) = -0.6715203795248354e-9, (17, 5) = -0.3285694273905973e-10, (17, 6) = -0.15865548298597958e-9, (18, 1) = 0.682305383929572e-12, (18, 2) = -0.18654020318015608e-10, (18, 3) = 0.8173214248380389e-10, (18, 4) = -0.5386766276504061e-9, (18, 5) = -0.11214022447994526e-10, (18, 6) = -0.9616707545852851e-10, (19, 1) = 0.1454058879376567e-12, (19, 2) = -0.10081470952846923e-10, (19, 3) = 0.609174267391267e-10, (19, 4) = -0.2759449676001764e-9, (19, 5) = -0.3660513213351561e-11, (19, 6) = -0.8496643946552686e-10, (20, 1) = -0.6997436017168929e-13, (20, 2) = -0.4286845890806063e-11, (20, 3) = 0.49699435844552223e-10, (20, 4) = -0.15489670735342713e-9, (20, 5) = -0.8938460341045965e-12, (20, 6) = -0.8276448093060273e-10, (21, 1) = .0, (21, 2) = .0, (21, 3) = 0.44444299545291215e-10, (21, 4) = -0.11237818753716929e-9, (21, 5) = .0, (21, 6) = -0.829435465948473e-10}, 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[21] elif outpoint = "order" then return 8 elif outpoint = "error" then return HFloat(9.8068495484932e-9) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [6, 21, [f(x), diff(f(x), x), diff(diff(f(x), x), x), diff(diff(diff(f(x), x), x), x), g(x), diff(g(x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[21] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[21] 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`(21, 6, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(6, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(21, 6, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[f(x), diff(f(x), x), diff(diff(f(x), x), x), diff(diff(diff(f(x), x), x), x), g(x), diff(g(x), x)]'[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[21] elif outpoint = "order" then return 8 elif outpoint = "error" then return HFloat(9.8068495484932e-9) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [6, 21, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[21] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[21] 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`(21, 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`(21, 6, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 6)] end proc, (2) = Array(0..0, {}), (3) = [x, f(x), diff(f(x), x), diff(diff(f(x), x), x), diff(diff(diff(f(x), x), x), x), g(x), diff(g(x), x)], (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); [x = res[1], seq('[f(x), diff(f(x), x), diff(diff(f(x), x), x), diff(diff(diff(f(x), x), x), x), g(x), diff(g(x), x)]'[i] = res[i+1], i = 1 .. 6)] catch: error  end try end proc

(1)

plots:-odeplot(sol,[[x,f(x)],[x,g(x)]], x=-1..1, color=[red,blue]);

 

 


 

Download diffeq1.mw

If your goal is to prove the equality of 2 expressions (say A and B) then do  simplify(A - B)  or  is(A = B) :


 

restart;

Is_square := M[dmax]*(sigma^2*omega[rK]^2 + omega[r]^2)*L[sigma]/(3*p*omega[r]*omega[rK]*L[mu]^2*sigma^2);

(1/3)*M[dmax]*(sigma^2*omega[rK]^2+omega[r]^2)*L[sigma]/(p*omega[r]*omega[rK]*L[mu]^2*sigma^2)

(1)

Is_square2 := M[dmax]*(1 + omega[r]^2/(sigma^2*omega[rK]^2))*L[sigma]/(3*p*omega[r]*L[mu]^2/omega[rK]);

(1/3)*M[dmax]*(1+omega[r]^2/(sigma^2*omega[rK]^2))*L[sigma]*omega[rK]/(p*omega[r]*L[mu]^2)

(2)

simplify(%%-%);

0

(3)

 



Sometimes this requires additional conditions:

is(sqrt(x^2)=x) assuming x>=0;
                               
true

 

Download Qprime_20200621_new.mw

restart;
P:=proc(n)
local f;
f:=convert(series(exp(x^2),x=7.5,n+1), polynom);
evalf(Int(f, x=5..10));
end proc:

P(100);
evalf(Int(exp(x^2), x=5..10));  # Check

                            1.350882278*10^42
                            1.350882281*10^42


Addition. I took the expansion not in powers of  x , but in powers of  x-x0  where x0 = 7.5 (this is the middle of the range  5 ..10). If we take the expansion in powers of  x , then to obtain a satisfactory result, it is necessary to take a very large  

Download Int.mw


 

restart;
a:=rsolve({a(n+1)=sqrt(x*a(n)), a(1)=x}, a(n), makeproc);

proc (n) local L, i, val; options remember, system, `Copyright (c) 2003 by Waterloo Maple Inc.`; if not type(n, integer) then error "input must be an integer" elif n = 1 then x elif n < 1 then L := [x]; for i from 0 by -1 to n do val := traperror(L[1]^2/x); if val = lasterror then error "unable to compute recurrence for n<%1", i+1 end if; L := [val, op(1 .. -2, L)] end do; L[1] elif 1 < n then L := [x]; for i from 2 to n do val := traperror((x*L[1])^(1/2)); if val = lasterror then error "unable to compute recurrence for n>%1", i-1 end if; L := [op(2 .. -1, L), val] end do; L[-1] end if end proc

(1)

L:=[seq(a(n), n=1..10)];
simplify(L) assuming x>=0;
simplify(L) assuming x<0;
 

[x, (x^2)^(1/2), (x*(x^2)^(1/2))^(1/2), (x*(x*(x^2)^(1/2))^(1/2))^(1/2), (x*(x*(x*(x^2)^(1/2))^(1/2))^(1/2))^(1/2), (x*(x*(x*(x*(x^2)^(1/2))^(1/2))^(1/2))^(1/2))^(1/2), (x*(x*(x*(x*(x*(x^2)^(1/2))^(1/2))^(1/2))^(1/2))^(1/2))^(1/2), (x*(x*(x*(x*(x*(x*(x^2)^(1/2))^(1/2))^(1/2))^(1/2))^(1/2))^(1/2))^(1/2), (x*(x*(x*(x*(x*(x*(x*(x^2)^(1/2))^(1/2))^(1/2))^(1/2))^(1/2))^(1/2))^(1/2))^(1/2), (x*(x*(x*(x*(x*(x*(x*(x*(x^2)^(1/2))^(1/2))^(1/2))^(1/2))^(1/2))^(1/2))^(1/2))^(1/2))^(1/2)]

 

[x, x, x, x, x, x, x, x, x, x]

 

[x, -x, -I*x, (-1/2+(1/2)*I)*x*2^(1/2), -(1/2)*x*2^(1/4)*(-2+2*I)^(1/2), -(1/2)*x*2^(5/8)*(-(-2+2*I)^(1/2))^(1/2), -(1/2)*x*2^(13/16)*(-(-(-2+2*I)^(1/2))^(1/2))^(1/2), -(1/2)*x*2^(29/32)*(-(-(-(-2+2*I)^(1/2))^(1/2))^(1/2))^(1/2), -(1/2)*x*2^(61/64)*(-(-(-(-(-2+2*I)^(1/2))^(1/2))^(1/2))^(1/2))^(1/2), -(1/2)*x*2^(125/128)*(-(-(-(-(-(-2+2*I)^(1/2))^(1/2))^(1/2))^(1/2))^(1/2))^(1/2)]

(2)

 



It is obvious that for any x> 0   a(n) = x  for any n , so if x=2 then  a(100)=2 .
 

Download rsolve1.mw


 

restart;

sol:=W(x)=_C1*(cosh(alpha*x)-sinh(alpha*x))+_C2*(cosh(alpha*x)+sinh(alpha*x))+_C3*sin(alpha*x)+_C4*cos(alpha*x);
W:=eval(W(x),sol);

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

 

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

(1)

F:=[sinh(alpha*x),cosh(alpha*x),sin(alpha*x),cos(alpha*x)]:
W1:=collect(W, F);
assign(([D1,D2,D3,D4]=~[coeffs(W1, F)])[]);

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

(2)

D1, D2, D3, D4;

_C1+_C2, -_C1+_C2, _C3, _C4

(3)

 


 

Download collect_new.mw

The Iterator package was introduced in Maple 2016. If you have an older version of Maple, then you can use the commands  combinat:-nextperm  and  combinat:-nextcomb .

primpart(98-28*sqrt(7), sqrt(7));
content(98-28*sqrt(7), sqrt(7));
%*``(%%);
expand(%);

                                   

Or manually:

Expr:=98-28*sqrt(7);
d:=igcd(98,28);
d*``(Expr/d);

 

The integral of a periodic function is the same on any period-long interval. The contradiction below is due to limited accuracy in approximate calculation. With increasing accuracy, both methods yield consistent results. Infinity is explained by the fact that the function is discontinuous, its denominator is 0 at some points.


 

restart;
x(t) := -3.703703704*10^(-7)*(0.000111668023*cos(1000/33*sqrt(1122)*t) - 0.0001214712007*sin(1000/33*sqrt(1122)*t) - 0.0002325581396*sqrt(561)*sqrt(2)*(-0.0004467462845*sqrt(1122)*sin(1000/33*sqrt(1122)*t) + 0.0004467462845*sqrt(1122)*cos(1000/33*sqrt(1122)*t)))/((2.074226433*10^14*cos(1000/33*sqrt(1122)*t) + 2.074226433*10^14*sin(1000/33*sqrt(1122)*t))*(4.895037587*10^(-11) + 0.01685634229*(0.00001474262739*cos(1000/33*sqrt(1122)*t) + 0.00001474262739*sin(1000/33*sqrt(1122)*t))^2)^2);
P:= 33*Pi/1000/sqrt(1122):

# Digits=10
RMS:= evalf(sqrt(1/2/P*Int(x(t)^2, t= -P..P)));
RMS:= evalf(sqrt(1/2/P*Int(x(t)^2, t= 0..2*P)));

Digits:=20:
RMS:= evalf(sqrt(1/2/P*Int(x(t)^2, t= -P..P)));
RMS:= evalf(sqrt(1/2/P*Int(x(t)^2, t= 0..2*P)));
 

-0.3703703704e-6*(0.111668023e-3*cos((1000/33)*1122^(1/2)*t)-0.1214712007e-3*sin((1000/33)*1122^(1/2)*t)-0.2325581396e-3*561^(1/2)*2^(1/2)*(-0.4467462845e-3*1122^(1/2)*sin((1000/33)*1122^(1/2)*t)+0.4467462845e-3*1122^(1/2)*cos((1000/33)*1122^(1/2)*t)))/((0.2074226433e15*cos((1000/33)*1122^(1/2)*t)+0.2074226433e15*sin((1000/33)*1122^(1/2)*t))*(0.4895037587e-10+0.1685634229e-1*(0.1474262739e-4*cos((1000/33)*1122^(1/2)*t)+0.1474262739e-4*sin((1000/33)*1122^(1/2)*t))^2)^2)

 

0.3200233260e-5

 

Float(infinity)

 

Float(infinity)

 

Float(infinity)

(1)

 


 

Download Infinity.mw

To plot surfaces of revolution it is convenient to use their parametric equations in which to use polar coordinates on the plane. The 1 ex. :

restart;
x:=r*cos(phi): y:=r*sin(phi):
plot3d([[x,y,r],[x,y,4]], r=0..4, phi=0..2*Pi, style=surface, color=grey, scaling=constrained, labels=["x","y",z]);

                        

with(InertForm):
Parse("2+3^4");
Parse("(2+3)^4");

                                           

With variable and number substitution instead of variable:

Expr:="2*x+3*x-(4*x+5)/(3*x+6)":
Parse(Expr);
Typeset(%, 'inert'=false);
Parse(StringTools:-Subs("x"="8",Expr));
value(%);
                                   

                                   

 


 

restart;
Eq1:=diff(f(x), x) = u(x):
Eq2:=diff(u(x), x) = x + f(x) - f(x)^2:
Inc:=f(0) = -1, u(0) = 1:

sol1 := dsolve([Eq1, Eq2, Inc], numeric, method = taylorseries[series]);

P:= plots:-odeplot(sol1, [x, f(x)], 0 .. 10, color = red);
T:= plot(-1 + x - x^2 +2/3*x^3 - 1/3*x^4 + 1/5*x^5, x=0..10, -1..7, color=blue);

plots:-display(P,T);

proc (x_taylorseries) 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_taylorseries) else _xout := evalf(x_taylorseries) end if; _dat := Array(1..4, {(1) = proc (_xin) local _xout, _ctl, _n, _reinit, _y0, _yn, _yini, _pars, _ini, _par, _i; option `Copyright (c) 1994 by the University of Waterloo. All rights reserved.`; table( [( "complex" ) = false ] ) Digits := 15; _xout := _xin; _ctl := array( 1 .. 21, [( 1 ) = (2), ( 2 ) = (0.), ( 3 ) = (0.), ( 4 ) = (0.1e-9), ( 5 ) = (0.1e-4), ( 6 ) = (22), ( 7 ) = (true), ( 9 ) = (2), ( 8 ) = (9), ( 11 ) = ({diff(Y[1](x), x)-Y[2](x), diff(Y[2](x), x)+Y[1](x)^2-x-Y[1](x)}), ( 10 ) = (0), ( 13 ) = (0), ( 12 ) = ({Y[1], Y[2]}), ( 15 ) = (Array(1..2, 0..22, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (1, 11) = 0, (1, 12) = 0, (1, 13) = 0, (1, 14) = 0, (1, 15) = 0, (1, 16) = 0, (1, 17) = 0, (1, 18) = 0, (1, 19) = 0, (1, 20) = 0, (1, 21) = 0, (1, 22) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 0, (2, 11) = 0, (2, 12) = 0, (2, 13) = 0, (2, 14) = 0, (2, 15) = 0, (2, 16) = 0, (2, 17) = 0, (2, 18) = 0, (2, 19) = 0, (2, 20) = 0, (2, 21) = 0, (2, 22) = 0})), ( 14 ) = (Array(1..2, 0..22, {(1, 1) = 0, (1, 2) = 0, (1, 3) = 0, (1, 4) = 0, (1, 5) = 0, (1, 6) = 0, (1, 7) = 0, (1, 8) = 0, (1, 9) = 0, (1, 10) = 0, (1, 11) = 0, (1, 12) = 0, (1, 13) = 0, (1, 14) = 0, (1, 15) = 0, (1, 16) = 0, (1, 17) = 0, (1, 18) = 0, (1, 19) = 0, (1, 20) = 0, (1, 21) = 0, (1, 22) = 0, (2, 1) = 0, (2, 2) = 0, (2, 3) = 0, (2, 4) = 0, (2, 5) = 0, (2, 6) = 0, (2, 7) = 0, (2, 8) = 0, (2, 9) = 0, (2, 10) = 0, (2, 11) = 0, (2, 12) = 0, (2, 13) = 0, (2, 14) = 0, (2, 15) = 0, (2, 16) = 0, (2, 17) = 0, (2, 18) = 0, (2, 19) = 0, (2, 20) = 0, (2, 21) = 0, (2, 22) = 0})), ( 18 ) = (1), ( 19 ) = (1), ( 16 ) = (0), ( 17 ) = (-1), ( 20 ) = (0), ( 21 ) = ({diff(Y[1](x), x)-Y[2](x), diff(Y[2](x), x)+Y[1](x)^2-x-Y[1](x)})  ] ); _n := trunc(_ctl[1]); _yini := Array(0..2, {(1) = 0., (2) = -1.}); _y0 := Array(0..2, {(1) = 0., (2) = -1.}); _yn := Array(1..2, {(1) = 0, (2) = 0}); _pars := []; _n := 2; if not type(_xout, 'numeric') then if member(_xout, ["start", "left", "right"]) then return _y0[0] elif _xout = "method" then return "taylorseries" elif _xout = "storage" then return type(eval(_ctl[10]), 'table') elif _xout = "order" then return _ctl[6] elif _xout = "initial" then return [seq(_yini[_i], _i = 0 .. _n)] elif _xout = "parameters" then return [seq(_yini[_n+_i], _i = 1 .. nops(_pars))] elif _xout = "initial_and_parameters" then return [seq(_yini[_i], _i = 0 .. _n)], [seq(_yini[_n+_i], _i = 1 .. nops(_pars))] elif _xout = "last" then if _ctl[17] = 0 then return evalf([evalf(_ctl[3]), seq(_yn[_i], _i = 1 .. _n)]) elif _ctl[17] = 1 then return evalf([_ctl[2], seq(_ctl[14][_i, 0], _i = 1 .. _n)]) else error "no information is available on last computed point" end if elif _xout = "enginedata" then return op(_ctl) elif _xout = "function" then if _ctl[9]-2. = 0 then return NULL else return eval(_ctl[13], 1) end if 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 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, _yini) end if; if _ini <> [] then `dsolve/numeric/process_initial`(_n, _ini, _yini, _pars) end if; if _pars <> [] then _par := {seq(rhs(_pars[_i]) = _yini[_n+_i], _i = 1 .. nops(_pars))}; for _i from 0 to _n do _y0[_i] := subs(_par, _yini[_i]) end do; for _i from _n+1 to _n+nops(_pars) do _y0[_i] := _yini[_i] end do; if _ctl[9] = 2 then _ctl[11] := subs(_par, _ctl[21]) end if else for _i from 0 to _n do _y0[_i] := _yini[_i] end do end if; if type(_ctl[10], 'table') then _ctl[10] := table() end if; _ctl[2] := _y0[0]; _ctl[3] := _y0[0]; _ctl[16] := 0.; _ctl[17] := 0; _ctl[18] := 1; _ctl[19] := 1; for _i to _n+nops(_pars) do _ctl[14][_i, 0] := _y0[_i] end do; if _Env_smart_dsolve_numeric = true then procname("right") := _xout; procname("left") := _xout end if; if _xout = "initial" then return [seq(_yini[_i], _i = 0 .. _n)] elif _xout = "parameters" then return [seq(_yini[_n+_i], _i = 1 .. nops(_pars))] else return [seq(_yini[_i], _i = 0 .. _n)], [seq(_yini[_n+_i], _i = 1 .. nops(_pars))] end if else return "procname" end if end if; if _xout-_y0[0] = 0. then return [seq(evalf(_y0[_i]), _i = 0 .. _n)] end if; _reinit := false; if _xin <> "last" then if 0 < 0 and `dsolve/numeric/checkglobals`(0, table( [ ] ), _pars, _n, _yini) then _reinit := true; if _pars <> [] then _par := {seq(rhs(_pars[_i]) = _yini[_n+_i], _i = 1 .. nops(_pars))}; for _i from 0 to _n do _y0[_i] := subs(_par, _yini[_i]) end do; for _i from _n+1 to _n+nops(_pars) do _y0[_i] := _yini[_i] end do; if _ctl[9] = 2 then _ctl[11] := subs(_par, _ctl[21]) end if else for _i from 0 to _n do _y0[_i] := _yini[_i] end do end if end if; if _pars <> [] and select(type, {seq(_yini[_n+_i], _i = 1 .. nops(_pars))}, 'undefined') <> {} then error "parameters must be initialized before solution can be computed" end if end if; if _EnvInFsolve <> true and not _reinit and _ctl[17] = 0 and _xout-_ctl[3] = 0 then [_xout, seq(_yn[_i], _i = 1 .. _n)] else userinfo(3, {`dsolve/numeric`, `dsolve/continuation`}, `Continuation check: new point=`, _xout, `	previous point=`, _ctl[2], false, _reinit, _ctl[17], _ctl[16]); if _reinit or _ctl[17] <> 0 or _ctl[16] = 0. or sign(_ctl[16]) <> sign(_xout-_ctl[2]) or abs(_xout-_y0[0]) < abs(_xout-_ctl[2]) then userinfo(3, {`dsolve/numeric`, `dsolve/continuation`}, `Continuation check: restart from ICs`); for _i to _n+nops(_pars) do _ctl[14][_i, 0] := _y0[_i] end do; _ctl[2] := _y0[0]; _ctl[16] := 0.; _ctl[17] := 0; _ctl[18] := 1; _ctl[19] := 1 else userinfo(3, {`dsolve/numeric`, `dsolve/continuation`}, `Continuation check: continue solution`) end if; _ctl[3] := _xout; `dsolve/numeric/taylorseries`(x, _ctl, _yn); if _Env_smart_dsolve_numeric = true then if _y0[0] < _xout and procname("right") < _xout then procname("right") := _xout elif _xout < _y0[0] and _xout < procname("left") then procname("left") := _xout end if end if; if _EnvInFsolve = true then [_xout, seq(evalf[_EnvDSNumericSaveDigits](_yn[_i]), _i = 1 .. _n)] else [_xout, seq(evalf(_yn[_i]), _i = 1 .. _n)] end if end if end proc, (2) = Array(0..0, {}), (3) = [x, f(x), u(x)], (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_taylorseries, ["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_taylorseries, '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_taylorseries, ["last", 'last', "initial", 'initial', "parameters", 'parameters', "initial_and_parameters", 'initial_and_parameters', NULL]) then _xout := convert(x_taylorseries, '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_taylorseries), 'string') = rhs(x_taylorseries); 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_taylorseries), 'string') = rhs(x_taylorseries)) elif _xout = "solnprocedure" then return eval(_solnproc) elif _xout = "sysvars" then return _vars end if; if procname <> unknown then return ('procname')(x_taylorseries) else _ndsol := 1; _ndsol := _ndsol; _ndsol := pointto(_dat[2][0]); return ('_ndsol')(x_taylorseries) end if end if; try _res := _solnproc(_xout); [seq(_vars[_i+1] = _res[_i+1], _i = 0 .. _n)] catch: error  end try end proc

 

 

 

 

 


 

Download 2_graphs.mw

You can use the  ContoursWithLabels  procedure from the post  https://www.mapleprimes.com/posts/202222-Contour-Curves-With-Labels  for labelling. For convenience, I have included the text of this procedure in the worksheet below:

 

restart;
ContoursWithLabels := proc (Expr, Range1::(range(realcons)), Range2::(range(realcons)), Number::posint := 8, S::(set(realcons)) := {}, GraphicOptions::list := [color = black, axes = box], Coloring::`=` := NULL)
local r1, r2, L, f, L1, h, S1, P, P1, r, M, C, T, p, p1, m, n, A, B, E;
uses plots, plottools;
f := unapply(Expr, x, y);
if S = {} then r1 := rand(convert(Range1, float)); r2 := rand(convert(Range2, float));
L := [seq([r1(), r2()], i = 1 .. 205)];
L1 := convert(sort(select(a->type(a, realcons), [seq(f(op(t)), t = L)]), (a, b) ->is(abs(a) < abs(b))), set);
h := (L1[-6]-L1[1])/Number;
S1 := [seq(L1[1]+(1/2)*h+h*(n-1), n = 1 .. Number)] else
S1 := convert(S, list)  fi;
print(Contours = evalf[2](S1));
r := k->rand(20 .. k-20); M := []; T := [];
for C in S1 do
P := implicitplot(Expr = C, x = Range1, y = Range2, op(GraphicOptions), gridrefine = 3);
P1 := [getdata(P)];
for p in P1 do
p1 := convert(p[3], listlist); n := nops(p1);
if n < 500 then m := `if`(40 < n, (r(n))(), round((1/2)*n)); M := `if`(40 < n, [op(M), p1[1 .. m-11], p1[m+11 .. n]], [op(M), p1]); T := [op(T), [op(p1[m]), evalf[2](C)]] else
if 500 <= n then h := floor((1/2)*n); m := (r(h))(); M := [op(M), p1[1 .. m-11], p1[m+11 .. m+h-11], p1[m+h+11 .. n]]; T := [op(T), [op(p1[m]), evalf[2](C)], [op(p1[m+h]), evalf[2](C)]]
fi; fi; od; od;
A := plot(M, op(GraphicOptions));
B := plots:-textplot(T);
if Coloring = NULL then E := NULL else E := ([plots:-densityplot])(Expr, x = Range1, y = Range2, op(rhs(Coloring)))  fi;
display(E, A, B);
end proc:

A3 := 0.1098129220e-1*x-0.1864590943e-1*x^4-0.3780537764e-1+0.5300456762e-1*x^2-0.2252843255e-4*x^7*sin(6.280000000*y-.2083809520)-0.9011373022e-5*x^7*sin(6.280000000*y-1.256000000)-0.1569010873e-4*x^6*sin(6.280000000*y-.2083809520)-0.6276043495e-5*x^6*sin(6.280000000*y-1.256000000)-0.1462906959e-2*x^5*sin(6.280000000*y-1.256000000)-0.3657267398e-2*x^5*sin(6.280000000*y-.2083809520)-0.7271311325e-3*x^4*sin(6.280000000*y-1.256000000)-0.1817827831e-2*x^4*sin(6.280000000*y-.2083809520)-0.8684412118e-1*x^3*sin(6.280000000*y-1.256000000)-.2171103030*x^3*sin(6.280000000*y-.2083809520)-0.2589262297e-1*x^2*sin(6.280000000*y-1.256000000)-0.6473155744e-1*x^2*sin(6.280000000*y-.2083809520)+.3752380081*x*sin(6.280000000*y-1.256000000)+.9380950203*x*sin(6.280000000*y-.2083809520)+0.3750477138e-1*sin(6.280000000*y-1.256000000)+0.9376192845e-1*sin(6.280000000*y-.2083809520)-0.3550918239e-3*x^6-0.760666870e-4*x^5+0.1713654921e-5*x^7-0.7811069699e-2*x^3-3.822344860*10^(-8)*x^8;


# Your example

ContoursWithLabels(A3, -2 .. 2, 0 .. 2, {seq(-2..2,0.2)}, [color = black, thickness = 2, axes = box, size=[1000,500], scaling=constrained], Coloring = [colorstyle = HUE, colorscheme = ["Blue", "Green", "Yellow", "Red"], style = surface]);

0.1098129220e-1*x-0.3780537764e-1-0.1864590943e-1*x^4+0.5300456762e-1*x^2+0.1713654921e-5*x^7+0.9376192845e-1*sin(6.280000000*y-.2083809520)+0.3750477138e-1*sin(6.280000000*y-1.256000000)-0.3550918239e-3*x^6-0.760666870e-4*x^5-0.7811069699e-2*x^3-0.3822344860e-7*x^8-0.2252843255e-4*x^7*sin(6.280000000*y-.2083809520)-0.9011373022e-5*x^7*sin(6.280000000*y-1.256000000)-0.1569010873e-4*x^6*sin(6.280000000*y-.2083809520)-0.6276043495e-5*x^6*sin(6.280000000*y-1.256000000)-0.1462906959e-2*x^5*sin(6.280000000*y-1.256000000)-0.3657267398e-2*x^5*sin(6.280000000*y-.2083809520)-0.7271311325e-3*x^4*sin(6.280000000*y-1.256000000)-0.1817827831e-2*x^4*sin(6.280000000*y-.2083809520)-0.8684412118e-1*x^3*sin(6.280000000*y-1.256000000)-.2171103030*x^3*sin(6.280000000*y-.2083809520)-0.2589262297e-1*x^2*sin(6.280000000*y-1.256000000)-0.6473155744e-1*x^2*sin(6.280000000*y-.2083809520)+.3752380081*x*sin(6.280000000*y-1.256000000)+.9380950203*x*sin(6.280000000*y-.2083809520)

 

Contours = [-2., -1.8, -1.6, -1.4, -1.2, -1.0, -.8, -.6, -.4, -.2, 0., .2, .4, .6, .8, 1.0, 1.2, 1.4, 1.6, 1.8, 2.0]

 

 

 


Of course, you can change the color scheme and other parameters as you wish.

 

Download ContoursWithLabels1.mw

Here is an example of how to do this:
 

R:=solve(x^5+2*x-1);

RootOf(_Z^5+2*_Z-1, index = 1), RootOf(_Z^5+2*_Z-1, index = 2), RootOf(_Z^5+2*_Z-1, index = 3), RootOf(_Z^5+2*_Z-1, index = 4), RootOf(_Z^5+2*_Z-1, index = 5)

(1)

k:=0:
for r in R do
if is(r>0) and is(r<1) then k:=k+1; S[k]:=r fi;
od:
S:=convert(S, list);
evalf[20](S);

[RootOf(_Z^5+2*_Z-1, index = 1)]

 

[.48638903593454300002]

(2)

 


 

Download pick.mw

Here is another approach that directly generalizes the  coeff  command to the case of polynomials in several variables:
 

restart;

coefff:=proc(P,T::{list,set}(name),t)
local L,H,i,k:
L:=[coeffs(P,T,'h')]: H:=[h]: k:=0:
for i from 1 to nops(H) do
if H[i]=t then k:=L[i] fi:
od:
k;
end proc:


Examples of use

F:= 2*x+6*y+4*x^2+12*x*y-5*y^2;

F := 4*x^2+12*x*y-5*y^2+2*x+6*y

(1)

coefff(F,{x,y},x);
coefff(F,{x,y},x^2);
coefff(F,{x,y},x*y);

2

4

12

(2)

Q:=x^3-3*x^2*y*z+4*z^5;
coefff(Q,[x,y,z],z);
coefff(Q,[x,y,z],x^2*y*z);
coefff(Q,[x,y,z],x^3);
coefff(Q,[x,y,z],z^5);

Q := 4*z^5-3*x^2*y*z+x^3

0

-3

1

4

(3)

 


 

Download coefff.mws

The plot shows that your function (Ackley function for 2 variables) has a large number of critical points (at which both partial derivatives are equal to 0), among which there are points of a local minimum, maximum, and also saddle points. You can investigate each specific critical point using  Student:-MultivariateCalculus:-SecondDerivativeTest  command. Thus, the problem boils down to finding a sufficiently large number of critical points. Of course, the best option is to use DirectSearch package (vv"s suggestion). But if you do not have this package installed, you can use thу above command, having previously built the curves to find the necessary ranges for using  fsolve  command. See the worksheet below for critical points in the ranges  x=0..1, y=0..1.


 

restart;
f:=(x,y)->-20*exp(-0.2*sqrt(0.5*(x^2+y^2)))-exp(0.5*(cos(2*Pi*x)+cos(2*Pi*y)))+exp(1)+20;

proc (x, y) options operator, arrow; -20*exp(-.2*sqrt(.5*x^2+.5*y^2))-exp(.5*(cos(2*Pi*x)+cos(2*Pi*y)))+exp(1)+20 end proc

(1)

plot3d(f(x,y), x=-3..3, y=-3..3, style=surface, grid=[100,100]);

 

plots:-implicitplot([diff(f(x,y),x),diff(f(x,y),y)], x=0..1, y=0..1, color=[red,blue], gridrefine=3);

 

P1:=fsolve({diff(f(x,y),x),diff(f(x,y),y)},{x=0.6..0.8, y=0.6..0.8});
P2:=fsolve({diff(f(x,y),x),diff(f(x,y),y)},{x=0.9..1, y=0.9..1});
P3:=fsolve({diff(f(x,y),x),diff(f(x,y),y)},{x=0.5..0.7, y=0.8..1});
P4:=fsolve({diff(f(x,y),x),diff(f(x,y),y)},{x=0.8..1, y=0.5..0.7});

{x = .6730965200, y = .6730965200}

 

{x = .9684776586, y = .9684776586}

 

{x = .5774125352, y = .8747620388}

 

{x = .8747620388, y = .5774125352}

(2)

with(Student[MultivariateCalculus]):
SecondDerivativeTest(f(x,y), [x, y] = eval([x,y],P1));
SecondDerivativeTest(f(x,y), [x, y] = eval([x,y],P2));
SecondDerivativeTest(f(x,y), [x, y] = eval([x,y],P3));
SecondDerivativeTest(f(x,y), [x, y] = eval([x,y],P4));

LocalMin = [], LocalMax = [[.6730965200, .6730965200]], Saddle = []

 

LocalMin = [[.9684776586, .9684776586]], LocalMax = [], Saddle = []

 

LocalMin = [], LocalMax = [], Saddle = [[.5774125352, .8747620388]]

 

LocalMin = [], LocalMax = [], Saddle = [[.8747620388, .5774125352]]

(3)

plot3d(f(x,y), x=0..1.1, y=0..1.1, view=2..6, grid=[100,100], axes=normal, orientation=[25,75]);  # The visual check

 

 


 

Download saddle_points.mw

First 56 57 58 59 60 61 62 Last Page 58 of 290