sursumCorda

1189 Reputation

15 Badges

2 years, 108 days

MaplePrimes Activity


These are replies submitted by sursumCorda

@Thomas Richard Many thanks. I had only noticed the `simplify/hypergeom` before and did not realize there was also a `convert/StandardFunctions`. (There exists a typo in the initial instance. Sorry for this ... I made the correction just now.) 

I think there are two additional questions:
The documentation says that the expand command also expands most mathematical functions, but those "most mathematical functions" do not include the generalized hypergeometric functions. If I understood correctly, convert(hypergeom(…), 'StandardFunctions') is semantically equivalent to expand(hypergeom(…)), but why is only the former form valid? 
And can hypergeom([1, 1, 3/2], [5/2, 5/2, 3, 3], -(x/2)**2) (the first one in the aboce list) be transformed by Maple (as this time even `convert/StandardFunctions` does not work)? 

   local f:=proc(a,b)
      RETURN(MmaTranslator:-Mma:-LeafCount(a)<MmaTranslator:-Mma:-LeafCount(b))
   end proc;

However, Mathematica by default does not use LeafCount to rank the complexity

In[1]:= FullSimplify[4*Log[10]] (* by default *) 

Out[1]= 4 Log[10]

In[2]:= FullSimplify[4 Log[10], ComplexityFunction \[Rule] ByteCount]

Out[2]= Log[10000]

In[3]:= FullSimplify[4*Log[10], ComplexityFunction \[Rule] LeafCount]

Out[3]= Log[10000]

Compare: 

full_simplify(4*ln(10));
 = 
                            4 ln(10)

So, in the sense that MmaTranslator:-Mma:-LeafCount is used to assess the complexity, your full_simplify does not fully simplify 4*ln(10) to the desired ln(10000). (And it seems that there is much more that needs to be implemented to follow Mma's FullSimplify.) 

@nm The first distribution that supported Python 3 is Maple 2018. Although this is practicable, I believe that that it is more advisable not to install another Python; otherwise Maple will have to become a bloat-ware in the future (as there will be increasingly fashionable external evaluate frameworks other than Python (such as Julia and Go))! 

You have to install it first: 

Python:-PackageTool:-install("matplotlib"):
Python:-ImportModule("matplotlib as mpl");

However, this library is somewhat useless in Maple as 

Python:-ImportModule("matplotlib.pylab as pl"):
Python:-EvalFunction("pl.show");
sys:1: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown

                          Python:-None

Python:-PackageTool:-uninstall("matplotlib");

@nm One may simply use: 

unassign('`tools/genglobal/name_counter`[evaln(_C)]')
# or `tools/genglobal/name_counter`[evaln(_C)] := -1:

@vv Thanks. The strange thing is that, although Maple is capable of computing 1/limit(expr, x = infinity) correctly, Maple fails to compute limit(1/expr, x = infinity) correctly. 

@Axel Vogt It is 1/24. But what I computed above is its reciprocal.

Anyway, I believe that such a feature will become a new (and built-in) functionality in the up-coming version (which may be released early next month). 

@Tokoro Sorry, is there any references? 

@WA573 You may set “'connect' = true” in plots:-pointplot.
Alternatively, 

p1 := plots:-listplot(x_values, cont_real, 'color' = "blue", 'legend' = "Continuous - Real"):
p2 := plots:-listplot(x_values, disc_real, 'color' = "green", 'legend' = "Discrete - Real"):
p3 := plots:-listplot(x_values, cont_imag, 'color' = "red", 'legend' = "Continuous - Imag"):
p4 := plots:-listplot(x_values, disc_imag, 'color' = "orange", 'legend' = "Discrete - Imag"):
plots:-display(<plots:-display(p1, p3) | plots:-display(p2, p4)>);

@Nicole Sharp How about

#https://maxima.sourceforge.io/docs/manual/maxima_378.html#index-strim
StringTools:-Subs(StringTools:-Explode(" /*") =~ "", "/* comment */");
 = 
                           "comment"

@Thomas Richard Thanks. I forgot to change the effective `Digits` at that time. (It seems that the precision (and accuracy) of the input never affect the precision to use inside numerical algorithms?)

Although the help page of `convert/rational` does not mention its internal algorithm, the help page of `identify` (which is mentioned in the help page of `convert/rational` in fact) does mention: 

The test for rational constants is made by looking at the continued fraction expansion of x

In view of this, it is reasonable to infer that internally, rational approximations are obtained among continued fraction convergents, that is, generated by truncating continued fraction expansions. 

However, I think that a more hard task is to recognize an "simplest" algebraic number that approximates a given (probably floating-point) number well. (For instance, 

evalf[10**3](root(2, 6) + root(3, 5)):
identify(%, 'BasisSizeAlg' = 30);

still fails to recover RootOf(_Z^30 - 18*_Z^25 - 10*_Z^24 + 135*_Z^20 - 7380*_Z^19 + 40*_Z^18 - 540*_Z^15 - 135540*_Z^14 - 56160*_Z^13 - 80*_Z^12 + 1215*_Z^10 - 336420*_Z^9 + 538380*_Z^8 - 43920*_Z^7 + 80*_Z^6 - 1458*_Z^5 - 102060*_Z^4 - 98280*_Z^3 - 20520*_Z^2 - 1440*_Z + 697, index = 2).)

@Carl Love Thanks. Strangely, Maple's R&D engineers seem to have overlooked this (probably because the Maple IDE project (not the code edit region component) has already been aborted).

@Carl Love Yes, I can change it myself. But I believe it would be better to automatically set its default value based on different computer screen sizes when installing Maple, so that by default, if I want to send a document including a full-line lprint to others with wider screen computers, I don’t have to add a statement like interface('screenwidth' = 9999): in the startup code or request them (mostly ordinary users) to change their own initial settings. 

3 4 5 6 7 8 9 Last Page 5 of 22