Carl Love

Carl Love

28100 Reputation

25 Badges

13 years, 105 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Boby 

In the code that Markiyan referred to, notice the end of the second line of code:

A:= table([0= subs(u= u[0], G)])

This sets the value of A[0].

@Allan Wittkopf 

Great answer, but your interface(prettyprint= 1) style output turns into unreadable garbage when posted to MaplePrimes. I guess that you're using the Command-Line Interface? Using prettyprint=2, Classic worksheets and Standard worksheets with either 1D or 2D input transcribe well to MaplePrimes, and they'll also provide the reader with a downloadable link to the worksheet, so that they can easily continue the work.

(I also strongly discourage the use of 2D input in MaplePrimes Answers because the reader cannot be sure of what you typed, but that's another issue.)

Your line

RES:= res[(D@@4)(f)(0)];

makes no sense to me because (D@@4)(f)(0) isn't in the set extra_bcs.

@EverteQ As long as these results for L are acceptable to you, it's fine:

term:= 2*x^3*y + 5*x^2*y^2 - 6*x*y^3:
coeffs(term, [x,y,z], 'L');

     

L;

I thought that you wanted the symbolic names in term, which are {x, y}.

@mapleq2013 You asked:

what does .. mean here? Isn't .. supposed to be between two numbers as a range?

Yes, you are correct that the range operator .. always has exactly two operands, although they are not necessarily numbers. If you see it in some context where it's apparently missing one or both operands, those missing operands are NULL. This is also true of the binary infix operators =, <>, <, <=, >, >=, and ::, although, unlike .., the syntax doesn't allow those to be input "naked".

In Maple NULL isn't just a concept, it's an actual object. It can almost always be represented by the symbol NULL or by my personally preferred version, [][]. In many contexts, it can be represented by empty parentheses (). (When used to declare a procedure with a no parameters, (), not NULL, must be used.) In several contexts it can be represented by whitespace or by the absence of characters. Both NULL and [][] are expressions that require evaluation, so it's more efficient to use () or nothing at all in those contexts where the syntax allows it.

When used in the context of Array (or list or rtable) indexing, .. means the same as m..n, where m is the smallest legal index and n the largest. Likewise, a.. means a..n, and ..b means m..b.

@taro No! You've been led astray by the concept of single-level evaluation. It has nothing to do with the situation in your original Question, and, as I said, it's NOT what Preben was trying to explain. The only reason that I gave examples of it is that you asked about it in your followup. In the situation of your original Question and in each of Preben's examples, there are only two types of evaluation occurring: full evaluation or no evaluation at all. And in all those cases, there are no local variables.

@Markiyan Hirnyk It isn't reasonable to expect someone to figure this out from the help pages. Indeed, the help page that you cite is largely irrelevant because the OP isn't confused about what unapply does; they're confused about what -> does.

I find all of your "Have you read" Replies patronizing. MaplePrimes isn't meant to be a last resort to which one turns after having exhausted all other sources of help.

The internal details of the procedure should make no difference as long as it provides real-number output when given real-number input. The number of inputs to the procedure should be the number of independent variables plus the number of model parameters.

Please post a worksheet showing the procedure, the call to NonLinearFit, and the error message.

What do you mean by iota? Do you mean sqrt(-1), which is what I usually means in Maple? The expression is already as simplified as it can get. Do you mean that you want to expand it into sin and cos terms? Then do evalc(f) assuming s::complex;

You'll need to provide *a lot* more detail than that before your problem will make sense to us.

@Markiyan Hirnyk Where do you see age 4 mentioned? The header of the linked page says "For honors math students entering grades 6, 7, or 8."

Maple syntax allows the expression seq(F, n= 0..n) (where F is an expression depending on n); however, I think that most serious Maple coders would find it abominable to use the index in the bounds.

Your code is equivalent to the following, which I find much easier to read/understand:

restart:
(a,b,c):= (1,2,3):
(-1)^a*b!*(a+c)!*add(binomial(c,n)*(ln(2)+add((-1)^(a+k)/(a+k), k= 0..n)), n= 0..c);
tot:= evalf(%);

I don't really understand your Question, but the above simplified code may provide you with some insight into your problem. If not, try to rephrase the Question. (Note that I'm not claiming that my code above solves your problem. As far as I can tell, my code produces exactly the same final results as your code. It's just that it's easier to understand.)

 

@Preben Alsholm Clearly I was wrong about the limitation to first order in time. Now I wish that I could remember the actual limitation that I discovered.

@Kitonum Thanks. It's now corrected.

@Preben Alsholm I believe (not sure) that pdsolve(..., numeric) will fail on any attempt to fake an elliptic PDE into something time based and that it'll fail on any PDE that isn't first-order in time.

First 465 466 467 468 469 470 471 Last Page 467 of 709