dharr

Dr. David Harrington

8335 Reputation

22 Badges

21 years, 5 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are replies submitted by dharr

@pallav By default, gamma in Maple has a special meaning as Euler's constant (see ?gamma), so if you want to use it as a regular variable, use local gamma.

Looks like you are using Maple 2022; simplify has improved since then. I was using Maple 2024, so you may want to upgrade. In general, finding the right commands to get the exact form you want is a difficult issue, so maybe someone else can give you some guidance on that. Certainly for the second ode, using simplify@expand (i.e., expand then simplify) gives a nicer result. But to get the factored form you probably have to take ode2, divide out y(t) on each side, try various simplifications and then mutliply back the y(t). Same for ode1.

@MaPal93 When Sigma = 0 (or T = 0) the polynomial has a root at 0 that fsolve is picking up, which leads to the falloff. A simple fix is just to not go there. For a plot range Sigma = 0.01 .. 5, the Lambda__1 plot looks good (Maple 2024), and for Sigma = 0.03 .. 5, the Lambda__2 plot looks almost good.

@dharr The region for small Sigma and T was giving numerical issues, but once these are solved it seems there is a positive solution for all Sigma and T (Sigma=0 a possible exception).

OverallNumeric3.mw

@MaPal93 I think that finding the boundary from the symbolic solutions will be difficult. However, you can always go back to the original two equations and solve them numerically for a grid of parameter values to get an approximate answers. My attempt to just solve them for Lambda__2 = 0 somehow didn't work as expected, but maybe can be fixed. I'll think a bit more about why that didn't work.

@Aung Yes, it should be usable for curvefitting etc.

@Aung If you ask FunctionAdvisor this

FunctionAdvisor(special_values, hypergeom([1/2, -k/2], [1 - k/2], z))

and look through the possibilities, most require special values such as integer of half-integer for the parameters. The exception seems to be for JacobiP, and indeed

convert(y, JacobiP) assuming k::positive;

gives

but I'm guessing that is not what you want. I agree with @Preben Alsholm that there is no reason not to use the hypergeom function: it can be evaluated, plotted, differentiated etc just like any other function.

@MaPal93 Here's some progress, though Lambda__2 is so complicated it is very slow to find the boundary between positive and negative values, e.g, by implicitplot or even fsolve. I'll give some thought to a faster method. I didn't explore the other solutions to see if the first RootOf is the only one.

Overall.mw

Edit: In principle, substituting Lambda__2 =0 into the original equations and solving is simpler than working with the complicated solutions, but doesn't seem to agree - maybe it is implicitly using the wrong solutions. I also did the non-dim in one step.

Overall2.mw

Its possible there is some better non-dimensionalization that is simpler to work wth, but I guess somehow the degree 10 polynomial is essential.

Edit2: Here's a different non-dimensionalization but the conclusions are the same.

nondimoverall.mw

@mmcdara I'm not sure what was happening there; it runs as expected in 2024.

@Ronan Sorry, I've uploaded the correct file now.

Here's some variations on @Scot Gould's answer. In general, use sort to solve these session-to-session variations.

MaplePrimes_sort_eigenvectors_and_eigenvalues.mw

 

@Ronan I don't use initialization files so you'll have to look at the documentation for where to find them. But if the output comes in a fresh session after restart but not until infolevel[RationalTrigonometry]:=0; it suggests that the mention of RationalTrigonometry is somehow loading it from the .mla file. userinfo allows you to use any name, so try userinfo(2, mytest,...) and infolevel[mytest]:=3;

@Ronan Your output suggests the ModuleLoad occurs before the with() statement? Are you loading it in some initialization file? I copied your userinfo() to my module and it works fine, so no syntax errors.

Otherwise, I'm out sof suggestions, sorry.

@Ronan userinfo is an executable statement, so should be after the uses and global declarations of the ModuleLoad procedure. Can you confirm that ModuleLoad is actually running by putting a print statement in? 

@Carl Love But from the user's (OP's?) point of view, if they have row and column vectors already, and want to make the rank 1 matrix, then c.r is the natural way to do it, which is consistent with the mathematical use of the `.` operation for vectors and matrices. The fact that it might also be an outer product and Maple has programmed it that way should be hidden when using `.`. 

@dharr Since the ModuleLoad: in the message may not be what you want, you can rename it to something useful, e.g.,

pkg := module() export squareme; option package, load = `Default global settings`; local `Default global settings`;
  `Default global settings` := proc() userinfo(2,pkg, "All things are blue"); end proc;
  squareme:=proc(x) x^2 end proc;
end module; 

 

First 27 28 29 30 31 32 33 Last Page 29 of 87