vv

14257 Reputation

20 Badges

11 years, 13 days

MaplePrimes Activity


These are replies submitted by vv

@Rouben Rostamian  

If f is the name of a procedure then  f[u](x)  actually calls  f(x), but in the body of f the index/indices
u can be retrived (and used) via  op(procname).
To check whether f is invoked with an index one may use  type(procname,indexed).

(I am not sure whether this is documented, but I found about it long time ago in a Maple book which I do not remember). 

@Carl Love 

But ?type,property clearly says:

Note: Types are properties, but not all properties are types.

Do you know a type which is not property? (I don't mean "proper").

@Jason Lee 

> 

interface(rtablesize=20);

10

(1)
> 

A := Matrix([[4, 7, 5, 2, 6, 4, 9, 7, 5, 8, 5], [7, 7, 3, 9, 4, 5, 2, 3, 5, 6, 8], [5, 6, 5, 6, 6, 3, 7, 4, 9, 1, 9], [9, 1, 4, 8, 9, 4, 4, 2, 1, 3, 3], [5, 6, 8, 2, 2, 1, 2, 9, 5, 4, 1], [4, 7, 9, 6, 9, 2, 3, 5, 6, 3, 5], [7, 2, 5, 7, 3, 4, 9, 8, 1, 8, 9], [5, 7, 1, 2, 7, 9, 9, 2, 2, 4, 7], [1, 6, 5, 3, 9, 9, 1, 5, 7, 4, 2], [3, 7, 8, 7, 8, 3, 6, 4, 6, 9, 2]]);

_rtable[18446744074327622950]

(2)

Select the 6-th column

> 

b:=A[..,6];

_rtable[18446744074362862038]

(3)

Select the desired columns from A

> 

C:=A[..,[1..5,7..11]];

_rtable[18446744074362856622]

(4)

The linear system (matrix form)   C.x = b   has the solution  x = C^(-1) . b   (provided that C is not singular)

> 

C^(-1) . b;

_rtable[18446744074362839518]

(5)

The 6-th element of the solution vector:

> 

%[6];

63695593/46022164

(6)

Note that C is indeed nonsingular:

> 

LinearAlgebra:-Determinant(C);

-92044328

(7)
> 

 

 

Download linsyst.mw

@Jason Lee 

What exactly is not clear? I have used your notations.
But I just noticed that you are using Maple T.A. and I am not sure whether this works here.

@Carl Love 

Why dou you think that is is using list(rational) as a type? Of course, any type is a property.

is(list(rational), property);
   true

type(list(rational), property);
    true

Probably your notion of "proper property" is useful.

 

@_Maxim_ 

Of course is uses simplifications. It should  return FAIL much more frequently (when in doubt)  but it does not probably for "commercial" reasons; it prefers `false`. The assume facility deserves a much more careful implementation.

Surprisingly:
is(exp(1)+Pi,irrational);
    FAIL
So, it seems that is adopts a special strategy for properties which are not types.

 

Also:

is(Pi,irrational);
                              true
is(Pi^2,irrational);
                              FAIL
is(exp(1),irrational);
                              true
is(exp(1)^2,irrational);
                              FAIL
is(exp(2),irrational);
                              true

is(exp(sqrt(2)),irrational); #does not know Lindemann theorem (from 1882!)
                              FAIL

 

 

@st104290 

As you see in the example, sort itself does not alter the terms. Probably you have used some other command.
You may append assuming t>0  to that command.

@Markiyan Hirnyk 

As always you want to have the final word even when you are wrong.
But two pages earlier Fichtenholz states:  "generalized sum" (in the sense of Poisson).
He also says that actually Abel was not interested in the summation of divergent series.

Note.
In 1828 Abel wrote `Divergent series are the invention of the devil, and
it is shameful to base on them any demonstration whatsoever.'

[Abel died in 1829]

@Markiyan Hirnyk 

It is also called "power series method" or Poisson (e.g. in the Mathematical Analysis book by G.M. Fichtenholz).

 

@Markiyan Hirnyk 

Genericity is not strictly defined in Maple. There are plenty of such examples.
I don't think that the situation is going to change soon. The assume facility is too weak.
The correct answer for a real k should be:  piecewise(k<-1, 0, k=-1, 1, infinity)

 

sum(binomial(i+k,k),i=0..infinity) assuming k>-2,k<-1; #ok
                               0
sum(binomial(i+k,k),i=0..infinity) assuming k>-2,k<=-1; #wrong
                               0
sum(binomial(i-1,-1),i=0..infinity);simplify(%);
                  infinity                   
                   -----                     
                    \                        
                     )                       
                    /     binomial(i - 1, -1)
                   -----                     
                   i = 0                     
                  infinity                   
                   -----                     
                    \                        
                     )                       
                    /     binomial(i - 1, -1)
                   -----                     
                   i = 0                     
1+sum(binomial(i-1,-1),i=1..infinity);  # ok
                               1
sum(binomial(i+k,k),i=0..infinity) assuming k>=-1; # wrong
                            infinity
sum(binomial(i+k,k),i=0..infinity) assuming k>-1; # ok
                            infinity

 

 

 

@Preben Alsholm 

Probably the OP has converted somehow the numbers into "atomic" variables (via patettes or some 2d input "facilities").
Such as:

`#mn("13")` + 13;
     13+13

@Carl Love 

"<==" is obvious.

"==>" Follows from a lemma due to Birkhoff:

For each doubly stochastic matrix there is a permutation of the columns such that all the diagonal elements are nonzero.
(see Horn R. A., Johnson C. R. - Matrix Analysis. Cambridge 2013).

[Note that for our matrix M, (1/2)*M is doubly stochastic].

@acer 

I like Carl's main ingredient which is worth formulating explicitely:

Lemma.
A binary square matrix M has two ones in each line and each column iff
there exist a permutation matrix P and a dearangenent matrix Q such that M = (I + Q).P
(the representation is not unique).

 

 

@Carl Love 

and vote up, of course!

P.S.  Probably    runtime + time(algorithm)  >>  time(brute force)   in this case   :-)
 

@Preben Alsholm 

In other cases an error appears:

evalf(Int(1/t^2, t=I .. I*infinity));
Error, (in evalf/int) non-numeric integration limit encountered

so, probably the parameters are not correctly checked.
But anyway evalf should transform correctly the complex limits into reals.

First 110 111 112 113 114 115 116 Last Page 112 of 178