vv

11977 Reputation

19 Badges

7 years, 254 days

MaplePrimes Activity


These are answers submitted by vv

The denominator has many very small values ==> large roundoff errors.
Increasing Digits (e.g. Digits:=15) solves the problem.

If the matrix A has both exact and float entries, then it is obvious that some computations (e.g. the value of a discontinuous function) may return "unexpected" results.
Rank is such a discontinuous function. You have to accept this fact.
E.g. if A has two columns such that the first one is symbolic with at least an irrational entry,
and the second column is nonzero with float entries, the rank(A) is always 2.

restart;

v:=<sqrt(3), 2, 0>:

A:=<v|evalf[25](v)>;

Matrix(3, 2, {(1, 1) = sqrt(3), (1, 2) = 1.732050807568877293527446, (2, 1) = 2, (2, 2) = 2., (3, 1) = 0, (3, 2) = 0.})

(1)

LinearAlgebra:-Rank(A);        # exact

2

(2)

LinearAlgebra:-Rank(evalf(A)); # "approx" but probably "expected"

1

(3)

 

Just replace in param1,...,param4:  alpha*gamma=0.004;   with   gamma=0.004/alpha;
(or use algsubs).

Advices:
- don't load packages which are not needed
- gamma is a Maple constant, don't use it as a variable
- linalg is deprecated; use LinearAlgebra instead.

 

convert(EllipticK(x), Int): 
eval(%,x=1); value(%);

       

          infinity

with(GroupTheory):
g:=DrawSubgroupLattice(SmallGroup(200, 31), labels = ids, output=graph):
GraphTheory:-DrawGraph(g, size=[1200,800]);

Execute

pp:=interface(prettyprint=1);

before Generators(...), then copy.
To restore the old settings:

interface(prettyprint=pp):

 

 

There are only a few automatic simplifications. c*infinity  and  c+infinity  are not automatically simplified even when c is constant (containing symbolic objects).

Pi*infinity, Pi+infinity;

Pi*infinity, Pi+infinity

(1)

(abs(x)+1)*infinity;

(abs(x)+1)*infinity

(2)

simplify(%);