Carl Love

Carl Love

28025 Reputation

25 Badges

12 years, 313 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are answers submitted by Carl Love

Listing all 3.6 million elements of S10 is silly. Listing (or even storing in memory) all ~10^18 elements of S20 is impossible.

If you want to list all permutations on n elements (for reasonably small n), you can do it by

S||n:= combinat:-permute(n);

Each of these permuations can be converted to disjoint cycle notation by convert(..., disjcyc):

map(convert, S||n, disjcyc);


A more reasonable goal is to create structures in Maple that Maple understands to be the groups S10 or S20 without creating every member. You can do this with permgroup. The symmetric group on n elements (S||n) can be generated by two permutations: a rotation (cycle) of all the elements and a transposition of any two.

S10:= permgroup(10, {rot= [[$1..10]], trans= [[1,2]]});

This group object and its members can be manipulated by the commands in package group. See ?group . (Oddly, permgroup is a top-level command, not explicitly part of the package.)

Could you be more specific about making a list of transpositions and cycles?

Just guessing here based on very limited information: My best guess is that the variable n has not been set. It must have a numeric value for the above code to work. Please post (upload) your entire worksheet.

You just need plot(f(x)-g(x), x= 0..1).

I am using the OP's intended definition of phi, as described in the first comment above.

omega:= z-> 2*<Re(z), Im(z), 1>/(1+abs(z)^2):

phi := z-> (l*z+a)/(1-l*conjugate(a)*z):

First, you need to use the exponential function as exp(x) rather than e^x; the symbol e hasno predefined meaning in Maple input, although it does appear in output.

Second, you need to make some assumptions in order for Maple to be able to simplify the expressions, especially the derivatives, and for Maple to be able compute the limits. The following assumptions seemed reasonable to me; they are not necessarily all needed. (Note that evalc automatically assumes that all variables are real.)

assume(-Pi < theta, theta <= Pi, xi::real, eta::real, l::real, r > 0);
f:= evalc(eval(omega(phi(z)), [z= r*exp(I*theta), a= xi+I*eta]));
fr:= simplify(map(diff, f, r));
map(limit, r^2*fr, r= infinity);

... lengthy expressions omitted, but here are the limits:

You asked:

Is it possible to generate a list of values for a function in the form of an ordered pair, like a cartesian plane, i.e. ( x, f(x) )? And how can I plot a graph with this output?

One of the easiest ways to generate the list of ordered pairs is to use plot and extract the point data from the plot. Like this

plot(f(x), x= -1..1);

... plot appears here ...

L:= convert(op([1,1], %), listlist);

... list of points appears here.

You can use op to extract the operands. The odd-numbered operands are the conditions, and the even-numbered operands are the "pieces". For example,

op(3, f);

op(4, f);

 2

op(6, f);

The following produces a list of equations of the coefficients all equated to 0.

[coeffs(collect(lhs(EQ), a), a)] =~ 0;

The preliminary collect step may be superfluous in this case but would be required for some more-complicated polynomials.

The normal is not a keyword in the command collect(a, x, normal). Rather, it is the simplifier procedure. See ?normal. It is a form a simplification not as intense as that provided by simplify.

If I cut-and-paste your two columns of data directly into a worksheet, it automatically becomes a 7x2 Matrix. To convert a Matrix M into the form that you seem to want, use convert(M, listlist).

The matrix M1 is equal to [[1,x], [1,x]] (i.e., two identical rows). Hence it is singular and cannot be inverted.

You should change GenerateMatrix to LinearAlgebra:-GenerateMatrix. (Not that that will fix the singular matrix.)

series, rhs,and convert(..., polynom) are all built-in commands.

Use two sets of unevaluation quotes around each Intat in the rule like this:

ToSumInt:=
     ''Intat''(
           A::algebraic*Sum(v::algebraic,r::{name,equation})*
           B::algebraic,u::equation
     )= Sum(''Intat''(A*v*B,u),r)
:
J:= Intat(f(xi)*Sum(g(n*xi), n), xi= x);

applyrule(ToSumInt, J);

Note that MaplePrimes makes two single quotes look like a double quote.

Regarding your second problem, please post plaintext of the expression that useInt does not work on.

I think that you'd like a simple algebraic function f of (i,j) such that u[i,j] = Sol[f(i,j)] for all relevant i and j. The following will work regardless of how complicated the order of the entries in Sol is.

UtoSol:= table((`[]`@op)~(Sol) =~ [$1..nops(Sol)]):
Sol_idx:= (i,j)-> UtoSol[[i,j]]:

For example,

Sol_idx(1,1);

                             9

Sol[Sol_idx(1,1)];

 

 

You are missing a multiplication sign between the two polynomials in parentheses.

Here is another way to do a polar plot of a numeric dsolve solution:

Sol:= dsolve({diff(r(t),t)=cos(t), r(0)=0}, r(t), numeric):
plots:-changecoords(
     plots:-odeplot(Sol, [r(t),t], axiscoordinates= polar),
     polar
);

Note that the coordinates must be ordered (r, theta), not (theta, r).

First 306 307 308 309 310 311 312 Last Page 308 of 395