MaplePrimes Questions

Search Questions:


A classical probability result says that if G1 and G2 are two independent Gamma random variables with same scale parameter (let's say 1 to simplify) and shape parameters a1 and a2 respectively, then Gk / (G1 + G2 ) is a Beta random variable with parameters (ak , a3-k ) (k=1..2).

In the attached file it is shown that (Maple 2015) function Statistics:-PDF fails in computing the PDF of Gk.
Noting strange here if you observe that even in the extremely simple case Z = X / (X+Y), where both X and Y are independent Uniform random variable with support [0, 1), Maple 2015 already fails in computing PDF(Z).

An alternative to Statistics:-PDF is to write explicitely the double integration which defines CDF(Z) (to begin with, and later PDF(Gk)) and ask Maple to do the integrations.
This approach works for Z but requires helping Maple when X and Y are still independent Uniform random variables but with respective non instanciated supports [0, a1) and [0, a2).

Applying to the Gamma-Gamma case the recipies I introduced in the Uniform-Uniform case does not give any result, unless in the very particular case where the shape parameters a1 and a2 are (strictly) positive integers.

All the details are in X_over_(X_plus_Y).mw

Do you have any idea how to prove with Maple the probability result mentioned at the head of this question?

PS: The "classical method" to do compute PDF(Z) consists in changing the integration variables < x1, x2 > into < x1 = v1v2, x2 = v2 (1-v1) > (see for instance Stack exchange)... but even after having dome it I still cannot get the desired result.

Thanks in advance.

Hi,

I use Maple 2024 (X86 64 LINUX), and am trying to calculate the sum of the prime factors of integers.

My code is as simple as something like this:

SumPrimeFactors := proc(n)
    local f, L, p;
    f := ifactor(n);
    L := [op(f)];
    return add(convert(op(1, p), integer), p in L);  # Sum base primes
end proc:

However, the above code returns the following result when I set n = 360:

> SumPrimeFactors(360);
                                     5 +  (2) +  (3)

while what I had expected is just an integer, 10 (= 5+2+3).
It seems the operation convert(op(1, p), integer) is not working properly, and "(2)" is recognized as an expression, not an integer, even after the convert operation.

I have no idea how I should rectiy it.
I would be glad if someone gives me a way to get it solved.
Thank you very much.

I encountered a strange issue during running in Maple. Is it possible for the comparison table to display values exceeding 8 GB when the system has only 8 GB of RAM? Is this an inconsistency?

Hi everyone,  I am trying to generate tables and bar graphs of the Nusselt number, but I am encountering an error in my Maple sheet. Some of the table values are being generated, but how can I check if they are correct, and how can I draw their bar graphs? Moreover, if I want to create a 3D view, is it possible? Could anyone please have a look and help me?

Bar_Graphs.mw


Is there any difference in the algorithm used to compute reduced Gröbner bases (via the Basis command) between Maple 18 and the newest version of Maple? Have there been any significant optimizations, changes to default strategies, or efficiency improvements?

I am trying to use Maple to view some 120,000 x 120,000 matrices with rational entries on a linux box with 504GB of RAM. Unfortunately when I run the command

read "/home/user/source_file.txt"

maple issues an Execution stopped: Stack limit reached error. Running the kernelopts command seems to indicate that the default stack limit is 8160 on this system. I have tried setting

kernelopts(stacklimit=13560)

but the same error is always issued at around 7 GB of RAM usage (according to htop). Is there any way around this in Maple?

How to solve the given system of equations using the collocation method. I already tried numerical method. 

Kindly help me.

restart:

with(plots):

M := 0.1e-1;

0.1e-1

 

6.3

 

1

(1)

de1 := diff(y(x), `$`(x, 3))+y(x)*(diff(y(x), `$`(x, 2)))-(diff(y(x), `$`(x, 2)))^2-M*(diff(y(x), x)) = 0;

diff(diff(diff(y(x), x), x), x)+y(x)*(diff(diff(y(x), x), x))-(diff(diff(y(x), x), x))^2-0.1e-1*(diff(y(x), x)) = 0

(2)

de2 := (diff(z(x), `$`(x, 2)))/Pr+y(x)*(diff(z(x), x))+Hs*z(x) = 0

.1587301587*(diff(diff(z(x), x), x))+y(x)*(diff(z(x), x))+z(x) = 0

(3)

bc := y(0) = 0, (D(y))(0) = 1, (D(y))(5) = 0, z(0) = 1, z(5) = 0;

y(0) = 0, (D(y))(0) = 1, (D(y))(5) = 0, z(0) = 1, z(5) = 0

(4)

sol := dsolve(eval([de1, de2, bc]), 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(50, {(1) = .0, (2) = 0.538450712436539e-1, (3) = .1082766859915131, (4) = .16331444031270473, (5) = .2189790463606035, (6) = .2752924234461127, (7) = .33227779889470094, (8) = .38995982000331736, (9) = .4483646786278111, (10) = .5075202501873479, (11) = .5674562491788733, (12) = .6282044036635384, (13) = .6897986516330131, (14) = .7524176453724036, (15) = .816715733668989, (16) = .8829036702135253, (17) = .9511585880378444, (18) = 1.0216871515791115, (19) = 1.0947329467114486, (20) = 1.170586433436612, (21) = 1.2495986390793312, (22) = 1.3322004686809672, (23) = 1.4189307352844525, (24) = 1.5100425310518173, (25) = 1.605556044446249, (26) = 1.706170701849191, (27) = 1.8128032039007311, (28) = 1.9266829029680352, (29) = 2.049525210932362, (30) = 2.1836360719075385, (31) = 2.3285917464945434, (32) = 2.485839068288575, (33) = 2.6591632259916818, (34) = 2.8548144648261875, (35) = 3.0721020019341, (36) = 3.305701178649673, (37) = 3.559949463816246, (38) = 3.7970789219278824, (39) = 3.990153302379728, (40) = 4.15720355507037, (41) = 4.306208343595448, (42) = 4.427174986030093, (43) = 4.526423733667591, (44) = 4.612636841962476, (45) = 4.689904237648306, (46) = 4.7605405732587975, (47) = 4.826006890793816, (48) = 4.88729546673539, (49) = 4.945116721690995, (50) = 5.0}, datatype = float[8], order = C_order); Y := Matrix(50, 5, {(1, 1) = .0, (1, 2) = 1.0, (1, 3) = -1.016912631477338, (1, 4) = 1.0, (1, 5) = 4.938383111325546, (2, 1) = 0.5239768838140454e-1, (2, 2) = .9467292622483128, (2, 3) = -.9622772113928727, (2, 4) = 1.2552137152775404, (2, 5) = 4.513346170739063, (3, 1) = .10253029316475297, (3, 2) = .895783706943777, (3, 3) = -.9101344320647631, (3, 4) = 1.4856388355002517, (3, 5) = 3.9305405877166715, (4, 1) = .1504792351703645, (4, 2) = .8470745536097423, (4, 3) = -.860373451742725, (4, 4) = 1.6829551945815935, (4, 5) = 3.223524805389885, (5, 1) = .19632323217740202, (5, 2) = .8005166268083528, (5, 3) = -.8128903023040563, (5, 4) = 1.8406334092867063, (5, 5) = 2.4329926016781056, (6, 1) = .24013840636663933, (6, 2) = .75602811722521, (6, 3) = -.7675871163117387, (6, 4) = 1.9543101701250922, (6, 5) = 1.6030729437227047, (7, 1) = .2819983835793791, (7, 2) = .7135303716905912, (7, 3) = -.7243714778269336, (7, 4) = 2.021973234344372, (7, 5) = .7775670166921098, (8, 1) = .3219743854445238, (8, 2) = .6729477074610013, (8, 3) = -.6831558741457402, (8, 4) = 2.04395171767529, (8, 5) = -0.34653255090257517e-2, (9, 1) = .36013531525388137, (9, 2) = .6342072469341395, (9, 3) = -.6438572302054374, (9, 4) = 2.0227281462789084, (9, 5) = -.7064433677651218, (10, 1) = .3965478383244555, (10, 2) = .5972387696518396, (10, 3) = -.6063965109971585, (10, 4) = 1.9626055145558932, (10, 5) = -1.3061198107940517, (11, 1) = .4312764574697176, (11, 2) = .5619745789945647, (11, 3) = -.5706983801552904, (11, 4) = 1.8692736251817776, (11, 5) = -1.786473233829117, (12, 1) = .46438358410487035, (12, 2) = .528349381415236, (12, 3) = -.5366909051394194, (12, 4) = 1.7493236289925442, (12, 5) = -2.1406810006817762, (13, 1) = .49592960543014786, (13, 2) = .49630017642071433, (13, 3) = -.5043053012120328, (13, 4) = 1.6097582709295248, (13, 5) = -2.3703112091517946, (14, 1) = .5260392137265275, (14, 2) = .46569879325333513, (14, 3) = -.4734077198356524, (14, 4) = 1.4571855527545918, (14, 5) = -2.4840706437151705, (15, 1) = .5550249899686894, (15, 2) = .4362259970506212, (15, 3) = -.44367242988215233, (15, 4) = 1.2966009526912445, (15, 5) = -2.4948251356156317, (16, 1) = .582947323077621, (16, 2) = .4078186772916242, (16, 3) = -.41503308219069956, (16, 4) = 1.133618168947713, (16, 5) = -2.4170112399060972, (17, 1) = .6098379764681325, (17, 2) = .3804427617884565, (17, 3) = -.3874529846540737, (17, 4) = .9734125833836331, (17, 5) = -2.267713799142949, (18, 1) = .6357288212995027, (18, 2) = .35406397565685854, (18, 3) = -.3608955340280772, (18, 4) = .8203928722713415, (18, 5) = -2.0653717123140347, (19, 1) = .6606520558243368, (19, 2) = .32864756458000216, (19, 3) = -.33532390992055233, (19, 4) = .6780764948146691, (19, 5) = -1.8284211343980543, (20, 1) = .6846405020881483, (20, 2) = .30415792526822016, (20, 3) = -.310700681058048, (20, 4) = .5490330762061609, (20, 5) = -1.5741295655423746, (21, 1) = .7077280179775027, (21, 2) = .2805580974006707, (21, 3) = -.2869872780487047, (21, 4) = .4348909698491685, (21, 5) = -1.3176869854655087, (22, 1) = .7299500860736533, (22, 2) = .25780904339388555, (22, 3) = -.2641432592769831, (22, 4) = .33639815254557953, (22, 5) = -1.071588245625372, (23, 1) = .7513446824807472, (23, 2) = .2358685927532746, (23, 3) = -.2421252475321414, (23, 4) = .2535257527268136, (23, 5) = -.845310470542935, (24, 1) = .7718600373416271, (24, 2) = .2147861043754655, (24, 3) = -.2209818389817886, (24, 4) = .18588236390672697, (24, 5) = -.6461214157898081, (25, 1) = .7913984364444584, (25, 2) = .1946582172929835, (25, 3) = -.20080896597698863, (25, 4) = .13250101521230842, (25, 5) = -.47835610933187955, (26, 1) = .8100007854235601, (26, 2) = .1754386620756086, (26, 3) = -.18155930417548316, (26, 4) = 0.9154569608003324e-1, (26, 5) = -.3421381651798363, (27, 1) = .8277118076501322, (27, 2) = .15707596816855374, (27, 3) = -.16318052643948905, (27, 4) = 0.6105466126293412e-1, (27, 5) = -.23553722921336775, (28, 1) = .8445805217874315, (28, 2) = .13951234873701424, (28, 3) = -.14561421333147123, (28, 4) = 0.39087681110023476e-1, (28, 5) = -.15525672367643156, (29, 1) = .8606634863301678, (29, 2) = .12267930610986412, (29, 3) = -.12879150739256892, (29, 4) = 0.23832991063636576e-1, (29, 5) = -0.9724838130607329e-1, (30, 1) = .8760079352865905, (30, 2) = .10651370141941992, (30, 3) = -.1126492397968819, (30, 4) = 0.13691444825679132e-1, (30, 5) = -0.5727653723318041e-1, (31, 1) = .8903192581096104, (31, 2) = 0.9131052167272624e-1, (31, 3) = -0.9748175032923309e-1, (31, 4) = 0.74131272943985405e-2, (31, 5) = -0.3172088613075896e-1, (32, 1) = .9035329750439559, (32, 2) = 0.7712276927556598e-1, (32, 3) = -0.8334133909913169e-1, (32, 4) = 0.3755698608845979e-2, (32, 5) = -0.1640104680740198e-1, (33, 1) = .9157173948547132, (33, 2) = 0.6385549523046109e-1, (33, 3) = -0.7013295494960084e-1, (33, 4) = 0.17491668487648983e-2, (33, 5) = -0.7780056793655609e-2, (34, 1) = .9269514730577374, (34, 2) = 0.51386320628059305e-1, (34, 3) = -0.57734884774429875e-1, (34, 4) = 0.7271289957321933e-3, (34, 5) = -0.32884474837452868e-2, (35, 1) = .9368471128429581, (35, 2) = 0.4010243173621042e-1, (35, 3) = -0.4653193161278045e-1, (35, 4) = 0.27013268380656147e-3, (35, 5) = -0.12396732969434932e-2, (36, 1) = .9450380185477333, (36, 2) = 0.30399509190318585e-1, (36, 3) = -0.36915005251636664e-1, (36, 4) = 0.9182614553853198e-4, (36, 5) = -0.42674003103921183e-3, (37, 1) = .9516679912394145, (37, 2) = 0.22101471191290013e-1, (37, 3) = -0.28706677187926227e-1, (37, 4) = 0.27971094145282712e-4, (37, 5) = -0.1315582904251911e-3, (38, 1) = .9561612871284315, (38, 2) = 0.16032468497041725e-1, (38, 3) = -0.22716201697191084e-1, (38, 4) = 0.9108284297335907e-5, (38, 5) = -0.4337758039619726e-4, (39, 1) = .958858965635045, (39, 2) = 0.12038500162795706e-1, (39, 3) = -0.18782005182342264e-1, (39, 4) = 0.3608857075468415e-5, (39, 5) = -0.17441599450102097e-4, (40, 1) = .9606217197165348, (40, 2) = 0.914514325386327e-2, (40, 3) = -0.1593723322791538e-1, (40, 4) = 0.15973572885621025e-5, (40, 5) = -0.7881196067433009e-5, (41, 1) = .9618157889669987, (41, 2) = 0.693594504796013e-2, (41, 3) = -0.13768928625667299e-1, (41, 4) = 0.7578240406846033e-6, (41, 5) = -0.3856388483481057e-5, (42, 1) = .9625579336916471, (42, 2) = 0.53653148882890234e-2, (42, 3) = -0.12229837199143657e-1, (42, 4) = 0.40466831691457055e-6, (42, 5) = -0.21455723871656463e-5, (43, 1) = .9630321047416508, (43, 2) = 0.4208610204678467e-2, (43, 3) = -0.11097927826763769e-1, (43, 4) = 0.23599512230457527e-6, (43, 5) = -0.13185086023573497e-5, (44, 1) = .9633548330674003, (44, 2) = 0.3291032013106795e-2, (44, 3) = -0.10201119562353245e-1, (44, 4) = 0.14351096807189318e-6, (44, 5) = -0.8585799100739333e-6, (45, 1) = .9635794225798572, (45, 2) = 0.25318181431538732e-2, (45, 3) = -0.9459930001639555e-2, (45, 4) = 0.8857046151520711e-7, (45, 5) = -0.5807183930298681e-6, (46, 1) = .9637351936467563, (46, 2) = 0.18861028334058306e-2, (46, 3) = -0.8830217058260243e-2, (46, 4) = 0.54176953171370387e-7, (46, 5) = -0.40321204700634103e-6, (47, 1) = .9638401434562422, (47, 2) = 0.1326072836040432e-2, (47, 3) = -0.828462376949864e-2, (47, 4) = 0.318508859340672e-7, (47, 5) = -0.28512654551555526e-6, (48, 1) = .9639061617395365, (48, 2) = 0.8331693356556849e-3, (48, 3) = -0.7804900784463723e-2, (48, 4) = 0.16983012204335007e-7, (48, 5) = -0.20411108581207533e-6, (49, 1) = .963941530746681, (49, 2) = 0.39433359612162176e-3, (49, 3) = -0.7378210574196815e-2, (49, 4) = 0.69058956940428584e-8, (49, 5) = -0.14716673870893628e-6, (50, 1) = .963952255758426, (50, 2) = .0, (50, 3) = -0.6995152048687603e-2, (50, 4) = .0, (50, 5) = -0.10635754806174274e-6}, datatype = float[8], order = C_order); YP := Matrix(50, 5, {(1, 1) = 1.0, (1, 2) = -1.016912631477338, (1, 3) = 1.0441113000581643, (1, 4) = 4.938383111325546, (1, 5) = -6.300000001197, (2, 1) = .9467292622483128, (2, 2) = -.9622772113928727, (2, 3) = .9858658256476173, (2, 4) = 4.513346170739063, (2, 5) = -9.397726517168355, (3, 1) = .895783706943777, (3, 2) = -.9101344320647631, (3, 3) = .9306188716382228, (3, 4) = 3.9305405877166715, (3, 5) = -11.898421382065955, (4, 1) = .8470745536097423, (4, 2) = -.860373451742725, (4, 3) = .8781815609789202, (4, 4) = 3.223524805389885, (4, 5) = -13.658581076246108, (5, 1) = .8005166268083528, (5, 2) = -.8128903023040563, (5, 3) = .8283850614020614, (5, 4) = 2.4329926016781056, (5, 5) = -14.605204201259696, (6, 1) = .75602811722521, (6, 2) = -.7675871163117387, (6, 3) = .7810774091586878, (6, 4) = 1.6030729437227047, (6, 5) = -14.737398181156987, (7, 1) = .7135303716905912, (7, 2) = -.7243714778269336, (7, 3) = .736120927464283, (7, 4) = .7775670166921098, (7, 5) = -14.11984902259275, (8, 1) = .6729477074610013, (8, 2) = -.6831558741457402, (8, 3) = .6933901181953316, (8, 4) = -0.34653255090257517e-2, (8, 5) = -12.86986662367746, (9, 1) = .6342072469341395, (9, 2) = -.6438572302054374, (9, 3) = .6527699319356851, (9, 4) = -.7064433677651218, (9, 5) = -11.140371532431427, (10, 1) = .5972387696518396, (10, 2) = -.6063965109971585, (10, 3) = .6141543418494605, (10, 4) = -1.3061198107940517, (10, 5) = -9.101399121783686, (11, 1) = .5619745789945647, (11, 2) = -.5706983801552904, (11, 3) = .5774451625788978, (11, 4) = -1.786473233829117, (11, 5) = -6.922501599763635, (12, 1) = .528349381415236, (12, 2) = -.5366909051394194, (12, 3) = .5425510675586522, (12, 4) = -2.1406810006817762, (12, 5) = -4.757927035769672, (13, 1) = .49630017642071433, (13, 2) = -.5043053012120328, (13, 3) = .5093867676411815, (13, 4) = -2.3703112091517946, (13, 5) = -2.7357798403575755, (14, 1) = .46569879325333513, (14, 2) = -.4734077198356524, (14, 3) = .47780288184693964, (14, 4) = -2.4840706437151705, (14, 5) = -.9479420024892491, (15, 1) = .4362259970506212, (15, 2) = -.44367242988215233, (15, 3) = .44745677095276526, (15, 4) = -2.4948251356156317, (15, 5) = .5549628621234142, (16, 1) = .4078186772916242, (16, 2) = -.41503308219069956, (16, 3) = .4182730703373508, (16, 4) = -2.4170112399060972, (16, 5) = 1.7348439985152488, (17, 1) = .3804427617884565, (17, 2) = -.3874529846540737, (17, 3) = .39020778707321313, (17, 4) = -2.267713799142949, (17, 5) = 2.5800100903859544, (18, 1) = .35406397565685854, (18, 2) = -.3608955340280772, (18, 3) = .36321791869790376, (18, 4) = -2.0653717123140347, (18, 5) = 3.10352774783306, (19, 1) = .32864756458000216, (19, 2) = -.33532390992055233, (19, 3) = .3372610306662744, (19, 4) = -1.8284211343980543, (19, 5) = 3.338204225824109, (20, 1) = .30415792526822016, (20, 2) = -.310700681058048, (20, 3) = .31229476274132867, (20, 4) = -1.5741295655423746, (20, 5) = 3.3306826139938144, (21, 1) = .2805580974006707, (21, 2) = -.2869872780487047, (21, 3) = .28827621621397953, (21, 4) = -1.3176869854655087, (21, 5) = 3.135340081336959, (22, 1) = .25780904339388555, (22, 2) = -.2641432592769831, (22, 3) = .2651611467004155, (22, 4) = -1.071588245625372, (22, 5) = 2.8085890119139396, (23, 1) = .2358685927532746, (23, 2) = -.2421252475321414, (23, 3) = .2429028386476426, (23, 4) = -.845310470542935, (23, 5) = 2.4040407789305567, (24, 1) = .2147861043754655, (24, 2) = -.2209818389817886, (24, 3) = .2215478846918326, (24, 4) = -.6461214157898081, (24, 5) = 1.9708474985101825, (25, 1) = .1946582172929835, (25, 2) = -.20080896597698863, (25, 3) = .20119072468789445, (25, 4) = -.47835610933187955, (25, 5) = 1.5502363494870965, (26, 1) = .1754386620756086, (26, 2) = -.18155930417548316, (26, 3) = .18178134653653813, (26, 4) = -.3421381651798363, (26, 5) = 1.1691948647879093, (27, 1) = .15707596816855374, (27, 2) = -.16318052643948905, (27, 3) = .163265092403284, (27, 4) = -.23553722921336775, (27, 5) = .843584392498727, (28, 1) = .13951234873701424, (28, 2) = -.14561421333147123, (28, 3) = .14558155088667368, (28, 4) = -.15525672367643156, (28, 5) = .579846478687003, (29, 1) = .12267930610986412, (29, 2) = -.12879150739256892, (29, 3) = .12866019319975472, (29, 4) = -0.9724838130607329e-1, (29, 5) = .3771503810083066, (30, 1) = .10651370141941992, (30, 2) = -.1126492397968819, (30, 3) = .11243661620708013, (30, 4) = -0.5727653723318041e-1, (30, 5) = .22984451471051648, (31, 1) = 0.9131052167272624e-1, (31, 2) = -0.9748175032923309e-1, (31, 3) = 0.9720567649632728e-1, (31, 4) = -0.3172088613075896e-1, (31, 5) = .13122010765127654, (32, 1) = 0.7712276927556598e-1, (32, 2) = -0.8334133909913169e-1, (32, 3) = 0.8301865455597775e-1, (32, 4) = -0.1640104680740198e-1, (32, 5) = 0.6969808445659362e-1, (33, 1) = 0.6385549523046109e-1, (33, 2) = -0.7013295494960084e-1, (33, 3) = 0.697791531221788e-1, (33, 4) = -0.7780056793655609e-2, (33, 5) = 0.3386354889433578e-1, (34, 1) = 0.51386320628059305e-1, (34, 2) = -0.57734884774429875e-1, (34, 3) = 0.5736461661467379e-1, (34, 4) = -0.32884474837452868e-2, (34, 5) = 0.14622944136188972e-1, (35, 1) = 0.4010243173621042e-1, (35, 2) = -0.4653193161278045e-1, (35, 3) = 0.4615955076341791e-1, (35, 4) = -0.12396732969434932e-2, (35, 5) = 0.5614885492478633e-2, (36, 1) = 0.30399509190318585e-1, (36, 2) = -0.36915005251636664e-1, (36, 3) = 0.3655279612231743e-1, (36, 4) = -0.42674003103921183e-3, (36, 5) = 0.19621942697003233e-2, (37, 1) = 0.22101471191290013e-1, (37, 2) = -0.28706677187926227e-1, (37, 3) = 0.2836431384167678e-1, (37, 4) = -0.1315582904251911e-3, (37, 5) = 0.6125409350740502e-3, (38, 1) = 0.16032468497041725e-1, (38, 2) = -0.22716201697191084e-1, (38, 3) = 0.22396703157973173e-1, (38, 4) = -0.4337758039619726e-4, (38, 5) = 0.20391637652164134e-3, (39, 1) = 0.12038500162795706e-1, (39, 2) = -0.18782005182342264e-1, (39, 3) = 0.18482442781990245e-1, (39, 4) = -0.17441599450102097e-4, (39, 5) = 0.8262561468904556e-4, (40, 1) = 0.914514325386327e-2, (40, 2) = -0.1593723322791538e-1, (40, 3) = 0.15655099226423174e-1, (40, 4) = -0.7881196067433009e-5, (40, 5) = 0.3763299224344935e-4, (41, 1) = 0.693594504796013e-2, (41, 2) = -0.13768928625667299e-1, (41, 3) = 0.13502115795304808e-1, (41, 4) = -0.3856388483481057e-5, (41, 5) = 0.18593261137575973e-4, (42, 1) = 0.53653148882890234e-2, (42, 2) = -0.12229837199143657e-1, (42, 3) = 0.11975148890593406e-1, (42, 4) = -0.21455723871656463e-5, (42, 5) = 0.10461587263954827e-4, (43, 1) = 0.4208610204678467e-2, (43, 2) = -0.11097927826763769e-1, (43, 3) = 0.1085291089737409e-1, (43, 4) = -0.13185086023573497e-5, (43, 5) = 0.6512757251742076e-5, (44, 1) = 0.3291032013106795e-2, (44, 2) = -0.10201119562353245e-1, (44, 3) = 0.9964270993547896e-2, (44, 4) = -0.8585799100739333e-6, (44, 5) = 0.4306718669414423e-5, (45, 1) = 0.25318181431538732e-2, (45, 2) = -0.9459930001639555e-2, (45, 3) = 0.9230202345693167e-2, (45, 4) = -0.5807183930298681e-6, (45, 5) = 0.29672863441924835e-5, (46, 1) = 0.18861028334058306e-2, (46, 2) = -0.8830217058260243e-2, (46, 3) = 0.8606824708215374e-2, (46, 4) = -0.40321204700634103e-6, (46, 5) = 0.2106799928695533e-5, (47, 1) = 0.1326072836040432e-2, (47, 2) = -0.828462376949864e-2, (47, 3) = 0.8066948681837108e-2, (47, 4) = -0.28512654551555526e-6, (47, 5) = 0.15306828052634482e-5, (48, 1) = 0.8331693356556849e-3, (48, 2) = -0.7804900784463723e-2, (48, 3) = 0.75924401275222035e-2, (48, 4) = -0.20411108581207533e-6, (48, 5) = 0.11324938030775855e-5, (49, 1) = 0.39433359612162176e-3, (49, 2) = -0.7378210574196815e-2, (49, 3) = 0.7170544922301032e-2, (49, 4) = -0.14716673870893628e-6, (49, 5) = 0.85021168502143e-6, (50, 1) = .0, (50, 2) = -0.6995152048687603e-2, (50, 3) = 0.6791924748889848e-2, (50, 4) = -0.10635754806174274e-6, (50, 5) = 0.6458986698603491e-6}, 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(50, {(1) = .0, (2) = 0.538450712436539e-1, (3) = .1082766859915131, (4) = .16331444031270473, (5) = .2189790463606035, (6) = .2752924234461127, (7) = .33227779889470094, (8) = .38995982000331736, (9) = .4483646786278111, (10) = .5075202501873479, (11) = .5674562491788733, (12) = .6282044036635384, (13) = .6897986516330131, (14) = .7524176453724036, (15) = .816715733668989, (16) = .8829036702135253, (17) = .9511585880378444, (18) = 1.0216871515791115, (19) = 1.0947329467114486, (20) = 1.170586433436612, (21) = 1.2495986390793312, (22) = 1.3322004686809672, (23) = 1.4189307352844525, (24) = 1.5100425310518173, (25) = 1.605556044446249, (26) = 1.706170701849191, (27) = 1.8128032039007311, (28) = 1.9266829029680352, (29) = 2.049525210932362, (30) = 2.1836360719075385, (31) = 2.3285917464945434, (32) = 2.485839068288575, (33) = 2.6591632259916818, (34) = 2.8548144648261875, (35) = 3.0721020019341, (36) = 3.305701178649673, (37) = 3.559949463816246, (38) = 3.7970789219278824, (39) = 3.990153302379728, (40) = 4.15720355507037, (41) = 4.306208343595448, (42) = 4.427174986030093, (43) = 4.526423733667591, (44) = 4.612636841962476, (45) = 4.689904237648306, (46) = 4.7605405732587975, (47) = 4.826006890793816, (48) = 4.88729546673539, (49) = 4.945116721690995, (50) = 5.0}, datatype = float[8], order = C_order); Y := Matrix(50, 5, {(1, 1) = .0, (1, 2) = .0, (1, 3) = 0.15143863606013115e-13, (1, 4) = .0, (1, 5) = 0.5209145281927147e-8, (2, 1) = -0.8264612893080438e-16, (2, 2) = 0.10601022236424583e-14, (2, 3) = 0.13448281300622448e-13, (2, 4) = 0.2531723244828144e-9, (2, 5) = 0.5151764399789821e-8, (3, 1) = -0.9818312986936232e-16, (3, 2) = 0.2024546298845675e-14, (3, 3) = 0.11603414280085763e-13, (3, 4) = 0.5031439996715309e-9, (3, 5) = 0.49505227176451794e-8, (4, 1) = -0.16400920960349306e-15, (4, 2) = 0.22923225644852182e-14, (4, 3) = 0.9858996413953448e-14, (4, 4) = 0.7435382816273587e-9, (4, 5) = 0.4613790921382858e-8, (5, 1) = 0.16695611005256184e-15, (5, 2) = 0.2920750522546946e-14, (5, 3) = 0.8715810892933721e-14, (5, 4) = 0.968257325936286e-9, (5, 5) = 0.4156299767076735e-8, (6, 1) = 0.3785488577501235e-15, (6, 2) = 0.34710943442817573e-14, (6, 3) = 0.7739663648523766e-14, (6, 4) = 0.11717218646887862e-8, (6, 5) = 0.359812314472648e-8, (7, 1) = 0.5735291564092602e-15, (7, 2) = 0.5559621333708256e-14, (7, 3) = 0.64794162714847054e-14, (7, 4) = 0.1349065434755046e-8, (7, 5) = 0.29635492365957813e-8, (8, 1) = 0.7392908645452232e-15, (8, 2) = 0.3999400361865862e-14, (8, 3) = 0.6347742731734012e-14, (8, 4) = 0.14963058193845247e-8, (8, 5) = 0.2279713504762398e-8, (9, 1) = 0.6831780723045333e-15, (9, 2) = 0.5442883341070182e-14, (9, 3) = 0.56555333890748366e-14, (9, 4) = 0.1610546333661808e-8, (9, 5) = 0.15751280801152935e-8, (10, 1) = 0.12805951228799598e-14, (10, 2) = 0.5552725838454675e-14, (10, 3) = 0.494213125294359e-14, (10, 4) = 0.16900532451603174e-8, (10, 5) = 0.8780983197662242e-9, (11, 1) = 0.1589045835010457e-14, (11, 2) = 0.54573811395900386e-14, (11, 3) = 0.4370346233896689e-14, (11, 4) = 0.1734384141772804e-8, (11, 5) = 0.21511245732875356e-9, (12, 1) = 0.1938397406295573e-14, (12, 2) = 0.65363028178274735e-14, (12, 3) = 0.39915199224484734e-14, (12, 4) = 0.17443804487181745e-8, (12, 5) = -0.3906337574991102e-9, (13, 1) = 0.25746355641282846e-14, (13, 2) = 0.6686301295711723e-14, (13, 3) = 0.3776993739734716e-14, (13, 4) = 0.17221022298538633e-8, (13, 5) = -0.9204760276081012e-9, (14, 1) = 0.24021854692179305e-14, (14, 2) = 0.68388696506603025e-14, (14, 3) = 0.3589227807197002e-14, (14, 4) = 0.16706007423685053e-8, (14, 5) = -0.13619565204084925e-8, (15, 1) = 0.27844846589144917e-14, (15, 2) = 0.6806482863864933e-14, (15, 3) = 0.3255802330557269e-14, (15, 4) = 0.15931710762978012e-8, (15, 5) = -0.1710057839046858e-8, (16, 1) = 0.3170168392339236e-14, (16, 2) = 0.7058625852330826e-14, (16, 3) = 0.3059882244808441e-14, (16, 4) = 0.14936064638531152e-8, (16, 5) = -0.19605804146242323e-8, (17, 1) = 0.418450905753915e-14, (17, 2) = 0.7320624596592493e-14, (17, 3) = 0.25290623286820664e-14, (17, 4) = 0.1376224007726725e-8, (17, 5) = -0.2113726736115561e-8, (18, 1) = 0.522802446903785e-14, (18, 2) = 0.7583088387046541e-14, (18, 3) = 0.2656436255857598e-14, (18, 4) = 0.12456454647509306e-8, (18, 5) = -0.2174149264673966e-8, (19, 1) = 0.5599963613653709e-14, (19, 2) = 0.7792902420006349e-14, (19, 3) = 0.2298977816983502e-14, (19, 4) = 0.1106554758169108e-8, (19, 5) = -0.21502682643665226e-8, (20, 1) = 0.5865892702136685e-14, (20, 2) = 0.8092855141368515e-14, (20, 3) = 0.2509193086994891e-14, (20, 4) = 0.9634933725685698e-9, (20, 5) = -0.205341703724594e-8, (21, 1) = 0.6816420131570755e-14, (21, 2) = 0.7846294298633722e-14, (21, 3) = 0.22775440990284527e-14, (21, 4) = 0.8206611972083126e-9, (21, 5) = -0.1896857216112942e-8, (22, 1) = 0.7301012092886368e-14, (22, 2) = 0.7949612920729695e-14, (22, 3) = 0.19113297564801313e-14, (22, 4) = 0.6817767801598973e-9, (22, 5) = -0.16947933473596584e-8, (23, 1) = 0.7517850272435388e-14, (23, 2) = 0.844440889491318e-14, (23, 3) = 0.210172135546369e-14, (23, 4) = 0.5499764453689152e-9, (23, 5) = -0.14614844738189918e-8, (24, 1) = 0.9093082110941868e-14, (24, 2) = 0.8617808603338214e-14, (24, 3) = 0.1973966157355317e-14, (24, 4) = 0.4281530842561462e-9, (24, 5) = -0.12106705564003452e-8, (25, 1) = 0.9614190502196018e-14, (25, 2) = 0.8848373195710656e-14, (25, 3) = 0.2086102522252812e-14, (25, 4) = 0.3188261735784484e-9, (25, 5) = -0.9556847653193206e-9, (26, 1) = 0.1041568490829814e-13, (26, 2) = 0.893833612887857e-14, (26, 3) = 0.1856000845238865e-14, (26, 4) = 0.22345041334248272e-9, (26, 5) = -0.708864527271831e-9, (27, 1) = 0.1152901561368169e-13, (27, 2) = 0.89795369925252e-14, (27, 3) = 0.2071787429729606e-14, (27, 4) = 0.14287136200501294e-9, (27, 5) = -0.4806758343384607e-9, (28, 1) = 0.13495965110034514e-13, (28, 2) = 0.9150624849596765e-14, (28, 3) = 0.18643959445317172e-14, (28, 4) = 0.7730346102119082e-10, (28, 5) = -0.27925524569939634e-9, (29, 1) = 0.1447846668412635e-13, (29, 2) = 0.9061416074595552e-14, (29, 3) = 0.2277139811068211e-14, (29, 4) = 0.26236748156626518e-10, (29, 5) = -0.10967840766932284e-9, (30, 1) = 0.1637043045937391e-13, (30, 2) = 0.8735733718415329e-14, (30, 3) = 0.27774780827091533e-14, (30, 4) = -0.11566251997979936e-10, (30, 5) = 0.26584437011128173e-10, (31, 1) = 0.19157667101419045e-13, (31, 2) = 0.8123059896172982e-14, (31, 3) = 0.36940270461759766e-14, (31, 4) = -0.3338327910770145e-10, (31, 5) = 0.11387033083646781e-9, (32, 1) = 0.218389656225817e-13, (32, 2) = 0.6857924190366744e-14, (32, 3) = 0.5214825473490382e-14, (32, 4) = -0.40398750655901706e-10, (32, 5) = 0.14926462934637388e-9, (33, 1) = 0.2627628563699054e-13, (33, 2) = 0.401556619991872e-14, (33, 3) = 0.8152745438393999e-14, (33, 4) = -0.3804768632584147e-10, (33, 5) = 0.14874007073963709e-9, (34, 1) = 0.36370999494014086e-13, (34, 2) = -0.386548921701265e-14, (34, 3) = 0.1631808180318328e-13, (34, 4) = -0.33000222761584506e-10, (34, 5) = 0.13693032069292921e-9, (35, 1) = 0.5509262327612127e-13, (35, 2) = -0.18890089391438668e-13, (35, 3) = 0.3161707194631968e-13, (35, 4) = -0.16646067039944626e-10, (35, 5) = 0.7219686567800556e-10, (36, 1) = 0.7409383620236018e-13, (36, 2) = -0.36040651044841214e-13, (36, 3) = 0.4898335208487011e-13, (36, 4) = 0.32784502413364445e-11, (36, 5) = -0.14735420939556755e-10, (37, 1) = 0.10169362342003957e-12, (37, 2) = -0.6040877776984526e-13, (37, 3) = 0.7350859063809685e-13, (37, 4) = 0.6987192987396587e-11, (37, 5) = -0.31593308676975374e-10, (38, 1) = 0.9107063627312493e-13, (38, 2) = -0.46451392159979334e-13, (38, 3) = 0.5970703758877559e-13, (38, 4) = 0.31960324368762172e-11, (38, 5) = -0.14549863332219355e-10, (39, 1) = 0.7795348303548032e-13, (39, 2) = -0.307504836025312e-13, (39, 3) = 0.4400477767345146e-13, (39, 4) = -0.24540000756116013e-12, (39, 5) = 0.14204634414083795e-11, (40, 1) = 0.7037299697401581e-13, (40, 2) = -0.2113986584686098e-13, (40, 3) = 0.3446868361893824e-13, (40, 4) = -0.6711604095422506e-12, (40, 5) = 0.33730077034860774e-11, (41, 1) = 0.6567420110784044e-13, (41, 2) = -0.1487071052735246e-13, (41, 3) = 0.281975245609803e-13, (41, 4) = -0.4840307488210744e-12, (41, 5) = 0.24565250659311624e-11, (42, 1) = 0.6459712022715409e-13, (42, 2) = -0.11097162630862281e-13, (42, 3) = 0.24423024403583574e-13, (42, 4) = -0.28608148225793283e-12, (42, 5) = 0.14964581624333766e-11, (43, 1) = 0.640280502136775e-13, (43, 2) = -0.8548606846495986e-14, (43, 3) = 0.21881466472077222e-13, (43, 4) = -0.16940774104908874e-12, (43, 5) = 0.9262688645940507e-12, (44, 1) = 0.6244301847516393e-13, (44, 2) = -0.66219479488107194e-14, (44, 3) = 0.1995701245760364e-13, (44, 4) = -0.10237686507119983e-12, (44, 5) = 0.5948441235731513e-12, (45, 1) = 0.6185753483413617e-13, (45, 2) = -0.5051468771290501e-14, (45, 3) = 0.18395260491368303e-13, (45, 4) = -0.6239441019233403e-13, (45, 5) = 0.3942092903383439e-12, (46, 1) = 0.6165132946892792e-13, (46, 2) = -0.37441003592832135e-14, (46, 3) = 0.1709672398590452e-13, (46, 4) = -0.3763161671814335e-13, (46, 5) = 0.26764102662748244e-12, (47, 1) = 0.6198151724876583e-13, (47, 2) = -0.26188562204839776e-14, (47, 3) = 0.15967252338380992e-13, (47, 4) = -0.21819149987483318e-13, (47, 5) = 0.18495665706484231e-12, (48, 1) = 0.6094944363926368e-13, (48, 2) = -0.1640899643671393e-14, (48, 3) = 0.15000579561151843e-13, (48, 4) = -0.11483823318682457e-13, (48, 5) = 0.1293625847432827e-12, (49, 1) = 0.6143323589996598e-13, (49, 2) = -0.7734412660573863e-15, (49, 3) = 0.14134062292410381e-13, (49, 4) = -0.4614422689930712e-14, (49, 5) = 0.9108760894060782e-13, (50, 1) = 0.6135526225959751e-13, (50, 2) = .0, (50, 3) = 0.13373226403332908e-13, (50, 4) = .0, (50, 5) = 0.6421709636688081e-13}, 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[50] elif outpoint = "order" then return 8 elif outpoint = "error" then return HFloat(5.209145281927147e-9) elif outpoint = "errorproc" then error "this is already the error procedure" elif outpoint = "rawdata" then return [5, 50, [y(x), diff(y(x), x), diff(diff(y(x), x), x), z(x), diff(z(x), x)], X, Y] else return ('procname')(x_bvp) end if end if; if outpoint < X[1] or X[50] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[50] end if; V := array([1 = 4, 2 = 0]); if Digits <= trunc(evalhf(Digits)) then L := Vector(4, 'datatype' = 'float'[8]); yout := Vector(5, 'datatype' = 'float'[8]); evalhf(`dsolve/numeric/lagrange`(50, 5, X, Y, outpoint, var(yout), var(L), var(V))) else L := Vector(4, 'datatype' = 'sfloat'); yout := Vector(5, 'datatype' = 'sfloat'); `dsolve/numeric/lagrange`(50, 5, X, Y, outpoint, yout, L, V) end if; [x = outpoint, seq('[y(x), diff(y(x), x), diff(diff(y(x), x), x), z(x), diff(z(x), x)]'[i] = yout[i], i = 1 .. 5)] 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[50] elif outpoint = "order" then return 8 elif outpoint = "error" then return HFloat(5.209145281927147e-9) elif outpoint = "errorproc" then return eval(errproc) elif outpoint = "rawdata" then return [5, 50, "depnames", X, Y, YP] else error "non-numeric value" end if end if; if outpoint < X[1] or X[50] < outpoint then error "solution is only defined in the range %1..%2", X[1], X[50] 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(5, {(1) = .0, (2) = .0, (3) = .0, (4) = .0, (5) = .0}, datatype = float[8]); evalhf(`dsolve/numeric/hermite`(50, 5, 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(5, {(1) = 0., (2) = 0., (3) = 0., (4) = 0., (5) = 0.}); `dsolve/numeric/hermite`(50, 5, X, Y, YP, outpoint, yout, L, V) end if; [outpoint, seq(yout[i], i = 1 .. 5)] end proc, (2) = Array(0..0, {}), (3) = [x, y(x), diff(y(x), x), diff(diff(y(x), x), x), z(x), diff(z(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('[y(x), diff(y(x), x), diff(diff(y(x), x), x), z(x), diff(z(x), x)]'[i] = res[i+1], i = 1 .. 5)] catch: error  end try end proc

(5)

print(sol(0));

[x = 0., y(x) = HFloat(0.0), diff(y(x), x) = HFloat(0.9999999999999998), diff(diff(y(x), x), x) = HFloat(-1.0169126314773378), z(x) = HFloat(0.9999999999999998), diff(z(x), x) = HFloat(4.938383111325545)]

(6)

odeplot(sol, [x, diff(y(x), x)], x = 0 .. 5)

 

odeplot(sol, [x, z(x)], x = 0 .. 5)

 
 

 

Download Code.mw

Could anyone help me with the syntax to create a Region Plot (Feasibility or Preference Map) that displays: Regions based on conditions like:

  • When   and  πR>πD ​ ​, then Strategy 1 is preferred.
    and  When ​, πR<πD then Strategy 2 is better.
     
  • When ​,πR<πD then Strategy 2 is preferred.
    and When ​,πR>πD then Strategy 1 is better.

I’d also like the plot to visually highlight the regions based on strategy​, and vice versa.

File : Regional_plot.mw

Hello everyone,
Could someone tell me how to insert an entry (empty cell) between two already filled entries or above an already filled entry in Document Mode?

Oliveira

As the following worksheet shows, Student:-NumericalAnalysis:-MatrixDecomposition cannot factorize the input matrix  and throws an error, but if we simply reorder or exchange the elements of , no error will be raised. (The reason for setting  is that LinearAlgebra:-LUDecomposition can be used for other methods.) 
 

restart

with(Student:-NumericalAnalysis, MatrixDecomposition)

m := Matrix([[3*(sqrt(3)+1)/8,-1/2,1/2,-(sqrt(3)+1)/8,-1/2,1/2,-(sqrt(3)+1)/8,-1/2,1/2,-(sqrt(3)+1)/8],

             [-1/2,sqrt(3)-1,-(sqrt(3)-1),-1/2,0,0,1/2,0,0,1/2],

             [1/2,-(sqrt(3)-1),sqrt(3)-1,1/2,0,0,-1/2,0,0,-1/2],

             [-(sqrt(3)+1)/8,-1/2,1/2,3*(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8],

             [-1/2,0,0,1/2,sqrt(3)-1,-(sqrt(3)-1),-1/2,0,0,1/2],

             [1/2,0,0,-1/2,-(sqrt(3)-1),sqrt(3)-1,1/2,0,0,-1/2],

             [-(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8,-1/2,1/2,3*(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8],

             [-1/2,0,0,1/2,0,0,1/2,sqrt(3)-1,-(sqrt(3)-1),-1/2],

             [1/2,0,0,-1/2,0,0,-1/2,-(sqrt(3)-1),sqrt(3)-1,1/2],

             [-(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8,1/2,-1/2,-(sqrt(3)+1)/8,-1/2,1/2,3*(sqrt(3)+1)/8]],

            'shape'='symmetric'):

MatrixDecomposition(m, 'method' = 'LDLt'): # this does not work 

Error, (in Student:-NumericalAnalysis:-MatrixDecomposition) a pivot element 0 is encountered, and the entries below it are not all 0; the factorization cannot continue

 

MatrixDecomposition(m([1, 4, 7, 10, 2, 5, 8, 3, 6, 9] $ 2), 'method' = 'LDLt'): # yet this works 

MatrixDecomposition(m([2, 3, 5, 6, 8, 9, 1, 4, 7, 10] $ 2), 'method' = 'LDLt'): # this also works 

randomize(5):

k := 0:
to 1e3 do
        try
                MatrixDecomposition(m(combinat:-randperm(10) $ 2), 'method' = 'LDLt')
        catch :
                k++
        end
od:
k/1e3;

.469

(1)


 

Download LDL_factorization_robustness.mw

The last instance above suggests that it only works on about half of the inputs (that are equivalent to each other). Although I tried changing the value of Digits, the failure rate remained high. Is Student:-NumericalAnalysis:-MatrixDecomposition not robust enough? 

I am learning how to use Maple for solving single and systems of linear PDE's using the Laplace transform (LT)method so the resulting solution in s space can be used to generate the moments of the resulting probability distribution.

When I take the LT of a term such as Uxx(t,x), I expect a second order ordinary derivative. Instead, it shows the Laplace transform operator.

Here is a simple test code  

with(inttrans):

with(DEtools):

rhs_pde := diff(u(x, t), x, x);

laplace_rhs_pde := laplace(rhs_pde, t, s);

I want to draw a circle in 2D as a point plot, given a center y1 and radius r1 using the animate command. 
I can do this for other functions, and I can create a plot of a circle, but I am doing something wrong when I attempt to combine them.  

Here is my code

with(plots):

y1:=<-1,1>;
r1:=15.;

This plot command for the circle works.  

plot([y1(1)+r1*cos(t),y1(2)+r1*sin(t),t=0..2*Pi],color=blue); [n];

But this attempt to animate it does not!!!

plots:-animate(plot,([[y1(1)+r1*cos(t),y1(2)+r1*sin(t)], t=0..T,color=blue]), T=0..2*Pi); plot([y1(1)+r1*cos(t),y1(2)+r1*sin(t),t=0..2*Pi],color=blue);

Thanks

I experience the following quirk using maple 2025 in worksheet mode: copy a formula and then paste it can often freeze the program. Termination only via ctrl-Alt-delete task manager. Has anybody similar problems or should i think that is happening only in my case?

I am working with two plots and need help in labeling,

Plot 1: I would like to display the intersection point of the two curves along with the corresponding value of δ (delta) at that point. Ideally, this can be highlighted using an arrow or annotation.

Plot 2: I would like to identify and mark the maximum point of the two curves. Specifically, I want to show the maximum value and the corresponding value of w at which this occurs.

Could anyone help with the syntax. Is there any method to improve the quality of figure to export it as jpeg?

Q_NEW_PLOT.mw

On maple I want solve this, is the best way plot angles by time?I put M,m,r,theta,phy and plot first and than the second equation?

1 2 3 4 5 6 7 Last Page 1 of 2426