sursumCorda

1239 Reputation

15 Badges

2 years, 232 days

MaplePrimes Activity


These are replies submitted by sursumCorda

@Scot Gould According to DLMF, at least those hypergeometric functions in my initial example doesn't need the valuable to be limited to non-negative. As for the assumptions, I think this could be due to the following reasons: Though the result given by Mma contains the natural logarithm and the cosine integral, and the two are not defined for non-positive real values, the difference between them (namely, ln(x)-Ci(x)) has no singularities or discontinuities in (-∞, 0], which might be more usable (especially in physics and engineering). 

It turns out to be zero but only at origin x=0

I think that this is because a real solution is missing (without any warning message): 

ode:=diff(y(x),x)=3*x*(y(x)-1)^(1/3):
ic:=y(3)=-7:
y(x)=1-(x^2-5)^(3/2); # the lost solution 
                    y(x)=1-RealDomain:-`^`(x^2-5,3/2)

odetest(`%`,[map(convert,ode,surd),ic],y(x)) assuming x^2>=5;
                             [0, 0]

@dharr Thanks! Quite strangely, 

convert(hypergeom([1, 1, 3/2], [5/2, 5/2, 3, 3], +z), 'StandardFunctions'):

works, but

convert(hypergeom([1, 1, 3/2], [5/2, 5/2, 3, 3], -z), 'StandardFunctions'):

does not work. I believe Maple forgot something here. 

Besides, I try to use the same idea to simplify (or expand) the Gauss hypergeometric function 

hypergeom([1/4, 1/2], [5/4], z**4);

 unfortunately, even the more powerful `convert/StandardFunctions` does not work this time: 

simplify(hypergeom([1/4, 1/2], [5/4], z**4), hypergeom);
 = 
              simplify(hypergeom([1/4, 1/2], [5/4], z^4), hypergeom) 

convert(hypergeom([1/4, 1/2], [5/4], z**4), 'StandardFunctions');
 = 
                   convert(hypergeom([1/4, 1/2], [5/4], z^4), 'StandardFunctions')

convert(hypergeom([1/4, 1/2], [5/4], z**4), 'Elliptic_related');
 = 
             convert(hypergeom([1/4, 1/2], [5/4], z^4), 'Elliptic_related')

convert(hypergeom([1/4, 1/2], [5/4], z**4), EllipticF);
 = 
                   convert(hypergeom([1/4, 1/2], [5/4], z^4), EllipticF)

Yet plot(InverseJacobiSN(z, I)/z - hypergeom([1/4, 1/2], [5/4], z**4), z = -Pi/3 .. Pi/3, 'legend' = hypergeom([1/4, 1/2], [5/4], z**4) - EllipticF(z, I)/z, 'color'=ColorTools:-Color([0.368417, 0.506779, 0.709798]), 'discont'=true, 'adaptive'=8, 'gridlines'=true) suggests that piecewise(z<>0,hypergeom([1/4, 1/2], [5/4], z**4) = EllipticF(z, I)/z)
Is there a workaround to transform z*hypergeom([1/4, 1/2], [5/4], z**4) into EllipticF(z, I)

@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?)

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