mmcdara

5259 Reputation

17 Badges

7 years, 110 days

MaplePrimes Activity


These are replies submitted by mmcdara

@NanaP 

ALL_Solutions file updated (see below)

Thanks.

A quick reply to your questions:

---------------------------------------------------------------------
1
Let X some random variable anf f its PDF.
Let Y = a+b*X (b assumed <> 0) and g its PDF; the basic formula to keep in mind is

g(t) = f((t-a)/b) / |b|



---------------------------------------------------------------------
2
Concerning the CDF the things are a little bit more complex. See an example here answ_1.mw.
If the scaling factor b is assumed to be strictly positive and if F and G are the CDF of X and Y respectively, then the second basic formula is 

F(t) = F((t-a)/b)

Demonstration of these formulas can be found in any text cours of Probability.

 

---------------------------------------------------------------------
3
Whatever the value of the scaling parameter Variance(Y) = b^2 * Variance(X).
As Variance is a central moment the shift parameter a doesn't matter.



---------------------------------------------------------------------
4
Skewness and Kurtosis are both defined based on central moments and the shift parameter a doesn't matter.
If you closely look to their formulas (see the Maple help pages for instance), you will see that they are dimensionless
(
Let MX(r) the central moment of order r of X and  MY(r) the central moment of order r of Y.
One has  MX(r) = br * MY(r).
Skewness(X) = MX(3) / MX(2)3/2 then Skewness(Y) = b3 *MX(3) / ( b2 *MX(2)) 3/2 = MX(3) / MX(2)3/2  = Skewness(X).
For the same reason he same Kurtosis(X) = Kurtosis(Y)
).


---------------------------------------------------------------------
​​​​​​​5
The Mean of a random variable (more precisely its Expectation), is linear operator over random variables.
Let E this operator.
Then E(Y) = E(a + b*X) = a + b*E(X).
Concerning the Mode: the transformation T : X --> Y being linear one easily deduces that Mode(Y) = a + b*Mode(X).
Concerning the Median, which is by defininition the value such that the PDF of a random variable takes the value 1/2, the demonstration that Median(Y) = a + b*Median(X) is a little bit more complex, see here answ_2.mw


FINALLY:
The following file contains all previous step-by-step demonstrations with Maple ​​​​​​​

 

restart


Probability Density Functions

X is a random variable with PDF f__X
Y = a + b . X
f__Y = PDF(Y)

with(IntegrationTools):

# X to Y relation
#
# For the sake of simplicity I consider only the case b > 0.


Y = a+b*X

Y = X*b+a

(1)

# Defition

Prob(X <= u) = Int(f__X(t), t=-infinity..u)

Prob(X <= u) = Int(f__X(t), t = -infinity .. u)

(2)

# and

Prob(Y <= v) = Int(f__Y(t), t=-infinity..v)

Prob(Y <= v) = Int(f__Y(t), t = -infinity .. v)

(3)

# Use relation (1)

eval((3), (1))

Prob(X*b+a <= v) = Int(f__Y(t), t = -infinity .. v)

(4)

# Rearrange the operand of Prob

Prob(isolate(op(lhs((4))), X)) = rhs((4)) assuming b > 0

Prob(X <= (v-a)/b) = Int(f__Y(t), t = -infinity .. v)

(5)

# Which means, from definition (2) that:


eval((2), u=rhs(op(lhs((5)))));

Prob(X <= (v-a)/b) = Int(f__X(t), t = -infinity .. (v-a)/b)

(6)

# Thus equating rhs(6) and rhs(5) gives

rhs((6)) = rhs((5))

Int(f__X(t), t = -infinity .. (v-a)/b) = Int(f__Y(t), t = -infinity .. v)

(7)

# Comparing the upper bounds of the two Integrals in (7) suggests
# that the change of variable t --> (tau-a)/b in the rhs Integral
# will change its upper bound (v-a) b Into v:

Change(lhs((7)), t=(tau-a)/b, tau) = rhs((7)) assuming b > 0

Int(f__X(-(-tau+a)/b)/b, tau = -infinity .. v) = Int(f__Y(t), t = -infinity .. v)

(8)

# Gather the two members within the same integral

Combine((lhs-rhs)((8))) = 0

Int(f__X(-(-tau+a)/b)/b-f__Y(tau), tau = -infinity .. v) = 0

(9)

# As this equality holds for any real value v one gets

GetIntegrand((9)) = 0

f__X(-(-tau+a)/b)/b-f__Y(tau) = 0

(10)

# And finally

simplify(isolate((10), f__Y(tau)), size)

f__Y(tau) = f__X((tau-a)/b)/b

(11)

# QED


Cumulative Density Functions

CDF(X) =F__X(t)
CDF(Y) = F__Y(t)

# Integrate both sides of (11) from -oo to some arbitrary value T

map(z -> Int(z, tau=-infinity..T), (11))

Int(f__Y(tau), tau = -infinity .. T) = Int(f__X((tau-a)/b)/b, tau = -infinity .. T)

(12)

# By definition of F__Y:

F__Y(T) = Change(rhs((12)), tau=a+b*t, t) assuming b > 0

F__Y(T) = Int(f__X(t), t = -infinity .. -(-T+a)/b)

(13)

# By definition of F__X:

lhs((13)) = F__X(op(2, GetRange(rhs((13)))))

F__Y(T) = F__X(-(-T+a)/b)

(14)

map(simplify, %);

F__Y(T) = F__X((T-a)/b)

(15)

# QED


Means

mu__X = mean(X)
mu__Y = mean(Y)

# By definition:

mu__X = Int(t*f__X(t), t=-infinity..+infinity);
 

mu__X = Int(t*f__X(t), t = -infinity .. infinity)

(16)

# and:

mu__Y = Int(tau*f__Y(tau), tau=-infinity..+infinity);

mu__Y = Int(tau*f__Y(tau), tau = -infinity .. infinity)

(17)

# Account for relation (11)

eval((17), (11))

mu__Y = Int(tau*f__X((tau-a)/b)/b, tau = -infinity .. infinity)

(18)

# Expand this expression after having use this change of the integration
# variable: tau = a + b*t

Expand(Change((18), tau=a+b*t, t)) assuming b > 0

mu__Y = b*(Int(t*f__X(t), t = -infinity .. infinity))+a*(Int(f__X(t), t = -infinity .. infinity))

(19)

# As f__Y is a PDF, one has

Int(f__X(t), t = -infinity .. infinity) = 1

Int(f__X(t), t = -infinity .. infinity) = 1

(20)

# Simplify relation (19) using (20):

eval((19), (20))

mu__Y = b*(Int(t*f__X(t), t = -infinity .. infinity))+a

(21)

# Use the definition (16) to simplify (21)

eval((21), (rhs=lhs)((16)))

mu__Y = b*mu__X+a

(22)

# QED


Variances

V__X = variance(X)
V__Y = variance(Y)

# By definition:

V__X = Int((t-mu__X)^2*f__X(t), t=-infinity..+infinity);
 

V__X = Int((t-mu__X)^2*f__X(t), t = -infinity .. infinity)

(23)

# and:

V__Y = Int((tau-mu__Y)^2*f__Y(tau), tau=-infinity..+infinity);

V__Y = Int((tau-mu__Y)^2*f__Y(tau), tau = -infinity .. infinity)

(24)

# Account for relation (11)

eval((24), (11))

V__Y = Int((tau-mu__Y)^2*f__X((tau-a)/b)/b, tau = -infinity .. infinity)

(25)

# Use the change tau = a + b*t for the integration variable

Change((25), tau=a+b*t, t) assuming b > 0

V__Y = Int((b*t+a-mu__Y)^2*f__X(t), t = -infinity .. infinity)

(26)

# Account for relation (22)

eval((26), (22))

V__Y = Int((-b*mu__X+b*t)^2*f__X(t), t = -infinity .. infinity)

(27)

# Factorize the integrand

lhs((27)) = Int(factor(GetIntegrand(rhs((27)))), t=GetRange(rhs((27))))

V__Y = Int(b^2*(mu__X-t)^2*f__X(t), t = -infinity .. infinity)

(28)

# Transform relation (23) this way

Expand((23)):
isolate(%, select(has, [op(rhs(%))], t^2)[])

Int(f__X(t)*t^2, t = -infinity .. infinity) = -mu__X^2*(Int(f__X(t), t = -infinity .. infinity))+2*mu__X*(Int(t*f__X(t), t = -infinity .. infinity))+V__X

(29)

# Expand relation (28)

Expand((28))

V__Y = b^2*mu__X^2*(Int(f__X(t), t = -infinity .. infinity))-2*b^2*mu__X*(Int(t*f__X(t), t = -infinity .. infinity))+b^2*(Int(f__X(t)*t^2, t = -infinity .. infinity))

(30)

# Modify relation (30) while accounting for relation (29)

simplify(eval((30), (29)))

V__Y = b^2*V__X

(31)

# QED


Medians

Medians

# By definition of the median:

Def__X := Int(f__X(t), t=-infinity..Median__X) = 1/2;

Int(f__X(t), t = -infinity .. Median__X) = 1/2

(32)

# and

Def__Y := Int(f__Y(tau), tau=-infinity..Median__Y) = 1/2;

Int(f__Y(tau), tau = -infinity .. Median__Y) = 1/2

(33)

# Account for relation (11) in (33)

eval((33), (11))

Int(f__X((tau-a)/b)/b, tau = -infinity .. Median__Y) = 1/2

(34)

# Change the integration variable

Change((34), tau=a+b*t, t) assuming b > 0

Int(f__X(t), t = -infinity .. -(-Median__Y+a)/b) = 1/2

(35)

# Use definition (32)

eval((35), (rhs=lhs)((32)))

Int(f__X(t), t = -infinity .. -(-Median__Y+a)/b) = Int(f__X(t), t = -infinity .. Median__X)

(36)

# Equating the upper bounds of each member gives

op(2, GetRange(lhs((36)))) = op(2, GetRange(rhs((36))))

-(-Median__Y+a)/b = Median__X

(37)

# Isolate Median__Y

isolate((37), Median__Y)

Median__Y = b*Median__X+a

(38)


Central Moments anq Quantiles

# For any central moments or order r (r >= 2) the proof that

CentralMonent(Y, r) = b^r * CentralMoment(X, r);

# proceeds exactly as the one used for the variances
# (central moment of order 2).

CentralMonent(Y, r) = b^r*CentralMoment(X, r)

(39)

# For any Quantile the proof that

Quantile(Y, prob) = a + b * Quantile(X, prob);

# proceeds exactly as the one used for the medians
# (quantile associated to prob=1/2).

Quantile(Y, prob) = a+b*Quantile(X, prob)

(40)

 


Download All_demonstrations_b.mw

 

Here is the demonstration that your problem may have no solution in integer numbers.

I consider the elementary case of 2x2 random matrices of integer generated this way:

RandomMatrix(2$2, generator=-10..10);

All these matrices have a determinant in the range -200..200.
Nevertheless one can proove these determinants can only take 333 values out of the 401 possible a priori.
This means, for instance, that there exist no such matrix whose determinant is 173.

In more general terms your problem doesn't always has a solution: this will depend on the value of the determinant you give.
(note that it has always an infinity of solutions in real numbers, see my answer).

restart:

randomize(168749831218663);

168749831218663

(1)

with(LinearAlgebra):
with(Statistics):


Preliminary investigation.

# It is obvious that the determinant of matrices like M below is in [-200, 200].

N := 2:
M := RandomMatrix(N$2, generator=-10..10);
 

M := Matrix(2, 2, {(1, 1) = -10, (1, 2) = -5, (2, 1) = -1, (2, 2) = x})

(2)

# Modify matrix M by randomly replacing one of it's entry by a name x.
# For instance:

r := rand(1..N^2):
[indices(M)][r()];

M[op(%)] := x:
d := Determinant(M):

M, d;

"[[Typesetting:-mn("2",mathvariant = "normal"), Typesetting:-mn("2",mathvariant = "normal")]]"

 

Matrix(2, 2, {(1, 1) = -10, (1, 2) = -5, (2, 1) = -1, (2, 2) = x}), -10*x-5

(3)

# Let T a target determinant and let's assume T is an integer.
#
# Then x must be such that

SearchedValue := x = solve(d=T, x);

x = -(1/10)*T-1/2

(4)

# And if we still want x to be an integer, T/10+1/2 must be one too.
# Given T is in [-100, 100], only values of T such that

FeasibleT := {T=10*k+5, k >= -9, k <= 9}

{T = 10*k+5, -9 <= k, k <= 9}

(5)

# Thus T must one of

Dom := {seq(-95..95, 10)}

{-95, -85, -75, -65, -55, -45, -35, -25, -15, -5, 5, 15, 25, 35, 45, 55, 65, 75, 85, 95}

(6)

# Let's take T=15:

seq(eval(SearchedValue, T=guess), guess in Dom);

x = 9, x = 8, x = 7, x = 6, x = 5, x = 4, x = 3, x = 2, x = 1, x = 0, x = -1, x = -2, x = -3, x = -4, x = -5, x = -6, x = -7, x = -8, x = -9, x = -10

(7)


A brute force method (before a smarter analysis).

r := rand(-10..10):

NR := 10^6:
dets := Vector(NR):
for nr from 1 to NR do
  dets[nr] := r()*r()-r()*r()
end do:

Ta := Tally(dets, output=table);

table( [( -1 ) = 5147, ( 0 ) = 20283, ( 146 ) = 179, ( -2 ) = 8471, ( -148 ) = 93, ( 1 ) = 5089, ( -3 ) = 6856, ( -145 ) = 102, ( 2 ) = 8401, ( 144 ) = 424, ( -4 ) = 9397, ( -146 ) = 161, ( 3 ) = 7003, ( 145 ) = 105, ( 4 ) = 9508, ( 150 ) = 379, ( -5 ) = 6654, ( -151 ) = 73, ( 5 ) = 6597, ( 151 ) = 76, ( -6 ) = 10622, ( -152 ) = 199, ( 6 ) = 10936, ( 148 ) = 83, ( -7 ) = 5950, ( -149 ) = 27, ( 7 ) = 5868, ( 149 ) = 35, ( -8 ) = 10271, ( -150 ) = 405, ( -10 ) = 10648, ( -156 ) = 92, ( 9 ) = 7823, ( -9 ) = 7947, ( 8 ) = 10058, ( 154 ) = 153, ( -12 ) = 11103, ( -154 ) = 172, ( 11 ) = 4692, ( 153 ) = 232, ( -11 ) = 4679, ( -153 ) = 238, ( 10 ) = 10783, ( 152 ) = 187, ( 13 ) = 4444, ( -14 ) = 8298, ( -160 ) = 328, ( 12 ) = 11068, ( -13 ) = 4392, ( 15 ) = 7327, ( -16 ) = 9108, ( 14 ) = 8192, ( 156 ) = 89, ( -15 ) = 7433, ( -19 ) = 4109, ( -129 ) = 167, ( 18 ) = 10816, ( 128 ) = 403, ( -130 ) = 802, ( -20 ) = 10487, ( 129 ) = 145, ( 19 ) = 4116, ( -17 ) = 4252, ( -131 ) = 67, ( 16 ) = 9329, ( 130 ) = 849, ( -18 ) = 10679, ( -132 ) = 411, ( 17 ) = 4229, ( 131 ) = 91, ( 22 ) = 6450, ( 132 ) = 401, ( -23 ) = 3969, ( -133 ) = 149, ( 23 ) = 3826, ( 133 ) = 176, ( -24 ) = 10657, ( -134 ) = 287, ( 20 ) = 10510, ( 134 ) = 232, ( -21 ) = 6493, ( -135 ) = 503, ( 21 ) = 6529, ( 135 ) = 462, ( -22 ) = 6488, ( -136 ) = 340, ( -28 ) = 7745, ( -138 ) = 143, ( 27 ) = 6442, ( 137 ) = 77, ( -27 ) = 6282, ( -137 ) = 89, ( 26 ) = 6076, ( 136 ) = 365, ( -26 ) = 6037, ( -140 ) = 586, ( 25 ) = 5128, ( 139 ) = 113, ( -25 ) = 5175, ( -139 ) = 77, ( 24 ) = 10662, ( 138 ) = 178, ( 31 ) = 3412, ( 141 ) = 81, ( -32 ) = 7433, ( -142 ) = 252, ( 30 ) = 10454, ( 140 ) = 571, ( -31 ) = 3427, ( -141 ) = 107, ( 29 ) = 3470, ( 143 ) = 150, ( -30 ) = 10614, ( -144 ) = 393, ( 28 ) = 7759, ( 142 ) = 251, ( -29 ) = 3578, ( -143 ) = 178, ( 36 ) = 8996, ( -37 ) = 3136, ( 37 ) = 3095, ( -38 ) = 5082, ( 38 ) = 5134, ( 180 ) = 169, ( -39 ) = 4157, ( -181 ) = 43, ( 39 ) = 4120, ( 181 ) = 39, ( -40 ) = 9250, ( -33 ) = 4487, ( 32 ) = 7650, ( -34 ) = 5488, ( -180 ) = 169, ( 33 ) = 4578, ( -35 ) = 5247, ( 34 ) = 5362, ( -36 ) = 9062, ( 35 ) = 5275, ( 45 ) = 5953, ( -46 ) = 4520, ( 44 ) = 5367, ( 190 ) = 69, ( -45 ) = 5972, ( 47 ) = 2522, ( -48 ) = 7099, ( -190 ) = 86, ( 46 ) = 4570, ( -47 ) = 2604, ( -42 ) = 7327, ( 41 ) = 2873, ( -41 ) = 2861, ( 40 ) = 9270, ( -44 ) = 5280, ( 43 ) = 2760, ( -43 ) = 2796, ( 42 ) = 7309, ( 54 ) = 6254, ( 164 ) = 43, ( -55 ) = 3007, ( 55 ) = 3140, ( -56 ) = 5493, ( 52 ) = 4606, ( -53 ) = 2339, ( 53 ) = 2318, ( -54 ) = 6215, ( -51 ) = 3358, ( -161 ) = 83, ( 50 ) = 6651, ( 160 ) = 329, ( -52 ) = 4489, ( -162 ) = 206, ( 51 ) = 3308, ( 161 ) = 78, ( -49 ) = 3309, ( -163 ) = 87, ( 162 ) = 190, ( 48 ) = 7368, ( -50 ) = 6379, ( -164 ) = 42, ( 49 ) = 3212, ( 163 ) = 96, ( 63 ) = 4125, ( -64 ) = 4460, ( 62 ) = 3466, ( 172 ) = 72, ( -63 ) = 4328, ( 61 ) = 1866, ( -62 ) = 3401, ( 60 ) = 6971, ( -61 ) = 1882, ( -60 ) = 7014, ( -170 ) = 220, ( 59 ) = 1995, ( -59 ) = 1953, ( 58 ) = 3786, ( -172 ) = 93, ( -58 ) = 3637, ( 57 ) = 2879, ( 171 ) = 84, ( -57 ) = 2880, ( -171 ) = 72, ( 56 ) = 5694, ( 170 ) = 246, ( -74 ) = 2616, ( 73 ) = 1530, ( -73 ) = 1520, ( 72 ) = 5382, ( -76 ) = 2775, ( 75 ) = 2493, ( -75 ) = 2454, ( 74 ) = 2558, ( 77 ) = 1545, ( -78 ) = 2850, ( 76 ) = 2749, ( -77 ) = 1510, ( 79 ) = 1165, ( -80 ) = 4593, ( 78 ) = 2830, ( -79 ) = 1241, ( -65 ) = 2491, ( 64 ) = 4406, ( -66 ) = 3967, ( 65 ) = 2472, ( -67 ) = 1624, ( 66 ) = 3879, ( -68 ) = 3198, ( 67 ) = 1589, ( 68 ) = 3120, ( -69 ) = 2180, ( 69 ) = 2203, ( -70 ) = 5171, ( 70 ) = 5126, ( -71 ) = 1562, ( 71 ) = 1605, ( -72 ) = 5321, ( -92 ) = 1671, ( 91 ) = 1025, ( -91 ) = 1024, ( 90 ) = 4267, ( 200 ) = 22, ( -90 ) = 4326, ( 89 ) = 872, ( -89 ) = 905, ( 88 ) = 2171, ( 95 ) = 1066, ( -96 ) = 1980, ( 94 ) = 1523, ( -95 ) = 1041, ( 93 ) = 1039, ( -94 ) = 1514, ( 92 ) = 1612, ( -93 ) = 1051, ( -83 ) = 1090, ( 82 ) = 2151, ( -84 ) = 2929, ( 83 ) = 1076, ( -81 ) = 2448, ( 80 ) = 4634, ( -82 ) = 2198, ( 81 ) = 2509, ( 86 ) = 1949, ( -87 ) = 1322, ( 87 ) = 1329, ( -88 ) = 2280, ( 84 ) = 2955, ( -85 ) = 1485, ( 85 ) = 1497, ( -86 ) = 1917, ( -200 ) = 15, ( 109 ) = 347, ( -110 ) = 1430, ( 108 ) = 1475, ( -109 ) = 370, ( 111 ) = 522, ( -112 ) = 1052, ( 110 ) = 1486, ( -111 ) = 469, ( -106 ) = 943, ( 105 ) = 1032, ( -105 ) = 1085, ( 104 ) = 1286, ( -108 ) = 1379, ( 107 ) = 415, ( -107 ) = 419, ( 106 ) = 950, ( 100 ) = 2492, ( -101 ) = 505, ( 101 ) = 544, ( -102 ) = 1368, ( 102 ) = 1335, ( -103 ) = 465, ( 103 ) = 492, ( -104 ) = 1273, ( -97 ) = 698, ( 96 ) = 1921, ( -98 ) = 1423, ( 97 ) = 678, ( -99 ) = 1233, ( 98 ) = 1432, ( -100 ) = 2549, ( 99 ) = 1180, ( 127 ) = 157, ( -128 ) = 440, ( 126 ) = 724, ( -127 ) = 161, ( 125 ) = 399, ( -126 ) = 684, ( 124 ) = 404, ( -125 ) = 386, ( -124 ) = 405, ( 123 ) = 231, ( -123 ) = 230, ( 122 ) = 496, ( -122 ) = 532, ( 121 ) = 355, ( -121 ) = 338, ( 120 ) = 1327, ( 118 ) = 633, ( -119 ) = 242, ( 119 ) = 247, ( -120 ) = 1391, ( 116 ) = 574, ( -117 ) = 603, ( 117 ) = 590, ( -118 ) = 544, ( -115 ) = 498, ( 114 ) = 831, ( -116 ) = 598, ( 115 ) = 498, ( -113 ) = 293, ( 112 ) = 1108, ( -114 ) = 819, ( 113 ) = 286 ] )

(8)

{indices(Ta, nolist)};
numelems(%);

{-200, -190, -181, -180, -172, -171, -170, -164, -163, -162, -161, -160, -156, -154, -153, -152, -151, -150, -149, -148, -146, -145, -144, -143, -142, -141, -140, -139, -138, -137, -136, -135, -134, -133, -132, -131, -130, -129, -128, -127, -126, -125, -124, -123, -122, -121, -120, -119, -118, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -107, -106, -105, -104, -103, -102, -101, -100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90, -89, -88, -87, -86, -85, -84, -83, -82, -81, -80, -79, -78, -77, -76, -75, -74, -73, -72, -71, -70, -69, -68, -67, -66, -65, -64, -63, -62, -61, -60, -59, -58, -57, -56, -55, -54, -53, -52, -51, -50, -49, -48, -47, -46, -45, -44, -43, -42, -41, -40, -39, -38, -37, -36, -35, -34, -33, -32, -31, -30, -29, -28, -27, -26, -25, -24, -23, -22, -21, -20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 149, 150, 151, 152, 153, 154, 156, 160, 161, 162, 163, 164, 170, 171, 172, 180, 181, 190, 200}

 

333

(9)

ho := Histogram(Select(z->is(z::odd), dets), discrete=true, color=red):
he := Histogram(Select(z->is(z::even), dets), discrete=true, color=blue):
plots:-display(ho, he, size=[1000, 400])

 

# Observe the pre-eminence of even determinants

numelems( Select(t -> is(t::even), dets) ) / NR;
evalf(%);

324647/500000

 

.6492940000

(10)


A smarter analysis.

# Consider all possible outcomes 's' of generator=-10..10

s := <[$-10..10]>:

# 's' contains 11 out of 21 even values.
# Consider the product 's2 = s.s^+' (which represents for instance the product
# of diagonal elements in the expression of the determinant).
# The probability that this product is even is
#       even * even       even * odd        odd  * even
#     (11/21)*(11*21) + (11/21)*(10/21) + (10/21)*(11/21)

Prob_Product_Even := (11/21)*(11/21) + (11/21)*(10/21) + (10/21)*(11/21);

# Then the determinant is even if
#    (1) either the products of the diagonal elements AND  of the off-diagonal
#        elements are both even,
#    (2) or if they are both odd.
#
# Thus

Prob_Dterminant_Even := Prob_Product_Even^2 + (1-Prob_Product_Even)^2;
evalf(%);

 

341/441

 

126281/194481

 

.6493230701

(11)

# Visualization of the products of, let's say, diagonal elements.

interface(rtablesize=21):
s2 := s.s^+;
Proportion_of_even := numelems( Select(t -> is(t::even), convert(s2, Vector)) ) / 21^2;

s2 := Matrix(21, 21, {(1, 1) = 100, (1, 2) = 90, (1, 3) = 80, (1, 4) = 70, (1, 5) = 60, (1, 6) = 50, (1, 7) = 40, (1, 8) = 30, (1, 9) = 20, (1, 10) = 10, (1, 11) = 0, (1, 12) = -10, (1, 13) = -20, (1, 14) = -30, (1, 15) = -40, (1, 16) = -50, (1, 17) = -60, (1, 18) = -70, (1, 19) = -80, (1, 20) = -90, (1, 21) = -100, (2, 1) = 90, (2, 2) = 81, (2, 3) = 72, (2, 4) = 63, (2, 5) = 54, (2, 6) = 45, (2, 7) = 36, (2, 8) = 27, (2, 9) = 18, (2, 10) = 9, (2, 11) = 0, (2, 12) = -9, (2, 13) = -18, (2, 14) = -27, (2, 15) = -36, (2, 16) = -45, (2, 17) = -54, (2, 18) = -63, (2, 19) = -72, (2, 20) = -81, (2, 21) = -90, (3, 1) = 80, (3, 2) = 72, (3, 3) = 64, (3, 4) = 56, (3, 5) = 48, (3, 6) = 40, (3, 7) = 32, (3, 8) = 24, (3, 9) = 16, (3, 10) = 8, (3, 11) = 0, (3, 12) = -8, (3, 13) = -16, (3, 14) = -24, (3, 15) = -32, (3, 16) = -40, (3, 17) = -48, (3, 18) = -56, (3, 19) = -64, (3, 20) = -72, (3, 21) = -80, (4, 1) = 70, (4, 2) = 63, (4, 3) = 56, (4, 4) = 49, (4, 5) = 42, (4, 6) = 35, (4, 7) = 28, (4, 8) = 21, (4, 9) = 14, (4, 10) = 7, (4, 11) = 0, (4, 12) = -7, (4, 13) = -14, (4, 14) = -21, (4, 15) = -28, (4, 16) = -35, (4, 17) = -42, (4, 18) = -49, (4, 19) = -56, (4, 20) = -63, (4, 21) = -70, (5, 1) = 60, (5, 2) = 54, (5, 3) = 48, (5, 4) = 42, (5, 5) = 36, (5, 6) = 30, (5, 7) = 24, (5, 8) = 18, (5, 9) = 12, (5, 10) = 6, (5, 11) = 0, (5, 12) = -6, (5, 13) = -12, (5, 14) = -18, (5, 15) = -24, (5, 16) = -30, (5, 17) = -36, (5, 18) = -42, (5, 19) = -48, (5, 20) = -54, (5, 21) = -60, (6, 1) = 50, (6, 2) = 45, (6, 3) = 40, (6, 4) = 35, (6, 5) = 30, (6, 6) = 25, (6, 7) = 20, (6, 8) = 15, (6, 9) = 10, (6, 10) = 5, (6, 11) = 0, (6, 12) = -5, (6, 13) = -10, (6, 14) = -15, (6, 15) = -20, (6, 16) = -25, (6, 17) = -30, (6, 18) = -35, (6, 19) = -40, (6, 20) = -45, (6, 21) = -50, (7, 1) = 40, (7, 2) = 36, (7, 3) = 32, (7, 4) = 28, (7, 5) = 24, (7, 6) = 20, (7, 7) = 16, (7, 8) = 12, (7, 9) = 8, (7, 10) = 4, (7, 11) = 0, (7, 12) = -4, (7, 13) = -8, (7, 14) = -12, (7, 15) = -16, (7, 16) = -20, (7, 17) = -24, (7, 18) = -28, (7, 19) = -32, (7, 20) = -36, (7, 21) = -40, (8, 1) = 30, (8, 2) = 27, (8, 3) = 24, (8, 4) = 21, (8, 5) = 18, (8, 6) = 15, (8, 7) = 12, (8, 8) = 9, (8, 9) = 6, (8, 10) = 3, (8, 11) = 0, (8, 12) = -3, (8, 13) = -6, (8, 14) = -9, (8, 15) = -12, (8, 16) = -15, (8, 17) = -18, (8, 18) = -21, (8, 19) = -24, (8, 20) = -27, (8, 21) = -30, (9, 1) = 20, (9, 2) = 18, (9, 3) = 16, (9, 4) = 14, (9, 5) = 12, (9, 6) = 10, (9, 7) = 8, (9, 8) = 6, (9, 9) = 4, (9, 10) = 2, (9, 11) = 0, (9, 12) = -2, (9, 13) = -4, (9, 14) = -6, (9, 15) = -8, (9, 16) = -10, (9, 17) = -12, (9, 18) = -14, (9, 19) = -16, (9, 20) = -18, (9, 21) = -20, (10, 1) = 10, (10, 2) = 9, (10, 3) = 8, (10, 4) = 7, (10, 5) = 6, (10, 6) = 5, (10, 7) = 4, (10, 8) = 3, (10, 9) = 2, (10, 10) = 1, (10, 11) = 0, (10, 12) = -1, (10, 13) = -2, (10, 14) = -3, (10, 15) = -4, (10, 16) = -5, (10, 17) = -6, (10, 18) = -7, (10, 19) = -8, (10, 20) = -9, (10, 21) = -10, (11, 1) = 0, (11, 2) = 0, (11, 3) = 0, (11, 4) = 0, (11, 5) = 0, (11, 6) = 0, (11, 7) = 0, (11, 8) = 0, (11, 9) = 0, (11, 10) = 0, (11, 11) = 0, (11, 12) = 0, (11, 13) = 0, (11, 14) = 0, (11, 15) = 0, (11, 16) = 0, (11, 17) = 0, (11, 18) = 0, (11, 19) = 0, (11, 20) = 0, (11, 21) = 0, (12, 1) = -10, (12, 2) = -9, (12, 3) = -8, (12, 4) = -7, (12, 5) = -6, (12, 6) = -5, (12, 7) = -4, (12, 8) = -3, (12, 9) = -2, (12, 10) = -1, (12, 11) = 0, (12, 12) = 1, (12, 13) = 2, (12, 14) = 3, (12, 15) = 4, (12, 16) = 5, (12, 17) = 6, (12, 18) = 7, (12, 19) = 8, (12, 20) = 9, (12, 21) = 10, (13, 1) = -20, (13, 2) = -18, (13, 3) = -16, (13, 4) = -14, (13, 5) = -12, (13, 6) = -10, (13, 7) = -8, (13, 8) = -6, (13, 9) = -4, (13, 10) = -2, (13, 11) = 0, (13, 12) = 2, (13, 13) = 4, (13, 14) = 6, (13, 15) = 8, (13, 16) = 10, (13, 17) = 12, (13, 18) = 14, (13, 19) = 16, (13, 20) = 18, (13, 21) = 20, (14, 1) = -30, (14, 2) = -27, (14, 3) = -24, (14, 4) = -21, (14, 5) = -18, (14, 6) = -15, (14, 7) = -12, (14, 8) = -9, (14, 9) = -6, (14, 10) = -3, (14, 11) = 0, (14, 12) = 3, (14, 13) = 6, (14, 14) = 9, (14, 15) = 12, (14, 16) = 15, (14, 17) = 18, (14, 18) = 21, (14, 19) = 24, (14, 20) = 27, (14, 21) = 30, (15, 1) = -40, (15, 2) = -36, (15, 3) = -32, (15, 4) = -28, (15, 5) = -24, (15, 6) = -20, (15, 7) = -16, (15, 8) = -12, (15, 9) = -8, (15, 10) = -4, (15, 11) = 0, (15, 12) = 4, (15, 13) = 8, (15, 14) = 12, (15, 15) = 16, (15, 16) = 20, (15, 17) = 24, (15, 18) = 28, (15, 19) = 32, (15, 20) = 36, (15, 21) = 40, (16, 1) = -50, (16, 2) = -45, (16, 3) = -40, (16, 4) = -35, (16, 5) = -30, (16, 6) = -25, (16, 7) = -20, (16, 8) = -15, (16, 9) = -10, (16, 10) = -5, (16, 11) = 0, (16, 12) = 5, (16, 13) = 10, (16, 14) = 15, (16, 15) = 20, (16, 16) = 25, (16, 17) = 30, (16, 18) = 35, (16, 19) = 40, (16, 20) = 45, (16, 21) = 50, (17, 1) = -60, (17, 2) = -54, (17, 3) = -48, (17, 4) = -42, (17, 5) = -36, (17, 6) = -30, (17, 7) = -24, (17, 8) = -18, (17, 9) = -12, (17, 10) = -6, (17, 11) = 0, (17, 12) = 6, (17, 13) = 12, (17, 14) = 18, (17, 15) = 24, (17, 16) = 30, (17, 17) = 36, (17, 18) = 42, (17, 19) = 48, (17, 20) = 54, (17, 21) = 60, (18, 1) = -70, (18, 2) = -63, (18, 3) = -56, (18, 4) = -49, (18, 5) = -42, (18, 6) = -35, (18, 7) = -28, (18, 8) = -21, (18, 9) = -14, (18, 10) = -7, (18, 11) = 0, (18, 12) = 7, (18, 13) = 14, (18, 14) = 21, (18, 15) = 28, (18, 16) = 35, (18, 17) = 42, (18, 18) = 49, (18, 19) = 56, (18, 20) = 63, (18, 21) = 70, (19, 1) = -80, (19, 2) = -72, (19, 3) = -64, (19, 4) = -56, (19, 5) = -48, (19, 6) = -40, (19, 7) = -32, (19, 8) = -24, (19, 9) = -16, (19, 10) = -8, (19, 11) = 0, (19, 12) = 8, (19, 13) = 16, (19, 14) = 24, (19, 15) = 32, (19, 16) = 40, (19, 17) = 48, (19, 18) = 56, (19, 19) = 64, (19, 20) = 72, (19, 21) = 80, (20, 1) = -90, (20, 2) = -81, (20, 3) = -72, (20, 4) = -63, (20, 5) = -54, (20, 6) = -45, (20, 7) = -36, (20, 8) = -27, (20, 9) = -18, (20, 10) = -9, (20, 11) = 0, (20, 12) = 9, (20, 13) = 18, (20, 14) = 27, (20, 15) = 36, (20, 16) = 45, (20, 17) = 54, (20, 18) = 63, (20, 19) = 72, (20, 20) = 81, (20, 21) = 90, (21, 1) = -100, (21, 2) = -90, (21, 3) = -80, (21, 4) = -70, (21, 5) = -60, (21, 6) = -50, (21, 7) = -40, (21, 8) = -30, (21, 9) = -20, (21, 10) = -10, (21, 11) = 0, (21, 12) = 10, (21, 13) = 20, (21, 14) = 30, (21, 15) = 40, (21, 16) = 50, (21, 17) = 60, (21, 18) = 70, (21, 19) = 80, (21, 20) = 90, (21, 21) = 100})

 

341/441

(12)

# Even if the determinants are in [-200, 200], some values do not exist.
#
# First remark that the 21^2 = 441 products of integers in the range -10..10 are not 441
# different numbers sor some values are more frequent than others.
# For instance, the value 0 appears 21+20 = 41 times.
#
# In fact the number of different product is much lower than 441:

Number_of_different_products := numelems({entries(s2, nolist)})

85

(13)

# There are potentially 401 different values the determinants can get (from -200 to +200).
#
# Let's take a simple example to prove that not allthese 401 values do exist.
# It is clear that the product of two integers in the range -10..10 cannot be a number
# in the open interval (-99, -91) union (91, 99).
# Then, no determinant can have a value in the open range (-199, -191) union (191, 199).
#
#
# It is quite complex to determine analytically the number (andthe values) of all feasible
# determinants, but this becomes simple if we counts all of them.
# First consider all the values of the product of two integers in the range -10..10 by
# using 's2' above:

All_values_of_products := {entries(s2, nolist)};
Navp := numelems(All_values_of_products);

{-100, -90, -81, -80, -72, -70, -64, -63, -60, -56, -54, -50, -49, -48, -45, -42, -40, -36, -35, -32, -30, -28, -27, -25, -24, -21, -20, -18, -16, -15, -14, -12, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, 28, 30, 32, 35, 36, 40, 42, 45, 48, 49, 50, 54, 56, 60, 63, 64, 70, 72, 80, 81, 90, 100}

 

85

(14)

# Then form the (Navp, Navp) matrix whose each column are identical and contain the elements
# of 'All_values_of_products'.

Mavp := <[All_values_of_products[]]> . Vector[row](Navp, 1);

Mavp := Vector(4, {(1) = ` 85 x 85 `*Matrix, (2) = `Data Type: `*anything, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

(15)

# Form the matrix 'Mavp - Mavp^+'.
# This matrix contains all the possible values of the determinants.

Mdet := Mavp - Mavp^+;

Mdet := Vector(4, {(1) = ` 85 x 85 `*Matrix, (2) = `Data Type: `*anything, (3) = `Storage: `*rectangular, (4) = `Order: `*Fortran_order})

(16)

# Select all the different values in Mdet andcount them.
#
# Observe these outcomes correspond to those the brute force above gave us.

All_Feasible_Determinants := { entries(%, nolist) };
Nafd := numelems(All_Feasible_Determinants);

{-200, -190, -181, -180, -172, -171, -170, -164, -163, -162, -161, -160, -156, -154, -153, -152, -151, -150, -149, -148, -146, -145, -144, -143, -142, -141, -140, -139, -138, -137, -136, -135, -134, -133, -132, -131, -130, -129, -128, -127, -126, -125, -124, -123, -122, -121, -120, -119, -118, -117, -116, -115, -114, -113, -112, -111, -110, -109, -108, -107, -106, -105, -104, -103, -102, -101, -100, -99, -98, -97, -96, -95, -94, -93, -92, -91, -90, -89, -88, -87, -86, -85, -84, -83, -82, -81, -80, -79, -78, -77, -76, -75, -74, -73, -72, -71, -70, -69, -68, -67, -66, -65, -64, -63, -62, -61, -60, -59, -58, -57, -56, -55, -54, -53, -52, -51, -50, -49, -48, -47, -46, -45, -44, -43, -42, -41, -40, -39, -38, -37, -36, -35, -34, -33, -32, -31, -30, -29, -28, -27, -26, -25, -24, -23, -22, -21, -20, -19, -18, -17, -16, -15, -14, -13, -12, -11, -10, -9, -8, -7, -6, -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 148, 149, 150, 151, 152, 153, 154, 156, 160, 161, 162, 163, 164, 170, 171, 172, 180, 181, 190, 200}

 

333

(17)

# What are the missing values?

Missing_Determinants := {$-200..200} minus All_Feasible_Determinants

{-199, -198, -197, -196, -195, -194, -193, -192, -191, -189, -188, -187, -186, -185, -184, -183, -182, -179, -178, -177, -176, -175, -174, -173, -169, -168, -167, -166, -165, -159, -158, -157, -155, -147, 147, 155, 157, 158, 159, 165, 166, 167, 168, 169, 173, 174, 175, 176, 177, 178, 179, 182, 183, 184, 185, 186, 187, 188, 189, 191, 192, 193, 194, 195, 196, 197, 198, 199}

(18)

# This mean that there exist no 'RandomMatrix(2^2, generator=-10..10)' whose determinant
# has a value in 'Missing_Determinants'.

Download add_on.mw

@Axel Vogt @one man

You're right, it's pretty common, but one might expect all Mapleprimes users to be a step above.

The plot with scale x = 1850 .. 2100 is not a zoom of the plot with scale x = 1800 .. 2100 : the date are not the same given the way you buid them.

@one man

What's disturbing is that you sometimes put a lot of effort into providing a complete answer, but after a few back-and-forths, the OP becomes silent, so you never know whether what you've done has been helpful or not.
Sometimes you feel like a sucker.

@delvin 

Thanks.

Were you able to go forward from file ddd_2_mmcdara.mw ?

@Carl Love 

You're right Carl, I should have open a post.
Sorry for the inconvenience.

@delvin 

Here is a correction up to the evaluation of fin1.
Check it aand try to a step ahead.

ddd_2_mmcdara.mw

BTW, given the time I have already spent to help you I would be pleased you vote up :-)

@ 

Updated June 20, GMT 7pm, have you suddenly gone mute?

Can't you run my code after modifying the parameter values as described in the last few lines?
Do you still need help?

In which case you have to provide more informations

  • Do you have any idea of alpha AP and aAlpha S upper bounds?
     
  • What were the initial conditions for the experimental data you provide?

@delvin 
I propose you a rewritting of your ddd.mw file.
I modified it up to the command 

fin1 := ...

I have pointed out an inconsistency in the equations (a function depends on xi[n] and you take its derivative wrt t).
I corrected this in a way which seems correct to me, but I ask you to validate what i did.

If it is ok, one could go further following a step by step way.

ddd_1_mmcdara.mw

@ 

for I will not answer it.
Keep doing exchanges within this thread.

TIA

@sursumCorda 

As the new parameters a and b are of very different orders of magnitude, a second transformation b -> 1/beta helps finding values closer to three (error about 1e-6 to 3e-6).
With this transformation  a and b then have relatively closed values and a rand()() inititialpoint seems to become more "robust".

This transformation comes from this observation: if one chooses an initial point such that a=r, b=1/r, then the solution is extremely close to a=r, b=1/r with a value of the objective function closed to 3.
 

restart:

randomize()

168703063807715

(1)

fun := ((2*(x+y+z))*(sqrt(y*z*(z+x)*(x+y))/(z+2*x+y)+sqrt(z*x*(x+y)*(y+z))/(x+2*y+z)+sqrt(x*y*(y+z)*(z+x))/(y+2*z+x))-9*x*y*z/(x+y+z)-2*(x*y+x*z+y*z))/(sqrt(x*y*z/(x+y+z))*(x+y+z-sqrt(27*x*y*z/(x+y+z))))

(2*(x+y+z)*((y*z*(z+x)*(x+y))^(1/2)/(z+2*x+y)+(z*x*(x+y)*(y+z))^(1/2)/(x+2*y+z)+(x*y*(y+z)*(z+x))^(1/2)/(y+2*z+x))-9*x*y*z/(x+y+z)-2*x*y-2*x*z-2*y*z)/((x*y*z/(x+y+z))^(1/2)*(x+y+z-3*3^(1/2)*(x*y*z/(x+y+z))^(1/2)))

(2)

J := eval(fun, [y=a*x, z=b*x]):
J := normal(J) assuming x > 0:

indets(%, name);

K := simplify(J, size):


simplify(eval(K, b=1/beta), size):
opt := Optimization['Maximize'](%, assume = nonnegative, initialpoint = ({seq})(w = (evalf(rand()())), w in [a, beta]));
printf("%1.3e", 3-opt[1])

{a, b}

 

Warning, no iterations performed as initial point satisfies first-order conditions

 

[2.99999895969666319, [a = HFloat(8.81096379e11), beta = HFloat(9.248254999e11)]]

 

1.040e-06

 

J := eval(fun, [x=a*y, z=b*y]):
J := normal(J) assuming y > 0:

indets(%, name);

K := simplify(J, size):


simplify(eval(K, b=1/beta), size):
opt := Optimization['Maximize'](%, assume = nonnegative, initialpoint = ({seq})(w = (evalf(rand()())), w in [a, beta]));
printf("%1.3e", 3-opt[1])

{a, b}

 

Warning, no iterations performed as initial point satisfies first-order conditions

 

[2.99999822553266515, [a = HFloat(4.497678014e11), beta = HFloat(3.176556099e11)]]

 

1.774e-06

 

J := eval(fun, [x=a*z, y=b*z]):
J := normal(J) assuming z > 0:

indets(%, name);

K := simplify(J, size):


simplify(eval(K, b=1/beta), size):
opt := Optimization['Maximize'](%, assume = nonnegative, initialpoint = ({seq})(w = (evalf(rand()())), w in [a, beta]));
printf("%1.3e", 3-opt[1])

{a, b}

 

Warning, no iterations performed as initial point satisfies first-order conditions

 

[2.99999896500431174, [a = HFloat(3.667533877e11), beta = HFloat(9.33962977e11)]]

 

1.035e-06

 

 

 

Download 2D_parameters_2.mw

What initial value of a can we use as a good guess?
The answer is given by the following result

J := eval(fun, [y=a*x, z=x/a]):
K := simplify(normal(J), size) assuming x::real, x > 0:
asympt(K, a, 3)
                             (1/2)       
                          /1\         /1\
                      3 - |-|      + O|-|
                          \a/         \a/

which suggests that the higher the value of a (together with beta=1/b=a) the smaller the error.

A few numerical investigations lead to infer this result:

Led D the value of Digits, (D "large") and set the initial value of a to 10D/4, then the error is 10D/8 :
 

Digits:=400:

simplify(eval(K, b=1/beta), size):
simplify(eval(%, beta=a), size) assuming a > 0:
opt := Optimization:-Maximize(%, initialpoint={a=10^100}, iterationlimit=10^3):
printf("%1.3e", 3-opt[1]);
      1.000e-50
    

 

restart
interface(version)
Standard Worksheet Interface, Maple 2015.2, Mac OS X, ...
solve({a > 0, ln(a*(1 + a)) >= 0}, a);

allvalues(%);
             /      /  2                    \     \ 
            { RootOf\_Z  + _Z - 1, index = 1/ <= a }
             \                                    / 
                      /1  (1/2)   1     \ 
                     { - 5      - - <= a }
                      \2          2     / 

I agree with @Rouben Rostamian : some clarification is needed.

A few remarks:

  • Do not load useless packages, this is the best way to generate conflicts.
  • Do not try to use odeplot if you didn't use successfuly dsolve/numeric before.
  • If you use dsolve/numeric, you must provide initial and/or boundary conditions.
  • Before using a package, CurveFitting for instance, look at the corresponding help page to see what procedures it contains instead of imagining them (NonlinearFit is part of the Statistics package).

You will find in the attached file some elements which lead to a solution of the differential system.
I took some liberties in choosing arbitrary the initial conditions and the values of the parameters (which I all rewrote in, IMO, a more convenient form).

I discuss your "fit to data problem", but this is not conclusive at all: you need to be more precise in your request.

Download data_fitting_mmcdara.mw

@Rouben Rostamian : I hope I didn't step on your toes.

@delvin 

but it"s likely there are som conflicts:

  • between 2D input mode and 1D input more,
  • the Maple versions (I use Maple 2015).
    When I open your file I get a warning message, something like " this code has been written in a newer version and could not run correctly".
    If I agree to "activate" the worksheet, then when I save it under another name, the m file is a Maple 2015 mw file.
    When you will open it you won't get any warning on your side. But the fact is hat there is also a version mixing between 2023 and 2015.

Here is fsh.mw corrected, at least in the sense that the error is removed.
fsh_eq02.mw

2 3 4 5 6 7 8 Last Page 4 of 113