sursumCorda

1244 Reputation

15 Badges

2 years, 241 days

MaplePrimes Activity


These are replies submitted by sursumCorda

@Carl Love Here is an example: 

m := Matrix([[2, -1, -1, 1, -(1/2), -(1/2), -3, 3/2, 3/2], [-1, 
     2, -1, -(1/2), 1, -(1/2), 3/2, -3, 3/2], [-1, -1, 
     2, -(1/2), -(1/2), 1, 3/2, 3/2, -3], [1, -(1/2), -(1/2), 
     5, -(5/2), -(5/2), 30, -15, -15], [-(1/2), 1, -(1/2), -(5/2), 
     5, -(5/2), -15, 30, -15], [-(1/2), -(1/2), 1, -(5/2), -(5/2), 
     5, -15, -15, 30], [-3, 3/2, 3/2, 30, -15, -15, 
     225, -(225/2), -(225/2)], [3/2, -3, 3/2, -15, 30, -15, -(225/2), 
     225, -(225/2)], [3/2, 3/2, -3, -15, -15, 30, -(225/2), -(225/2), 
     225]], 'shape' = 'symmetric', 'datatype' = float[8]):
Student:-NumericalAnalysis:-MatrixDecomposition(m, 'method' = 'LDLt'): # this works 
LDLT(m); # this does not work 
                              FAIL

Perhaps I misused the `LDLT` procedure? 

@Christopher2222 The latest review is: https://www.wolfram.com/mathematica/compare-mathematica/files/ReviewOfMaple2025.pdf. (See also https://www.wolfram.com/system-modeler/modeling-tools-comparison/index.php and https://www.wolfram.com/mathematica/compare-mathematica/compare-mathematica-and-maple.html.) 
It is worth noting that a member of staff of the WRI also adds some functions into Mma that have been added into new releases of Maple, e.g., CaterpillarTreeQ (28 March 2025). 

It seems that the conditioned `patmatch` does not recognize something like “a(b)(c)” (as well as D(f)(…) in this problem). 
Here is a minimal working example: 

patmatch(a(b)(c), conditional(d::anything, _has(d, b)));
Error, (in PatternMatching:-AlgStruct:-Match) string or symbol expected for substring

@TechnicalSupport Many thanks for not forgetting this issue! 

@Joe Riel Thanks. However, if the procedure does not return the specific argument, this workaround will no longer work. 
Besides, the coercion and structured types seem to be mutually exclusive; I cannot use something like coerce(set(posint), …). Is this another bug? 

@Carl Love Thanks for your concise improvement. The only disadvantage is that the `?()` operator is not easily searchable in the documentation. 

@Kitonum As a side note, “map(`[]`@f@op, L);” may be shortened to “map2(`?()`, [f], L);”. (I saw this question while searching for pre-allocation.) 

@C_R I don't think this is an easy job.  
In different interfaces, the outputs are distinct: 

But the common point is that in 1-D math Maple considers the Unicode character “λ” to be different from the Greek symbol “lambda”! 

I find that searching for the Unicode letter “λ” (instead of “lambda”) is enough. Unfortunately, this trick does not work for subscripted variable names (for example, “λ₁” does not match the 2D output of “lambda__1”…). 

@dharr Thanks for exploring. 
Strangely, `eliminate` works fine when I set a (redundant) dummy variable _Y

> expr := `~`([a, b, c]^2 = 4*[y*z/((x+y)*(x+z)), z*x/((y+z)*(y+x)), x*y/((z+x)*(z+y))]):
> eliminate([expr[], x+y+z = _Y, _Y <> 0], [x, y, z])[-1];
   /  / 2        2            2\ / 2        2            2\\ 
  { a \a  - 4 + b  + a b c + c / \a  - 4 + b  - a b c + c / }
   \                                                       / 

But if I use “[expr[], x+y+z = 0]”, the result will remains empty. (Note that xyz can be zero, for instance, [x, y, z] =~ [1, 2, -3].) 

@Axel Vogt Thanks. Strangely, if I write something like “p += …” and “f mod= …”, Maple will raise an error.

@acer Many thanks. This is a useful trick! 

@acer Thanks. After some search, I found that “irem((j - 1)!^2, j)” is just OEIS A010051 (1 if n is prime, else 0), yet the equivalent “ifelse(isprime(j), 1, 0)” cannot be compiled. (Maybe there is a mechanism to indicate operations that should be directly evaluated in the Maple kernel rather than being compiled into low-level code?)

@Kitonum Strangely, the plot generated by MaplePrimes is correct instead: plots:-display(plots:-implicitplot(y=x**2,x=-1..+1,y=0..(x+1)/2,'color'=

@romanrieme You can still use “V_D2[1]” as usual. 

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