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

If you get an error message when you try to upload a worksheet, ignore it and proceed to post anyway. Often, the error only relates to the display of the worksheet in MaplePrimes. Users who download the worksheet will nonetheless usually see exactly what you see once they open the worksheet in Maple.

I'll note that these are the same mysterious numbers that were reported by a user here yesterday, which another user claimed were the result of a "cracked" (or stolen) copy of Maple 2019.

@mmcdara 

Unicode non-ASCII characters do not require any special commands, which may be why you couldn't find any relevant help. They work in both worksheet and document modes; and, in my experience, they even work in command-line Maple running in a Cygwin window (a Linux emulator for Windows), but not in a "raw" Windows command window.

For example, in Wikipedia I found that the Unicode for the euro currency symbol is 20AC[*1] (that's hexadecimal). So, in Maple I do

euro:= `€`;

Now this can be used anywhere in Maple symbols and strings, including in plots.

Nearly every character or symbol used in any human written language (including subject-specific languages like math or phonetics) has a Unicode, and I've always been able to find what I want in Wikipedia.

[*1]You'll often see these listed with the prefix UTF+, as in UTF+20AC.
 

 

That's very weird. If you give a command other than sin, do you get the same value? What if you use the restart command first?

@mmcdara As far as I know, Maple can display any Unicode character without needing ImageTools.

@Konstantin@ Corruption seems unlikely. What was the result after restart? It is very common for mysterious problems to be corrected after restart.

I can't duplicate your error. Your commands work fine for me in Maple 2019. Could you try it again after a restart please?

@sand15 That seems correct. I wasn't aware of that option. Is it on a help page? 

That value seems to be unchanged by calls to plots:-odeplot; it must be accessed after calling sol(t) for numeric t.

Almost every time that I've used assign to assign the values of pure symbols (like xyz) rather than table entries, I've gone back and rewritten the code to use eval. Assigning values to simple names seems like an easy way to cause bugs when you inadvertently use the same names later expecting them to be symbols.

 

restart:
gm := V -> 1/sqrt(1-V^2):
T := (1/sqrt(1-V^2))*(w-k*V):
S := (1/sqrt(1-V^2))*(w*V-k):
f := -135/4*T^5+369/16*T^3*S^2+47/4*I*T^4-93/16*I*T^2*S^2+T^3-2/3*T^3*S*B-27/16*S^4*T+3/16*I*S^4-1/3*T*S^2+2/9*S^3*T*B:
Hgen:= simplify(rationalize(f)):

I don't think that setting _EnvExplicit to true can possibly do anything beneficial for a polynomial 
of this complexity. While I also don't think that it can cause harm, since there's no reason to set 
it, I'd rather not risk it. So, the next line is commented out.

(* _EnvExplicit := true; *)
H:=[solve(numer(Hgen),w)]:

If the solve goes as planned, then H will be a list with a single entry, a RootOf expression.

nops(H), type(H, list(RootOf));
                            1, true
So, H is indeed of the the form that I hoped.

The part of this worksheet that solves your issue of the slowness of allvalues is in the next 
line. The key point is that numeric values are supplied for B and V before the expression is 
passed to allvalues.

Hav:= CodeTools:-Usage([allvalues(eval(H[], [B= 1, V= 0.8]))]):
memory used=157.39MiB, alloc change=8.00MiB, cpu time=1.09s, real time=1.12s, gc time=78.12ms
nops(Hav), type(Hav, list(RootOf));
                            5, true

There's no need for you to re-enter all those plot options. Your entire plot can be done as below.
 
plot(
   Im~(Hav), k= 0..1, discont,
   color= [red, black, green, blue, yellow],
   linestyle= solid, thickness= 2,
   axesfont = ["TimesNewRoman", 18], 
   labelfont = ["TimesNewRoman", 22], labels = [conjugate(k), Im(conjugate(omega))],
   axes = "boxed",
   gridlines= false
); 


 

Download ImagRootPlot.mw

 

@mmcdara You mentioned the need for a consistent order to allvalues solutions. This is a very complicated issue, and I often find that there's no satisfactory solution for whatever problem I'm working on. First, note that allvalues only has an affect on RootOf expressions. Then very carefully read the help pages ?allvalues, ?RootOf, and ?RootOf,indexed for details on how you can set the order and how you can change it.

As you've been told before, please upload a Maple worksheet showing the error using the green uparrow on the toolbar of the MaplePrimes editor. If the upload gives you an error message, just ignore it: It likely only means that the worksheet can't be displayed in MaplePrimes; we will likely still be able to download your worksheet.

I guess that RK-4 is 4th-order Runge-Kutta. Is that right? What are NSFD and LWM?

@cinderella 

Do

fsolve(Val, Q= 10..20)

to restrict the solutions to that range.

@vanzzy When I said "using your example above", I meant using exactly as it had been defined in your previous code. That is, you must first do

H:= [solve(numer(Hgen), w)];,

as before, and only then do

H:= allvalues(H);.

The reason is that the allvalues only affects RootOf expressions. If you don't first use solve, then there are no RootOfs.

First 278 279 280 281 282 283 284 Last Page 280 of 709