vv

14077 Reputation

20 Badges

10 years, 69 days

MaplePrimes Activity


These are replies submitted by vv

@tomleslie 

I thought that the point was clear.

restart;

kernelopts(version);
with(Iterator):
P := CartesianProduct([1,2,3,4],[1,2,3,4], compile=false);
seq(p[], p=P);
add(p[], p=P);

`Maple 2021.1, X86 64 WINDOWS, May 19 2021, Build ID 1539851`

 

CartesianProduct([1, 2, 3, 4], [1, 2, 3, 4], 'compile' = false)

 

Vector[row](2, {(1) = 1, (2) = 1}), Vector[row](2, {(1) = 2, (2) = 1}), Vector[row](2, {(1) = 3, (2) = 1}), Vector[row](2, {(1) = 4, (2) = 1}), Vector[row](2, {(1) = 4, (2) = 2}), Vector[row](2, {(1) = 3, (2) = 2}), Vector[row](2, {(1) = 2, (2) = 2}), Vector[row](2, {(1) = 1, (2) = 2}), Vector[row](2, {(1) = 1, (2) = 3}), Vector[row](2, {(1) = 2, (2) = 3}), Vector[row](2, {(1) = 3, (2) = 3}), Vector[row](2, {(1) = 4, (2) = 3}), Vector[row](2, {(1) = 4, (2) = 4}), Vector[row](2, {(1) = 3, (2) = 4}), Vector[row](2, {(1) = 2, (2) = 4}), Vector[row](2, {(1) = 1, (2) = 4})

 

Array(%id = 36893490222749770084)

(1)

restart;

with(Iterator):
P := CartesianProduct([1,2,3,4],[1,2,3,4], compile=false);
#seq(p[], p=P);
add(p[], p=P);

_m2075292895968

 

Error, (in anonymous procedure) invalid input: CartesianProduct:-AlgH expects its 1st argument, A, to be of type Array(datatype = integer[4]), but received Array(1..14, {(1) = 2, (2) = 7, (3) = 10, (4) = 12, (5) = 2, (6) = 0, (7) = 0, (8) = 1, (9) = 2, (10) = 4, (11) = 4, (12) = 1, (13) = 1, (14) = 0}, datatype = integer[4])

 

 

@JAMET You probably do not have a directory C:/tmp. Just create it, or use an existing directory (i.e. change "C:/tmp/test.mla" to something else, for example:
cat(kernelopts(homedir),"/test.mla") ).

 

@Christian Wolinski Yes, the (n,d) group appears in the column Gnd in the wiki page. For example, n=12, d=3  ==> Alternating group.

@shce For such substitutions there is the patmatch command (in combination with evalindets). The code would be simpler; I did not try to use it because it is more fragile.

@yangtheary The coordinates for Q, S, N are computed, so, it's easy to see that they are collinear.
Alternatively, area(Q,S,N) = 0.

@digerdiga It is instructive to compute rigorously the integral using residues. The contour must surround  z=1 and z=-1, and the branch must use 0 < Arg(z) < 2*Pi.

@mmcdara  D is not the middle of the segmant BC (the angle bisector theorem must be used). eq_AD is wrong too.

@666 jvbasha As I have mentioned, C1=0 because the definite integral started from x=0, so A2(0)=0. (Psi = A2(x)).

@paulor chin is the inverse of the function chi restricted to the interval [ii[2*n-1], ii[2*n], for n = 1,2,3,4. (Note that chi is strictly monotonic on these intervals). So, your solve(H(k,i), i)  equals  chin(w(k)), for each of the 4 intervals.

Note that if you are satisfied with an implicit plot (without the separation of the branches), you may use acer's approach..

@Michael_Watson 

Actually, a is not needed:

restart;

e := L/(z*sqrt(z^2 + L^2));

L/(z*(L^2+z^2)^(1/2))

(1)

asympt(e, L, 3);

1/z+O(1/L^2)

(2)

asympt(e, z, 3) assuming L>0;

L/z^2+O(1/z^4)

(3)

 

@tomleslie Maybe Ronan wants some global variables to be used enywhere. Of course it's not the best practice but it's simple and useful sometimes.

@Detlef Hoyer It would break some standard constructs.
E.g. (exp - 1)(x)  will not be any longer the expected  exp(x) - 1.

@mmcdara The procedure returns true if the two varieties are the same. For your second example it gives correctly "false" because the first variety is a line and the second is a plane.
Note that it works for more general varieties, e.g.
EQSYS( {x+y+z=1}, {x=u+1, y=v+1, z=-u-v-1}, param={u,v});   # true

The procedure returns an error if one of the varieties is empty, but it is easy to change this:

EQSYS:=proc(S1::set(`=`), S2::set(`=`), {vars:={x,y,z}, param:={t}}) 
  local A:=eliminate(S1,param)[2], B:=eliminate(S2,param)[2],
        SA:=solve(A,vars), SB:=solve(B,vars);
  if SA=NULL then SA:={} fi; if SB=NULL then SB:={} fi;
  evalb( eval(B,SA) union eval(A,SB) = {0});
end:


 

@mmcdara For b) the invariant is  L(M(a,b), N(a,b)) = L(a,b).
So, L(a[n], b[n]) = L(a[0], b[0])   and let n --> oo.

@GunnerMunk You should not use the document mode for teaching. It is used mainly for presentations.

First 27 28 29 30 31 32 33 Last Page 29 of 177