Carl Love

Carl Love

28055 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

Please post your input code in a form such that I can easily copy-and-paste it into a worksheet. The output of the code is just clutter in this format. You can also simply attach a worksheet.

You have a three-point problem, with conditions at -10, 0, and 10. It'll need to be solved stepwise.

Would you please define "eigenvalue" in this context? I'm familiar with eigenvalues of square matrices and and of boundary value problems, but not of solitary algebraic equations.

Regarding your Digits:= 5: It causes no problem here, because this is just presentation rather than numeric computation. But, if you're habituated to it, it's going to cause problems for you eventually: It's too low. This number affects the precision of almost all internal floating-point computations, not just the results that are displayed. It's generally not enough significant digits to be safe.

Someone will probably mention at this point that there's a setting for the number of displayed digits, which doesn't affect the internal computations. However, the implementation of this feature is so cruddy that I won't mention it further.

 

What was the Linux command line that you used to compile it? I'm expecting something like

gcc -shared gauss1.c -ogauss.so

If you want practice writing Gaussian elimination code, that's all well and good. But if your goal is just to solve systems, then I doubt that you'd be able to beat the external Gaussian elimination code that already comes with Maple. 

 

@Joe Riel  Yes, I was aware that it was discouraged. Do you have any idea of the reason? Some things are discouraged for what seem to me to be reasonable reasons, and others for reasons that seem to me to be paternalistic "hand holding". If it's the latter, then I have no interest in following the recommendation.

@nm Your inclusion of function in the typespec of is_solution_trivial works, but you can be more specific by changing it to specfunc(PDESolStruc). The type name specfunc stands for specific function.

What you're calling a "list" is properly called a set in Maple. A list is a separate closely related type. Specifically, when you enclose something with curly braces { }, it becomes a set. This corresponds to usual mathematical notation and differs from Mathematica (whose notation I find to be highly idiosyncratic).

So, in your most-recent case, the PDE solutions are returned as a set of set of equations; the corresponding Maple type is set(set(`=`)). Putting these cases together, the procedure becomes

is_solution_trivial:= (pde, sol::{`=`, specfunc(PDESolStruc), set(`=`), set(set(`=`))})-> 
   evalb(eval(`if`(sol::set, sol, {sol}), depvars(pde)=~ 0) = {0=0}) 
:

Instead of a convert, the command op can be used to extract the underlying sequence from a set or list S:

op(S)

While op can be used on almost anything, this form can only be used for a set or list:

S[]

You seem to be confused about the distinction between name quotes `` and unevaluation quotes ' '. The name quotes can turn anything into a name. If the thing that they enclose is already a name, such as your `function` and `sequence`, then they do nothing at all. If you want a piece of code to use a name strictly as a name, regardless of whether that name has been assigned a value, then use unevaluation quotes: 'function'. That's usually not needed in procedure headers, however.

@mmcdara The same thing can also be achieved without seq:

x__||(1..4)

The above can be used on the left side of the assignment operator :=.

It can also be done with a sequence of symbols rather than a range of integers as the right operand of ||:

x__||(a,e,i,o,u)

 

One should keep in mind that names constructed with || or cat or nprintf or convert(..., name) (essentially, those constructed by any method other than indexing, x[...]) can never be local.

@Al86 Okay, I've taken your function to be (x-2)^2*(3-x). Then one possible command is

ImageTools:-Embed(IterativeMaps:-Bifurcation([x], [r*(x-2)^2*(3-x)], [0.2], 0, 0.3));

Note that the parameter r must be used. As far as I can tell, it must be literally r, which seems very unMapleish to me. There are a vast number of options mentioned on the help page to use color to bring out various features of the above plot.

@mehdi jafari 

Are you using matrix (lowercase m)? That's deprecated, and there's no good reason to ever use it. Use Matrix instead.

What's wrong with simply sin(erf(t))? Do you expect there to be some other simple analytic form?

@JD423 

Regarding version dependency of the restart issue: This is just my guess, but I think that it has more to do with operating-system issues than with the version of Maple. I think that it has something to do with synchronization between the "kernel" and the GUI, which run as separate (and rather independent) processes in all versions of Maple. 

The need to put restart in its own execution group is documented on its help page. It's not a "bug" in the strict sense of that word. People who have a whole vocabulary for making fine distinctions among software behaviors might call it a "wart".

Regarding loading packages with with: You may have gotten the wrong impression that I disdain the use of packages. That's not at all true. What I disdain is the loading of packages with with. Instead of that, I just put the package name together with the procedure name at the point where the procedure is used. In other words, instead of Distance I'd use Student:-Precalculus:-Distance. If the prefixes are annoyingly long, I do something like

StP:= Student:-Precalculus;
...
... StP:-Distance(......

In either case, when reading the code, it's clear that Distance comes from a module or package.

I think that it's worth pointing out that what you call b is formally called the skewness of x. This information may or may not be of help to you or to someone else who tries to answer your Question.

There seem to numerous bugs reported here related to the newer extended typesetting, which is now the default. Try doing this before running the above commands:

interface(typesetting= standard);

And what do you mean by ""sigma? That's not valid syntax. Usually I can figure out a user's intention despite their invalid syntax, but that one has me completely baffled.

This is essentially a duplicate of your previous Question. You've only changed the equations slightly. You seem to have completely ignored all the advice that both Tom Leslie and I gave you.

@cencen_cj wrote:

  • I have no clue what went wrong. Please kindly give me a hint.

But Tom did give you a substantial hint! I am certain that your usage of square brackets in the way that he pointed out is wrong. I am not certain that it is the cause of your error, but, nonetheless, it is wrong and must be corrected before you can proceed.

It's offensive to check all the boxes Maple, MapleNet, MapleSim, etc. Your Question is about Maple alone. Better yet, you should select your Maple version.

First 268 269 270 271 272 273 274 Last Page 270 of 709