vv

11818 Reputation

19 Badges

7 years, 180 days

MaplePrimes Activity


These are answers submitted by vv

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]);