vv

14027 Reputation

20 Badges

10 years, 42 days

MaplePrimes Activity


These are replies submitted by vv

@Markiyan Hirnyk 

The coefficients of F(n,a,1) and F(n,a,b) seem to be the same, so it should be easy to obtain them.
 

@Markiyan Hirnyk 

It was Maple + "incomplete induction":

with(LinearAlgebra):
F:=(n,a,b) -> Matrix(n, (i, j) ->binomial(a*i+b*j, j) );
factor(expand(Determinant(F(6,a,1))));
R:=(n,a)-> 1/n!*Product(1+k*a,k=1..n)*a^(n*(n-1)/2); # guess for b=1

 

1.  For the convenience here is a compact statement of the theorem:

2. It is remarkable that is is fast but the simplification of eval(Circle, P) to 0  seems to need some work e.g.

simplify(convert(%,exp));

and is not fast at all. Probably there are better transforms to obtain this faster.

 

restart;

f:="d:/tmp/fis.txt";

"d:/tmp/fis.txt"

(1)

str:=
"This is line 1 \\\\
This is line 2";

"This is line 1 \\ 
This is line 2"

(2)

writebytes(f, str);
close(f);

33

(3)

str1:=readbytes(f,infinity,TEXT);

"This is line 1 \\ 
This is line 2"

(4)

evalb(str=str1);

true

(5)

str1;

"This is line 1 \\ 
This is line 2"

(6)

convert(str,bytes); nops(%);

[84, 104, 105, 115, 32, 105, 115, 32, 108, 105, 110, 101, 32, 49, 32, 92, 92, 32, 10, 84, 104, 105, 115, 32, 105, 115, 32, 108, 105, 110, 101, 32, 50]

 

33

(7)

Note that in str there is a space after \,  which of course also appears in str1.

If you don't want it, use  5 backslashes folowed by a space

 

restart;

f:="d:/tmp/fis.txt";

"d:/tmp/fis.txt"

(8)

str:=
"This is line 1 \\\\\
This is line 2";

"This is line 1 \\
This is line 2"

(9)

writebytes(f, str);
close(f);

32

(10)

Not that now only 32 bytes are written.

"This is line 1 \\
This is line 2"

(11)

str1:=readbytes(f,infinity,TEXT);

"This is line 1 \\
This is line 2"

(12)

convert(str,bytes); nops(%);

[84, 104, 105, 115, 32, 105, 115, 32, 108, 105, 110, 101, 32, 49, 32, 92, 92, 10, 84, 104, 105, 115, 32, 105, 115, 32, 108, 105, 110, 101, 32, 50]

 

32

(13)

 


 

Download str.mw

No, it confirms it!

@Markiyan Hirnyk 

@Markiyan Hirnyk 
Consider

f:=z -> sqrt(1/z)*erf(sqrt(z));  # our function
g:=z -> 1/sqrt(z)*erf(sqrt(z)); 

g is an entire function (0 is a removable singularity) and f equals g except on the negative real axis.

f is discontinuous on the negative axis but this is difficult to see in a standard plot (practically it is g which is plotted).

f(0):=1:
A:=Matrix(40,40, (i,j)-> evalf(Re(f((i-20)/10 + I*(j-20)/10)))):
plots:-surfdata(A);

 

 

 

    Probably such "guessing" problems should be declared "mathematically valid" only if they ask for the shortest Maple expression (as in Kolmogorov complexity) and two such minimal expressions do not exist.
    Of course Maple could be replaced with another language, but Maple is the best :-)

Sorry, I don't see any bug.

@Markiyan Hirnyk 

I don't understand what workaround you are talking about.
The only issue is that in the help _C is not mentioned; probably it is considered obvious.

@Markiyan Hirnyk 

@Preben Alsholm 

But the comparison is irrelevant because RK4 has a fixed step while in RK45 it is adaptive (as implemented in Maple).

@one pound 

Formally the code works for q := Int(1/ln(t), t = 0 .. x)   too
but it is mathematically incorrect (the new integrals do not exist!).

@one pound 

You may use integration by parts but for
q := Int(1/ln(t), t = exp(1) ..  x);

and then get rid of the constant (which does not matter).

@rlopez 

The problem with this approach is that all the integrals (except q itself) are divergent (even as Cauchy Principal Value) for x>1.

@Kitonum 

No, it is in the source code of GAMMA.

 

@Kitonum 

This is by design because GAMMA increases very fast.
If you really want such huge numbers then set (not recommended):

`GAMMA/magic`:=100,100,infinity,50;

and use s(100);

 

First 99 100 101 102 103 104 105 Last Page 101 of 177