Carl Love

Carl Love

26832 Reputation

25 Badges

11 years, 282 days
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity

These are replies submitted by Carl Love

@salim-barzani When we say "Upload your worksheet", worksheet refers to the file that contains a record of what you see on your screen during your Maple session.

I notice that the article's solutions have no constant of integration. Did the article specify an initial condition? I think that the article's solutions are equivalent to the 3rd and 4th Maple solutions with _C1 set to 0, but it'll take some effort to verify that. I doubt that you'll ever be able to get Maple to arrange the solutions in piecewise form on its own, but you should be able to verify the correctness of the given piecewise.

The 1st and 2nd solutions that Maple gives are singular solutionsNote that they don't depend on xi, so they make diff(z(xi), xi) identically equal to 0.

@Andiguys A strict inequality is one of the form a < b or a > b; a non-strict inequality is one of the form a <= b or a >= b. Strict inequalities are not allowed as constraints for real-valued variables by numerical optimization software. This is essentially the same as saying that the feasible set must be a closed (but not necessarily bounded) set (in the sense of real analysis); however, I think that the error message comes from a purely syntactic (rather than mathematical) checking of the constraints.

Here's a simple thought experiment to show why strict inequalities aren't allowed:

  • What is the minimum value of x^2 given that x > 0?

You have an unspecified parameter F in the line defining Dp.

Your z seems to be an independent variable. You can only make a 2-D plot such as you show for a specific value of z, which you haven't given.

Your sample plot says M^2 = 2, 5, 7. Did you want or M^2 set to those values? either is easy.

I corrected about 2 dozen missing-multiplication-sign errors in your code, and made a few other stylistic changes, obtaining this:

h:= z-> piecewise(
   z <= d+1,   1,
   z <= d+4,   1-delta/2*(1 + cos(2*Pi*(z - 1 - 1/2))),
   z <= d+6,   1 
w0:= -c*h(z)^2/4 + 3/64*(b*c-4*a)*h(z)^4 + 19/2304*b*(b-4*a)*h(z)^6:
w1:= c/4 + (4*a-b*c)*h(z)^2/16:
w2:= (4*(b*c-4*a)-b*h(z)^2)/256:
w3:= b*(b-4*a)/2304:
a:= x4*S*Gr*sin(alpha)/(4*x1*x5):
b:= 1/Da + x3*M/(x1*(1+m^2)):
c:= Dp/x1:
Dp:= 96*x1/((6-b*h(z)^2)*h(z)^4)*(F + a*h(z)/24 - 11/6144*b*(b-4*a)*h(z)^8):
x1:= ((1-phi1)*(1-phi2))^(-5/2):
x2:= (1-phi2)*(1 - phi1 + phi1*Rs1/Rf) + phi2*Rs2/Rf:
x3:= shnf/sf:
x4:= (1-phi2)*(1-phi1+phi1*RBs1/RBf+phi2*RBs2/RBf):
x5:= khnf/kf:
shnf:= sbf*(ss2+2*sbf-2*phi2*(sbf-ss2))/(ss2+2*sbf+phi2*(sbf-ss2)):
sbf:= sf*(ss1+2*sf-2*phi1*(sf-ss1))/(ss1+2*sf+phi1*(sf-ss1)):
khnf:= kbf*(ks2+2*kbf-2*phi2*(kbf-ks2))/(ks2+2*kbf+phi2*(kbf-ks2)):
kbf:= kf*(ks1+2*kf-2*phi1*(kf-ks1))/(ks1+2*kf+phi1*(kf-ks1)):
params:= {
    RBs1= 8933*16.7e6,
    RBf= 1063*1.8e6,
    RBs2= 6320*18e6,
    kf= 0.492,
    sbf= 6.67e-1, ss2= 2.7e-8,
    sf= 6.67e-1, ss1= 59.6e6,
    ks2= 76.5, kf= 0.492, ks1= 401,
    phi1= 0.01, phi2= 0.02, alpha= Pi/4, m= 0.5, Da= 0.1, Gr= 5, 
    delta= 1, S= 0.5,  d= 1
W1:= eval(w0+w1*r^2+w2*r^4+w3*r^6, params):


@nm If you prefer the prettyprinted style of subscripted constants, there's no reason to stop using them. But they are aliases, so you mustn't treat them like variables. In code, you should use _C1, etc.

What I said before about aliases in procedures actually applies to aliases in any code: The alias must be defined before the code that uses the alias is entered. I only explained this with respect to procedures earlier because that's the most likely scenario for making this mistake.

In your example that doesn't work, you do a restart and then enter some code that contains a name which will become an alias. But it can't already be an alias at the time that the code is entered because it's immediately after a restart. The fact that c__1 will become an alias during the execution of the code is irrelevant. All that matters is whether it's already an alias when the code is entered (formally speaking, when the code is parsed).

I concur: Use a .zip file.

@Khair Muhammad Saraz What are the sizes in bytes of some of the worksheet files that you can't edit?

@acer The only reason I can see to use an alias is that it gets back-substitued on output. So, the common usage of an alias for a lengthy algebraic number (such as for use with mod or evala) makes sense to me; without the back-substitution, the output can become too lengthy to be easily readable. Of course, the same would be true for a long transcendental constant, though that's not something as commonly used.

@Ronan @acer I didn't mean to imply that FAIL would be a problem in this particular case, although I see how my writing could be interpreted that way. So, sorry for any confusion I caused. I just meant that it's always something to consider when using is. In this case, it has been checked that it won't cause a problem, so it's fine.

This issue has nothing to do with efficiency.

My experience using is for equalities (identities) is that the vast, vast majority of FAILs occur for true cases (rather than false cases as you suggest). I guess that this is naturally the case because it's far easier to find counterexamples for a false identity than it is to find an iron-clad proof for a true one.

Here's a surprisingly simple case of FAILure of is for a simple trig identity that I recently encountered; yet combine will easily verify it.

Id:= arctan(a) + arctan(b) = arctan((a+b)/(1-a*b)):  assum:= 0 < a, a < 1, 0 < b, b < 1:
is(Id) assuming assum;

combine((lhs-rhs)(Id)) assuming assum;

@mmcdara Maple has an automatic worksheet backup feature that you can turn on. Go to Tools ==> Options ==> General ==> Auto-save. By "save", it means it saves a backup copy; your original worksheet isn't overwritten until you explicitly save it.

I have never been unable to kill an individual mserver with Windows Task Manager, and it's something that I've done thousands of times. Killing all of Maple is a big waste of time, and you lose the un-backed-up portion of your worksheet, (Default auto-save interval is 3 minutes.) However, if the mserver has finished its computation already, but there's a huge amount of output still to display (which could take hours for some debugging type outputs), then you need to kill all of Maple unfortunately.

The data given in the original Question has 782 values for both X and Y. I think that the 781 was just a typo, and, indeed, the Vector constructor doesn't need a count when an explcit initializing list is given.

@nm Your final equation has y on both sides, so y isn't isolated.

@Joseph Poveromo You wrote:

  • from which an explicit solution can be obtained

What makes you think that an explicit solution can be obtained? I think that the implicit solution given by dsolve is the best possible.

@dharr You wrote:

  • The help for read says "If the file is in Maple language format, the statements in the file are read and executed as if they were being entered into Maple interactively",

"Maple language format" versus "Maple internal formal" is a dichotomy. The former refers to plaintext files, and the latter refers to ".m" files. The dichotomy is stated clearly on the help page ?save, but stated sloppily on ?read.


Here are two expressions that are obviously mathematically equal. However, they are entered in forms that are sufficiently different that Maple doesn't automatically recognize them as equal, so they are stored separately. I'll call them syntactically distinct.

e1:= (x+1)^2; e2:= expand(e1);



The is command verifies that they are mathematically equal:

is(e1 = e2);


Sometimes more-elaborate techniques are required for that verification:

is(simplify(e1 - e2) = 0);


But keep in mind that it has been proven (Richardson's theorem) that there are mathematically equal expressions for which the equality can never be verifed.


Using evalb just verifies whether they are syntactically identical:

evalb(e1 = e2);


Using a relation (=, <, <=, etc.) as the condition of an if statement implicitly invokes evalb:

if e1=e2 then "identical" else "not identical" fi;

"not identical"



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