## 787 Reputation

9 years, 146 days

## Shortcut or implicit operation?...

Maple 2018

I discovered incidentally that the command  Matrix(3, 3, `-`) (the number 3 is purely illustrative) returned the same result than the command Matrix(3, 3, (i,j) -> i-j).
In the same way `+` realizes (i,j) -> i+j), `*` realizes (i,j) -> i*j), ...

More surprisingly `.` realizes (i,j) -> i*j while I'm in worksheet mode, with "old" maple input style, and that the command 2.3 does not answer 6 but concatenates 2 and 3.

Is this a known behaviour or an undocumented feature?

## How to improve this rendering?...

Hi,

In order to improve the rendering of the table returned by DocumentTools:-Tabulate, I would have like it to contain the mathematical sign for infinity instead of the word infinity itself.
Example

a := infinity:
print(a);                      # what I would like to obtain
DocumentTools:-Tabulate([a]);  # contains the word "infinity"

Is it possible to fix this?
TIA

PS: Avoid spending too much time on it because it's only cosmetics

## An issue with package Tolerances...

Maple 2018

Hi,
I face a problem using Tolerances:-NominalValue and Tolerances:-ToleranceValue on a quantity constructed from add.

Example

restart:
with(Tolerances):
x := 10 &+-1:
y := 20 &+- 2:
z := 3*x+2*y;
NominalValue(z);
# returns 70 as expected
ToleranceValue(z);   # returns 7 as expected

Now I define another quantity Z this way:

Z := add([3, 2] *~ [x, y]);
(or equivalently add(ListOfCoeffs[k]*ListOfVars[k], k=1..K) where ListOfCoeffs and ListOfVars are previously defined adhoc lists)

Both NominalValue(Z) and ToleranceValue(Z) return an error.
PS: already (and this probably explains that) Z does not appear as 70 +/- 7 but as 3*Interval(...)+2*Interval(...) (lprint confirmed)

How can I obtain NominalValue(Z) and ToleranceValue(Z) when Z comes from 'add' constructor?

## Statistics:-Mean fails...

Maple 2018

Hi,

I submit you this strange result:
for somenumerical  values of a, b, c  (a, b, c real and b > a), Maple 2018 is not able to compute the mean of
c*U where U is a Uniform random variable with support [a, b].

 > restart:
 > with(Statistics):
 > interface(version);
 (1)
 > z := .4070716688*RandomVariable(Uniform(0.12-0.02*0.12, 0.12+0.02*0.12)); Mean(z);
 > z := .4070716688*RandomVariable(Uniform(a, b)); Mean(z); subs({a=0.12-0.02*0.12, b=0.12+0.02*0.12}, %);
 (2)
 >

PLEASE: Maple still fails if I replace  a = 0.12 -0.02*0.12 by its value 0.1174
and b = 0.12+0.02*0.12 by its value 0.1224

This is incomprehensible and could hide a more profound problem.

## "int" doesn't return a result in Maple 2...

Maple 2018

Hi,

This more a warning to focus your attention on a specific point than a true question.

I submit you this test case which works in Maple 2015 and Maple 2016 but not in Maple 2018.

In a few words:

• let X and Y two independant random variables with respective distributions Normal(mu__x, sigma__x) and
Normal(mu__y, sigma__y)

• let Z := q -> cos(q)

• You can easily verify that Maple can compute the formal expression of Mean(Z(X)) and Variance(Z(X))
(which means that it could compute Z(X+Y) for X+Y is just another gaussian RV)

• What I found is that:
1. Mean(Z(X+Y)) returns same expressions in Maple 2015 and Maple 2016, but a different one in Maple 2018.
Luckily the later is more readable than the former ones, and closer to the one of Mean(Z(U))  where U=X+Y is the RV of distribution Normal(mu__x+mu__y, sqrt(sigma__x^2+sigma__y^2))
This suggest that the integration algorithm has evolved somewhere in between Maple 2016 and Maple 2018

2. While Maple 2015 and Maple 2016 return an evaluated result for Variance(Z(X+Y)) Maple 2018 fails.

Can this "failure" be fixed by some adhoc option of Variance?
Or could it come from a "regression" in the implementation of this procedure (or of the underlying int procedure) in Maple 2018?

PS: I did not try to compute Variance(Z(X+Y)) from an explicit double integration

 First 6 7 8 9 10 11 12 Last Page 8 of 22
﻿