Carl Love

Carl Love

28070 Reputation

25 Badges

13 years, 34 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@tomleslie The following example shows that vv's argument-switching workaround only works sometimes:

G1:= GraphTheory:-Digraph(4, {[1,3],[1,4],[2,1],[2,4],[3,1],[3,2],[4,2],[4,3]}):
G2:= GraphTheory:-Digraph(4, {[1,3],[1,4],[2,3],[2,4],[3,1],[3,2],[4,1],[4,2]}):

GraphTheory:-IsIsomorphic(G1,G2);
GraphTheory:-IsIsomorphic(G2,G1);

I'm sure that the procedure's author knows that isomorphism is a symmetric relation. It's just a bug.

@james1482 The following example shows that this bug is not about loops, nor about graph entry via adjacency matrix:

restart:
G1:= GraphTheory:-Digraph(4, {[1,3],[1,4],[2,1],[3,2],[4,1],[4,2]}):
G2:= GraphTheory:-Digraph(4, {[1,4],[2,3],[2,4],[3,1],[4,2],[4,3]}):
GraphTheory:-IsIsomorphic(G1,G2);

Error, (in GraphTheory:-DiIsomorphic) invalid subscript selector

However, as you say, the package is not designed to handle "graphs" with loops (which are not really graphs but rather multigraphs), so I don't see any point in the other respondents' attempts to test code on graphs with loops.

Do you mean a .mw file, a Maple worksheet? And by "source code" do you mean the startup code associated with the worksheet or the XML code that controls how the worksheet is displayed?

@hpc What do you want as the row indices of your table? For ChiSquare and StudentT, the row indices are degrees of freedom. There's not such a parameter for Normal.

@dc539 To be clear, Maple's read command doesn't care what the file extension is. All that matters is that the file being read is a plaintext file (i.e, no formatting other than line breaks) of Maple commands. You can create such a file from scratch with any text editor, or you can create it from a worksheet with File -> Export as -> Maple Input. Most people who write long Maple programs prefer to skip the worksheet and rather enter their code with a text editor.

@oscmh3 When you're editing a Question, there's a pull-down menu where you can select your Maple version. This information is very useful to the people who answer these Questions. I've already updated this Question's header, but please select your Maple version in the future.

@tayyab107 If you simply omit the discont option from the plot command, then the vertical line segment will appear.

@Preben Alsholm Thank you. Your information helped me to make a new diagnosis. See my next Answer.

The Elliptic and Jacobi functions are not handled by evalhf.

Does the existence in Maple of the function InverseJacobiSN help your situation (see ?InverseJacobiSN)?

I don't understand why long conditions would prevent you from using piecewise. If it's simply a stylistic issue, then assign the conditions to variables to shorten the piecewise command. For example:

r:= sin(x)+x*cos(x) < 1/2:
f:= piecewise(r, sin(x), cos(x));

Note that the assignment of an inequality to a variable doesn't force it to evaluate to true or false.

@vv Your symbolic solution using RootOf is very clever. It would be great if that could be generalized to an arbitrary division into subintervals. In my work, I'm attempting to deal with taking the derivative wrt the parameter of parametrized definite integrals whose integrands are nested piecewise functions whose conditions depend on both the parameter and the variable of integration.

@vv Yes, my solution was only intended for numeric procedures. For symbolics, I think that piecewise is the best available alternative, even though it has numerous deep and very difficult-to-correct flaws. But don't use is for piecewise's conditions. It uses its own version called PiecewiseTools:-Is, which handles the case of symbolic variables much differently than is. This would perhaps address your comment "Maple should do much better in such situations". This PiecewiseTools:-Is is undocumented; however its code is brief and easy to understand.

@vv It's definitely not a bug. The statement is(x > 0), for example, correctly returns false under the default assumptions for x.

Would you please do each of the integrals in both Maple versions and post the results? My first hunch is that the multi-story nature of the integral on the left has something to do with why it transcribes better.

@Kitonum Your procedure can be simplified to use a table and thereby avoid a loop.

getCoeff:= proc(P, t, T::{list,set}(name):= indets(P, name))
local h, L:= coeffs(P, T, h);
   table([h=~L])[t]
end proc:

Now also the [a,b,c] can be removed from the calls as it is now the default for parameter T.

First 365 366 367 368 369 370 371 Last Page 367 of 709