vv

13837 Reputation

20 Badges

9 years, 320 days

MaplePrimes Activity


These are replies submitted by vv

Working with "generic" functions is essential for Maple and for the user.
The interpretation of   a(x+1)   as   a*(x+1)  would destroy  this functionality.

@Alex Bowden 

@Earl 

phi1 and phi2 are obtained from the intersection:

a,b,c,  r := 9/2,6,3, 4;
el:=[x=a*sin(phi)*cos(theta),y=b*sin(phi)*sin(theta), z=c*cos(phi)];
sp:=[x=r*sin(phi)*cos(theta),y=r*sin(phi)*sin(theta), z=r*cos(phi)];
eq:=eval(x^2+y^2+z^2=r^2,el);
eval(eq, sin(phi)^2=1-cos(phi)^2);
isolate(%, cos(phi)^2);
cos2ph:=simplify(rhs(%));
# plot(cos2ph,theta=0..2*Pi);
phi1:=arccos(sqrt(cos2ph));
phi2:=Pi-phi1;

Please note that for other values  of a,b,c,r  we may need to swap phi,psi or the axes to use the same formulae.
Note also that the shere was not cropped; it was simply obfuscated by the ellipsoid.
Actually phi1, phi2 are needed only for the intersection curve(s).
 

@acer 

f:= n -> det(n) - a^(n*(n+1)/2)*(1-b);

factor(f(6));

It is possible to obtain this by hand manipulating the rows&columns.

@_Maxim_ 

The first workaround does not work for MultiSeries:-series
(which was the actual question).

For the second one.
nu3r contains all the branches of the roots in nu3.
It is not clear for me what means the RootOf in the answer: is sqrt(w^2+2*w) considered with all branches? Independently?
The RootOf is ambiguous in such (nonpolynomial) cases. Anyway it will be difficult to choose the correct branch.

 

 

@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!).

First 98 99 100 101 102 103 104 Last Page 100 of 176