Alejandro Jakubi

MaplePrimes Activity


These are replies submitted by Alejandro Jakubi

@chengran 

Certainly, Maple does not evaluate this integral:

J:=Int(exp(-B*y^4-C*y^2)*y^3,y=D..infinity):
value(J) assuming positive;
                    infinity
                   /
                  |                  4      2   3
                  |          exp(-B y  - C y ) y  dy
                  |
                 /
                   D

but does it by a change of variables, you can use PDEtools:-dchange for that:

 
PDEtools:-dchange(y=sqrt(x),J);
value(%) assuming positive;

                   infinity
                  /
                 |                      2
                 |          1/2 exp(-B x  - C x) x dx
                 |
                /
                   2
                  D


      /
      |   (3/2)
  1/8 |2 B
      |
      \

                            2             2      2  4        2
               1/2     2 B D  + C        C  + 4 B  D  + 4 C D  B
         + C Pi    erf(----------) B exp(-----------------------)
                            1/2                    4 B
                         2 B

                        2      2  4        2     \
               1/2     C  + 4 B  D  + 4 C D  B   |         4      2
         - C Pi    exp(-----------------------) B| exp(-B D  - C D )
                                 4 B             |
                                                 /

           /  5/2
          /  B
         /

The problem with the first form seems a bug:

restart:
infolevel[IntegrationTools]:=3: int(exp(-B*y^4-C*y^2)*y^3,y=D..infinity) assuming positive; Definite Integration: Integrating expression on y=D..infinity Definite Integration: Using the integrators [distribution, piecewise, series, o, polynomial, ln, lookup, cook, ratpoly, elliptic, elliptictrig, meijergspecial, improper, asymptotic, ftoc, meijerg, contour, ftocms] LookUp Integrator: an error was caught in the IntegralTransform look up method. `dchange/info`: missing a list with the new variables LookUp Integrator: unable to find the specified integral in the table Definite Integration: Returning integral unevaluated. ...

That is, it sounds like it fails to make the change of variables automatically. In any case, no other method succeeds. On the other hand, for the second form, the method FTOC succeeds:

int(1/2*exp(-B*x^2-C*x)*x,x = D^2 .. infinity) assuming positive;
Definite Integration: Integrating expression on x=D^2..infinity Definite Integration: Using the integrators [distribution, piecewise, series, o, polynomial, ln, lookup, cook, ratpoly, elliptic, elliptictrig, meijergspecial, improper, asymptotic, ftoc, meijerg, contour, ftocms] LookUp Integrator: an error was caught in the IntegralTransform look up method. `dchange/info`: missing a list with the new variables LookUp Integrator: unable to find the specified integral in the table Definite Integration: Method ftoc succeeded. Definite Integration: Finished sucessfully. ...

@chengran 

Certainly, Maple does not evaluate this integral:

J:=Int(exp(-B*y^4-C*y^2)*y^3,y=D..infinity):
value(J) assuming positive;
                    infinity
                   /
                  |                  4      2   3
                  |          exp(-B y  - C y ) y  dy
                  |
                 /
                   D

but does it by a change of variables, you can use PDEtools:-dchange for that:

 
PDEtools:-dchange(y=sqrt(x),J);
value(%) assuming positive;

                   infinity
                  /
                 |                      2
                 |          1/2 exp(-B x  - C x) x dx
                 |
                /
                   2
                  D


      /
      |   (3/2)
  1/8 |2 B
      |
      \

                            2             2      2  4        2
               1/2     2 B D  + C        C  + 4 B  D  + 4 C D  B
         + C Pi    erf(----------) B exp(-----------------------)
                            1/2                    4 B
                         2 B

                        2      2  4        2     \
               1/2     C  + 4 B  D  + 4 C D  B   |         4      2
         - C Pi    exp(-----------------------) B| exp(-B D  - C D )
                                 4 B             |
                                                 /

           /  5/2
          /  B
         /

The problem with the first form seems a bug:

restart:
infolevel[IntegrationTools]:=3: int(exp(-B*y^4-C*y^2)*y^3,y=D..infinity) assuming positive; Definite Integration: Integrating expression on y=D..infinity Definite Integration: Using the integrators [distribution, piecewise, series, o, polynomial, ln, lookup, cook, ratpoly, elliptic, elliptictrig, meijergspecial, improper, asymptotic, ftoc, meijerg, contour, ftocms] LookUp Integrator: an error was caught in the IntegralTransform look up method. `dchange/info`: missing a list with the new variables LookUp Integrator: unable to find the specified integral in the table Definite Integration: Returning integral unevaluated. ...

That is, it sounds like it fails to make the change of variables automatically. In any case, no other method succeeds. On the other hand, for the second form, the method FTOC succeeds:

int(1/2*exp(-B*x^2-C*x)*x,x = D^2 .. infinity) assuming positive;
Definite Integration: Integrating expression on x=D^2..infinity Definite Integration: Using the integrators [distribution, piecewise, series, o, polynomial, ln, lookup, cook, ratpoly, elliptic, elliptictrig, meijergspecial, improper, asymptotic, ftoc, meijerg, contour, ftocms] LookUp Integrator: an error was caught in the IntegralTransform look up method. `dchange/info`: missing a list with the new variables LookUp Integrator: unable to find the specified integral in the table Definite Integration: Method ftoc succeeded. Definite Integration: Finished sucessfully. ...

@hirnyk 

Actually I get this trick work from Maple 8 on.

A search for undocumented yields a list of many interesting examples of undocumented commands (e.g. the builtin procedure, inner). As a byproduct, it shows broken links to former blogs: roman_pearce's blog, acer's blog, etc. I wonder where the search engine is looking for so as to get these results.

As I see it, the consequences of the assumption integer are not properly analized. Look at this simpler example:

GAMMA(x)*sin(Pi*x) assuming x::integer;
                                  0

Tracing it, shows that the check x<=0 is made, which fails:

trace(`tools/type`):
GAMMA(x)*sin(Pi*x) assuming x::integer;
...
<-- exit tools/type (now in GAMMA) = true}
{--> enter tools/type, args = x <= 0
                                  i := [x, 0]

                                 try_is := true

                               is_input := x <= 0

                                  N := {}, {x}

                                 try_is := true

                                  ans := false

                                  ans := true

                                     false

<-- exit tools/type (now in GAMMA) = false}
...

Hence, GAMMA(x) returns as is, and the vanishing of sin(Pi*x) for integer x determines the result. On the other hand, by assuming nonposint, the same check yields true, the divergence of GAMMA is identified first, and an error message is issued instead:

GAMMA(x)*sin(Pi*x) assuming x::nonposint;
Error, (in assuming) when calling 'GAMMA'. Received: 'numeric exception: division by zero'

The same error message occurs in the original expression:

B:=binomial(x,k)/binomial(-x,k):
convert(B, GAMMA):
simplify(%):
% assuming x::nonposint;
Error, (in assuming) when calling 'GAMMA'. Received: 'numeric exception: division by zero'

Andrew,

It is good to know this information. I do not see it in ?updates,Maple14,GUI (is it documented elsewhere?).

Now, by setting Maple 13.02 or 14 Standard GUI to Font anti-aliasing: Disabled (under Win XP 32), and executing:

seq(Typesetting:-mi("z",fontstyle = "italic",size=i),i=8..24);

I get all the diagonal strokes complete. So, could you tell me at what point sizes do they disappear?

Indeed, I get much worst rendering with Font anti-aliasing: Enabled.

Andrew,

It is good to know this information. I do not see it in ?updates,Maple14,GUI (is it documented elsewhere?).

Now, by setting Maple 13.02 or 14 Standard GUI to Font anti-aliasing: Disabled (under Win XP 32), and executing:

seq(Typesetting:-mi("z",fontstyle = "italic",size=i),i=8..24);

I get all the diagonal strokes complete. So, could you tell me at what point sizes do they disappear?

Indeed, I get much worst rendering with Font anti-aliasing: Enabled.

If you mean fonts in Standard GUI, here Maple 14 fonts look much worst than Maple 13 ones (with identical default settings). My guess is that there is an optimization for different software/hardware.

The input to the "Maple Math" box is, by default, evaluated. And this is done, in the end by a Maple engine. Now, Maple LaTeX code output is generically bad and its generating facility has not been maintained for years. So, most likely, such nice math generated from LaTeX code is, for this forum, just a dream.

I did this experiment (meaning: I did not realized of this feature before). In this online SnuggleTeX LaTeX math mode expression converter to MathML, I entered e.g.

\frac {a} {b}

in the input box, and got this output:

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
   <semantics>
      <mfrac>
         <mi>a</mi>
         <mi>b</mi>
      </mfrac>
      <annotation encoding="SnuggleTeX">\[ \frac {a} {b} \]</annotation>
   </semantics>
</math>

I selected and copied it to the clipboard, and when pasting to the Maple 14 Classic or Standard GUI, I got this message box:

Maple 14
This clipboard contains MathML.
Do you want to convert the MathML into Maple expressions(s)?

Checked yes, and got a/b in the input line.

My guess is that this trick could work for simple enough expressions.

Edit: I have just tried the MathML Semantic Enrichment Demo default example:

2f(x)-e^x}{\sin xy^2(x-2)}

and pasting its Content MathML code:

<math xmlns="http://www.w3.org/1998/Math/MathML" display="block">
   <apply>
      <divide/>
      <apply>
         <minus/>
         <apply>
            <times/>
            <cn>2</cn>
            <apply>
               <ci type="function">f</ci>
               <ci>x</ci>
            </apply>
         </apply>
         <apply>
            <exp/>
            <ci>x</ci>
         </apply>
      </apply>
      <apply>
         <sin/>
         <apply>
            <times/>
            <ci>x</ci>
            <apply>
               <power/>
               <ci>y</ci>
               <cn>2</cn>
            </apply>
            <apply>
               <minus/>
               <ci>x</ci>
               <cn>2</cn>
            </apply>
         </apply>
      </apply>
   </apply>
</math>

I have got:

(2*f(x)-exp(x))/sin(x*y^2*(x-2));

which is not bad. By the way, this demo includes an attempted conversion to Maxima Input syntax.

@acer 

I agree. It seems that a workaround like this one is needed:

restart:
with(LinearAlgebra):
MI:=MatrixInverse;
with(Student):
MI(Matrix([[4]]));
MI := LinearAlgebra:-MatrixInverse

[1/4]

restart:
with(Student):
with(LinearAlgebra):
MI:=:-LinearAlgebra:-MatrixInverse;
MI(Matrix([[4]]));

MI := LinearAlgebra:-MatrixInverse

[1/4]

@acer 

I agree. It seems that a workaround like this one is needed:

restart:
with(LinearAlgebra):
MI:=MatrixInverse;
with(Student):
MI(Matrix([[4]]));
MI := LinearAlgebra:-MatrixInverse

[1/4]

restart:
with(Student):
with(LinearAlgebra):
MI:=:-LinearAlgebra:-MatrixInverse;
MI(Matrix([[4]]));

MI := LinearAlgebra:-MatrixInverse

[1/4]

@acer 

These seem to be the actual bindings:

restart:
with(LinearAlgebra):
with(Student):
subs(`tools/get_current_bind`("all"),LinearAlgebra); Student:-LinearAlgebra restart: with(Student): with(:-LinearAlgebra): subs(`tools/get_current_bind`("all"),LinearAlgebra); Student:-LinearAlgebra

@acer 

These seem to be the actual bindings:

restart:
with(LinearAlgebra):
with(Student):
subs(`tools/get_current_bind`("all"),LinearAlgebra); Student:-LinearAlgebra restart: with(Student): with(:-LinearAlgebra): subs(`tools/get_current_bind`("all"),LinearAlgebra); Student:-LinearAlgebra

@Will 

Your answer, and the design of Primes 2, makes me wonder whether you think that each article, name it Answer, Comment, etc, stand good in isolation, or whether you understand that they make sense only in the given context of their thread. 

First 102 103 104 105 106 107 108 Page 104 of 109