dharr

Dr. David Harrington

9459 Reputation

22 Badges

22 years, 18 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

With no information, it is hard to help. If you are using Windows you will need to run as administrator to get it to install correctly. Other than that I have never had any installation issues. 

This is a known issue with the context panel - see a recent Mapleprimes question. It has been reported and is being fixed. There is a facility to change the number of decimal places displayed for the whole worksheet. See File - options (button bottom right) - precision -round screen display to XX decimal places.

@janhardo Your expression contained chi_{k,m}(nu) not chi_{1,m}(nu), so can you say specifically how that is defined?

@janhardo What is ?

You say the solver takes hours. Does it return a solution after hours or return nothing or did you stop the calculation? Nonlinear systems may not have solutions, so do you have some reason to believe there is a solution, say from plots of the equations?

Polynomial systems are easier to work with. Are these equations polynomial, or could they be converted to polynomial equations?

Please upload a worksheet (use the green up-arrow in the Mapleprimes editor) with the equations or a smaller sample of the equations, so we can see what you are dealing with.

@Alfred_F I think this is what you want to do. The assumptions need to make the arguments to ln positive. Following on from the assumptions already given by @acer and adding x>y (seen to be true on the plot) we have

restart

with(plots, implicitplot)

with(DEtools)

ode := diff(y(x), x) = (4*y(x)^2+x*y(x)+1)/(4*x^2+x*y(x)+1)

diff(y(x), x) = (4*y(x)^2+x*y(x)+1)/(4*x^2+x*y(x)+1)

ics := y(4/5) = -1/5

y(4/5) = -1/5

NULL

sol := dsolve({ics, ode}, y(x), implicit)

(7/20)*ln((28/3)*(5*x^2+1)/(4*x^2+x*y(x)+1))-(7/4)*ln(28*x*(x-y(x))/(4*x^2+x*y(x)+1))+(7/5)*ln(-(7/2)*(5*x*y(x)+1)/(4*x^2+x*y(x)+1))-(7/20)*ln(5*x^2+1)+(7/4)*ln(x)+(21/5)*ln(2)-((7/5)*I)*Pi+(7/20)*ln(3)+(7/5)*ln(5) = 0

sol2 := `assuming`([simplify(eval(sol, y(x) = y))], [x > 0, 5*x*y > -1])

-(7/4)*ln(x-y)+(7/5)*ln(5*x*y+1)+(7/5)*ln(5) = 0

sol3 := `assuming`([combine(sol2, ln)], [x > y, 5*x*y > -1])

ln(5*(5*x*y+1)^(7/5)*5^(2/5)/(x-y)^(7/4)) = 0

sol4 := map(exp, sol3)

5*(5*x*y+1)^(7/5)*5^(2/5)/(x-y)^(7/4) = 1

implicitplot(sol4, x = 0 .. 10, y = -1 .. .2, gridrefine = 4)

NULL

Download test_(2).mw

@Angelo Melino I agree with everything in those two worksheets. Here is a condensed version, which makes the first and second derivative into functions and uses the recursive procedure for phi. All agree with the numerical differentiation except perhaps for the last digit.

DI12.mw

As already noted, the formula in the original question seems to be incorrect. But in your two worksheets you seem to be heading to a different formula in which there are Bessel functions in the infinite sum? What is your conjecture for the formula for general n? 

@Angelo Melino If you just want a numerical result then you can use

fnum:=(n::posint,nu,z) -> fdiff(BesselI(nuu,z),[nuu$n],[nuu=nu]);

For fnum(1,0,1.3) this gives -0.2782476463, which is identcal to the expected -BesselK(0,1.3) to all digits quoted.

Evaluating Carl's formula for this case gives -0.3427993379, which it identical to 10 terms of the formula in my worksheet (and the same as for 100 terms). Since Carl's and mine agree, there is no convergence issue, but we both used your formula, so we have both misinterpreted your formula or perhaps it is wrong (different definition of the psi function, perhaps?). Can you give the source? I can try to figure out the reason for the difference. What is the full Lu and Qin reference?

I expect the accuracy of high order numerical differentiation to degrade, but Maple's numerics are usually good to most of the digits given.

It would help if you gave some benchmark data from Mathematica that you consider correct, and that I can compare with Maple results. If you want to upload your Maple worksheet with the errors, then some further diagnosis may be possible.

@Carl Love Yes, I was surprised at this weakness in Maple. First derivative formulas are given in the DLMF (for general order), and see further down the page for simpler ones for integer or half-integer values, though the OP hasn't said yet what values are of interest.

For question 1) in Maple, which I assume is similar in Maple flow. If you are using the default software floats, there is a number below which you get underflow:

restart

z := Maple_floats(MIN_FLOAT)

0.1e-9223372036854775805

(1/10)*z

0.

NULL

 

Download floats.mw

Very nice. You say "ln(-1) = -i*Pi (by using the standard branch)", but Maple's convention gives ln(-1) = I*Pi.

I am using Windows 11 with latest updates and Maple 2026.1. I can successfully interrupt multiple times in two open worksheets.

However, like @acer, I frequently find I cannot interrupt running calculations except by exiting the running tab and choosing to save (or not).

A frustrating feature is that when I go to the stop button, sometimes the tool tip pops up to tell me the button is to "interrupt the current operation" and that blocks me from pushing the button.

There may be some tradeoff between performance and the ability to interrupt, so perhaps the answer is not so clear cut.

@Ronan Interesting. I didn't follow it all. I added (unnormalized) quadrance to my worksheet above, but I'm not certain whether or not this is a normalized quantity - you seem to have deliberately normalized it in your code. The projective quadrance (taking two vectors as arguments) certainly seems to be independent of vector scaling.

@one man Thanks - there is a more specific Wikipedia page on the automatic differentiation here, incuding using dual numbers. Not sure what Maple has along those lines.

What do you mean by a "dual number"? An example of what you want would be helpful.

1 2 3 4 5 6 7 Last Page 1 of 107