Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

@Markiyan Hirnyk 

You can also get correct results with method= rosenbrock, which does not have the crude, segmented look of classical[foreuler].

@acer I've done this before (in Maple, rather than Maple TA): I distribute a worksheet to the class from a website. The top of the worksheet is something like

restart:

Change the -1 in the next command to your student ID number.

randomize(-1):

The -1 will generate an error, so that forces them to enter something. I've already executed the worksheet using my ID number, so there's actual realistic output, and then I changed my number to the -1 before saving it and posting it to the website.

Now every time a student re-executes the worksheet, they will get the same problems as before; but the students will get different problems from each other, which cuts down on collusion. If I execute a student's worksheet and I get different problems than the ones that they solved, I know something fishy is going on.

@Markiyan Hirnyk 

That's classical[foreuler], not classical[forever]. It looks like a spell-checker automatic correction.

@sipa I don't see any new thread about this.

@tomleslie You should use the third argument to coeffs, which provides the correspondence between the returned coefficients and the monomials (see ?coeffs). So, the OP's request can be written using coeffs like this:

RepeatPositiveTerms:= proc(P)
local C,T,k;
     C:= [coeffs(P, indets(P), 'T')];
     [seq(`if`(C[k]>0, [T][k] $ C[k], NULL), k= 1..nops(C))]
end proc:

I am somewhat taken aback by Roman's comment. I don't see how lcoeff can be used in this situation, nor do I understand why he does not recommend the three-argument coeffs.

@FaridSW What's a Laurent polynomial? Is that the result of truncating a Laurent series? So, like a regular polynomial, but with negative powers allowed?

@Al86 Maple has functions JacobiTheta1 through JacobiTheta4. All are two-argument functions with the second argument (called the "nome") restricted to magnitude less than 1. Maple has no JacobiTheta0. Would you please read the help page ?JacobiTheta1 and recast your problem in terms of those functions, if possible? If that's not possible, could you give a reference for what you mean by JacobiTheta0 and what you mean by JacobiTheta3 with only one argument?

What does x | i mean? It's part of the argument of JacobiTheta0.

@testht06 The identity matrix in Maple has no predefined symbolic representation; it needs to be constructed to whatever size is appropriate in context. Capital is the imaginary unit rather than a matrix.

This works:

A:= M + LinearAlgebra:-IdentityMatrix(op([1,1], M)):
Gausselim(A, 'rank') mod 2:
rank;

@tomleslie A restart command needs to be in its own execution group to be fully effective. When it's in an execution group with other commands, the results are unpredictable. This is not clearly documented at ?restart, which merely says that the restart must be on its own "line". If you put the restart in its own execution group, my counterexample will be manifested.

@testht06 Yes, I know how to perform division in finite fields. That doesn't change the fact that the sum of a row could be zero. 

@sipa Please repost this as a separate Question, a new thread. The syntax for plotting ODE solutions is very different from that for plotting PDE solutions. There's no way to adapt the code that I give above to an ODE situation.

For your item (3), do you want the division to be in the finite field? I'm not sure if that's always possible. Couldn't the sum squared be 0 in the field?

I notice that you index your matrix columns starting with 0 rather than 1. But matrices (as opposed to arrays) are always indexed from 1. Is that going to cause a problem for you?

Since, as Tom points out, this can't really be done, I'd like to ask what your ultimate goal is. There's probably some other way to achieve it.

@tomleslie 

Your solution relies on the terms of the polynomial being put in the same order by both op and coeffs, but it doesn't necessarily happen that way. Simple example:

restart:
p:= y+2*x;
op(p);
coeffs(p);

First 473 474 475 476 477 478 479 Last Page 475 of 709