Alejandro Jakubi

MaplePrimes Activity


These are replies submitted by Alejandro Jakubi

This seems to work:

`expand/.`:=FromInert(subs("&*"=".",ToInert(eval(`expand/&*`)))):
expand(a.(b+c)); (a . b) + (a . c)

though I have not made any more testing.

@JacquesC 

This is a simplified version of this bug:

a[0]:=a:
simplify(a);

Error, (in simplify/table) too many levels of recursion

Tracing it, I see that simplify/table and simplify call each other many times.

From the user point of view, I find that the main problem with indexed names is not its fragile nature, but that its usage is promoted in some areas of the documentation.

@JacquesC 

This is a simplified version of this bug:

a[0]:=a:
simplify(a);

Error, (in simplify/table) too many levels of recursion

Tracing it, I see that simplify/table and simplify call each other many times.

From the user point of view, I find that the main problem with indexed names is not its fragile nature, but that its usage is promoted in some areas of the documentation.

@acer 

Actually, I meant the last paragraph in the Description section, and checked that it is OK in the online version. But I have not went down to check that last example too. I have no idea at this moment what could have gone wrong with the online version. The Maple 14 Standard GUI version of this help page displays this example OK, both in 1D and 2D views. I can just note that the trailing tilde is missing in the online version, though it stands in other online pages as in the Standard GUI version.

Yes, that difference in regards to variables in procedures is documented in ?assuming,details. What does not seem documented is the difference in regards to variables in attributes, as in e.g.:

restart:
assume(x>0):
VectorCalculus:-SetCoordinates(cartesian[x, y, z]):
VectorCalculus:-Gradient(x) ;
_
e
x

restart:
VectorCalculus:-SetCoordinates(cartesian[x, y, z]):
VectorCalculus:-Gradient(x) assuming x>0;
_
0 e
x



@PatrickT 

I have found a sequence of simplifications that confirms the equality, under suitable restrictions. This sequence is a bit long and I will not post it here as I am disgusted with the recent changes in the forum. I may send you the worksheet by email if you need it.

@PatrickT 

I have found a sequence of simplifications that confirms the equality, under suitable restrictions. This sequence is a bit long and I will not post it here as I am disgusted with the recent changes in the forum. I may send you the worksheet by email if you need it.

@acer 

It seems to me that something is basically wrong in the forum design if Will has to spend his time converting posts to a questions, answers to comments, etc (not to mention a large fraction of primes 1 articles wrongly classified).

There is/was a package TDTools in the share library. See this thread.

There is/was a package TDTools in the share library. See this thread.

By fixing only epsilon=1/2, another positiveness constraint becomes evident:

s:=simplify(eval(expr1-expr2,[epsilon=1/2])) assuming positive ;

/
|
|
/ 1 \ |
|-------------| |
1/2 / 1 \1/2 \2 (sigma - 1)/ |
s:=- 2 (-1 + beta) (r + d) |- ---------| k \
\ -1 + beta/

/ 1 \
|- -------------|
\ 2 (sigma - 1)/
/ / 1 \ / 1 \ \
| |-----| |-----| |
| \sigma/ \sigma/ |
\alpha k + k - k alpha/

/ / 1 \\1/2\
| |- ---------|| |
| \ sigma - 1/| |
|/ / 1 \ / 1 \ \ | |
|| |-----| |-----| | | |
|| \sigma/ \sigma/ | | |
- \\alpha k + k - k alpha/ / /

/ 1/2 1/2
/ (A alpha beta)
/

Hence, simplification proceeds by assuming (alpha*k+k^(1/sigma)-k^(1/sigma)*alpha)>0:

subs((alpha*k+k^(1/sigma)-k^(1/sigma)*alpha)=u,s):
simplify(%) assuming positive;
0

By fixing only epsilon=1/2, another positiveness constraint becomes evident:

s:=simplify(eval(expr1-expr2,[epsilon=1/2])) assuming positive ;

/
|
|
/ 1 \ |
|-------------| |
1/2 / 1 \1/2 \2 (sigma - 1)/ |
s:=- 2 (-1 + beta) (r + d) |- ---------| k \
\ -1 + beta/

/ 1 \
|- -------------|
\ 2 (sigma - 1)/
/ / 1 \ / 1 \ \
| |-----| |-----| |
| \sigma/ \sigma/ |
\alpha k + k - k alpha/

/ / 1 \\1/2\
| |- ---------|| |
| \ sigma - 1/| |
|/ / 1 \ / 1 \ \ | |
|| |-----| |-----| | | |
|| \sigma/ \sigma/ | | |
- \\alpha k + k - k alpha/ / /

/ 1/2 1/2
/ (A alpha beta)
/

Hence, simplification proceeds by assuming (alpha*k+k^(1/sigma)-k^(1/sigma)*alpha)>0:

subs((alpha*k+k^(1/sigma)-k^(1/sigma)*alpha)=u,s):
simplify(%) assuming positive;
0

I get this:

simplify(eval(expr1-expr2,[alpha=1/2,epsilon=1/2])) assuming positive ;
                                  0

@acer 

A start, for identifying cases, could be:

M:=Matrix([[1,0,0,b1],[2,k,0,b2],[m,k,1,b3]]):
s:=solve(LinearAlgebra:-GenerateEquations(M,[x1,x2,x3]),
 [x1,x2,x3],AllSolutions,ConditionalSolutions):
numer~((rhs-lhs)~(op(s)));
map(PDETools:-casesplit,%,[x1,x2,x3,[b1,b2,b3,k]]);

[-x1 + b1, b2 - 2 b1 - k x2, b3 - m b1 - x3 + 2 b1 - b2] -2 b1 + b2 [[x1 = b1] &where [], [x2 = ----------] &where [k <> 0], k b2 [b1 = ----, k = 0] &where [], 2 [x3 = -m b1 + b3 + 2 b1 - b2] &where []]

@acer 

A start, for identifying cases, could be:

M:=Matrix([[1,0,0,b1],[2,k,0,b2],[m,k,1,b3]]):
s:=solve(LinearAlgebra:-GenerateEquations(M,[x1,x2,x3]),
 [x1,x2,x3],AllSolutions,ConditionalSolutions):
numer~((rhs-lhs)~(op(s)));
map(PDETools:-casesplit,%,[x1,x2,x3,[b1,b2,b3,k]]);

[-x1 + b1, b2 - 2 b1 - k x2, b3 - m b1 - x3 + 2 b1 - b2] -2 b1 + b2 [[x1 = b1] &where [], [x2 = ----------] &where [k <> 0], k b2 [b1 = ----, k = 0] &where [], 2 [x3 = -m b1 + b3 + 2 b1 - b2] &where []]
First 105 106 107 108 109 Page 107 of 109