dharr

Dr. David Harrington

8977 Reputation

22 Badges

21 years, 177 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

@Blanc What calculations do you want to do with them? You can set up these as a custom Group, but if you just want to calculate with them then just using the mod operator is simpler and already built in, e.g. 41 + 27 mod 53. Are you only interested in mod a prime?

@nm You are right - there are different definitions. 

restart;

EllipticE(phi, k) is given by DLMF 19.2.5 as int(sqrt(1-k^2*sin(x)^2), x = 0 .. phi) = int(sqrt(-k^2*t^2+1)/sqrt(-t^2+1), t = 0 .. sin(phi))but they point out that A&S used the upper limit in the second integral as z. Maple uses this second convention. Now Mathematica uses this second convention but takes the second argument m to be what Maple calls k^2. So when Maple produces second argument I, that is equivalent to MMA's second argument -1. So for the integral in question we expect EllipticE(sin(x),I)

II:=simplify(int(sqrt(1+sin(x)^2),x));
simplify(%, symbolic);

csgn(cos(x))*EllipticE(sin(x), I)

EllipticE(sin(x), I)

which suggests we need some appropriate assumptions to get the simpler result. The following works

simplify(II) assuming cos(x)>1;

EllipticE(sin(x), I)

int(sqrt(1+sin(x)^2),x=0..phi,AllSolutions);

piecewise(0 < phi, 2*EllipticE((1/2)*sqrt(2))*sqrt(2)*ceil(-(-2*phi+Pi)/(4*Pi))+2*EllipticE((1/2)*sqrt(2))*sqrt(2)*ceil(-(-2*phi+3*Pi)/(4*Pi))+piecewise((-(-2*phi+Pi)/(2*Pi))::integer, EllipticE((1/2)*sqrt(2))*sqrt(2), sqrt(-cos(phi)^2+2)*cos(phi)*EllipticE(sin(phi), I)/sqrt(-sin(phi)^4+1)), phi <= 0, 2*EllipticE((1/2)*sqrt(2))*sqrt(2)*floor(-(-2*phi+Pi)/(4*Pi))+2*EllipticE((1/2)*sqrt(2))*sqrt(2)*floor(-(-2*phi+3*Pi)/(4*Pi))+piecewise((-(-2*phi+Pi)/(2*Pi))::integer, -EllipticE((1/2)*sqrt(2))*sqrt(2), sqrt(-cos(phi)^2+2)*cos(phi)*EllipticE(sin(phi), I)/sqrt(-sin(phi)^4+1))+4*EllipticE((1/2)*sqrt(2))*sqrt(2))

Download EllipticE.mw

@nm I suppose there could be different definitions.

Please define what you mean by primitive element.

@Suryakanth The approximate solution for theta_p you provide could be a straight line going down to zero at Y=10, rather than an exponential decay if you prefer; it only has to look approximately right. I think you are trying to reproduce Fig 2. But there is no f(Y) or F(Y) given so there is not enough information for me to know what they look like and to know what an approximate solution would look like.

As I said, there may be no mistake. (But I didn't check your equations.)

@Suryakanth This does not mean there is an error in the equations (though there might be). Maple needs some help to start with. The solution to this is to give a list of approximate solutions using the 'approxsoln' option. For example, theta(Y) could be given as an exponential decay function, since that is what it looks like; similarly for Theta_p. Only you know what F and f look like.

This error can also arise from an incorrect formulation of the equations. For example a decaying function with BC D(f)(0) = -1 is accidentally given BC D(f)(0) = 1, so then Maple is expecting an increasing function.

@acer I am using Maple 2025.2, so looks like a regression. Looks like the code in `simplify/table` has been updated to use Cache. 

@nm The forget commands at the top of your worksheet just do the forgetting then. I don't know how to change things permanently. If you knew the exact subprocedure which was giving the problem and had option remember, you could perhaps hack it to remove the option but I wouldn't recommend that.

[Edit: the remembered values are in a cache - see op(4,eval(`simplify/table`)), and there is some updating of the table, but it is not as simple as removing option remember.  forget.mw  ]

Yes I see this with the error messages but not when uploading to Mapleprimes. Presumably a Mapleprimes site issue.

@sand15 Thanks for the comments. As a side point I think I found the effect of the ill-conditioning - if I look at the roots of the denominator and numerator polynomials for the [7,9] case, two of the numerator roots are very close to two of the denominator roots, so it is almost equivalent to a [5,7] case.

Also the Statistics package - see the help page ?Statistics,Regression

There is also the Optimization package, but those are in hardware floating point.

Not entirely clear what your specific requirements are.

@salim-barzani I think you are saying you want to keep the ode in G(xi) and not use a specific solution. In many cases the solution to the ode may not be known, but in this case it is just the harmonic oscillator equation, so it seems to be that using the general solution c[1]*exp(h*xi)+c[2]*exp(-h*xi) (or its equivalent sin/cos form) is entirely equivalent to using the ode.

Then from the solved eqs one can select c[1] and c[2] to cover the specific cases you want, sinh, cosh, exp or (with imaginary h) sin, cos, or why not the general solution? In this case the solutions don't depend on c[1], c[2] or h, so any of the solutions works. 

dsolve.mw

@salim-barzani So this new example is different since you want to substitute the second derivative, so that won't resolve first deriavtives, as you found. But if you know the solution, why not just substitute it in earlier?

If you don't want alpha to be zero then don't solve for it. Then you will get the variables you solve for given in terms of alpha, which means alpha can be any value. But maybe you are OK with some interrelationships between the parameters in the ODE. Perhaps just solve without any variable and select out those you want. I think you have to play around here.

Dr.D-thanks.mw

@sand15 I agree with your general point. And yet, there often are solutions to the many equations in few variables that the OP finds. I didn't do any sort of analysis, but I suspect the reason is that the form of F has been chosen after some analysis that ensures there will be a high likelihood (guarantee?) that there will be solutions; evidently not all the equations are independent.

I'm not sure how you generated these equations but some apparently blank characters were strange. I fixed the syntax errors by deleting many blanks and reentering them. Now you need to properly specify the equations.

1. As the error message suggests, you need more pdes.
2. Why no BCS/ICS for X?
3. You want to calculate the derivatives in the table but haven't specified at what X and Z values these are at (X = 0.1? but Z = ?). Add spaces to the table values so we can see the individual numbers.

plume_work.mw

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