jakubi

1369 Reputation

12 Badges

19 years, 340 days

MaplePrimes Activity


These are replies submitted by jakubi

It needs some help:

pdsolve(PDE, f(x,t),HINT=`+`,build);


                              2
        f(x, t) = -1/2 _c[2] x  + _C1 x + _C2 + _c[2] t + _C3


`student/expand/Sum`((A*x[i]+B)^2,i=1..n);


            /  n        \         /  n       \      /  n    \
            |-----      |         |-----     |      |-----  |
          2 | \        2|         | \        |    2 | \     |
         A  |  )   x[i] | + 2 A B |  )   x[i]| + B  |  )   1|
            | /         |         | /        |      | /     |
            |-----      |         |-----     |      |-----  |
            \i = 1      /         \i = 1     /      \i = 1  /

Apparently, the code of 'student/expand/Sum' works independently of whether the 'student' package exists or not

`student/expand/Sum`((A*x[i]+B)^2,i=1..n);


            /  n        \         /  n       \      /  n    \
            |-----      |         |-----     |      |-----  |
          2 | \        2|         | \        |    2 | \     |
         A  |  )   x[i] | + 2 A B |  )   x[i]| + B  |  )   1|
            | /         |         | /        |      | /     |
            |-----      |         |-----     |      |-----  |
            \i = 1      /         \i = 1     /      \i = 1  /

Apparently, the code of 'student/expand/Sum' works independently of whether the 'student' package exists or not

I observe:

`expand/Int`(1/(x-1)-1/x,x);

                             /
                            |      1
                            |  --------- dx
                            |  (x - 1) x
                           /

showstat(`expand/Int`,1);
`expand/Int` := proc(f, r::{name, name = range})
local e, x, inx, notinx, z, c, s, opts, J;
   1   e := normal(f);
...

I have not tracked it in detail, but may be this 'normal'.

PS. Interesting:

with(student):
`expand/Int`(1/(x-1)-1/x,x);


                        /              /
                       |    1         |
                       |  ----- dx -  |  1/x dx
                       |  x - 1       |
                      /              /

Now 'showstat(`expand/Int`)' shows a quite different code.

I observe:

`expand/Int`(1/(x-1)-1/x,x);

                             /
                            |      1
                            |  --------- dx
                            |  (x - 1) x
                           /

showstat(`expand/Int`,1);
`expand/Int` := proc(f, r::{name, name = range})
local e, x, inx, notinx, z, c, s, opts, J;
   1   e := normal(f);
...

I have not tracked it in detail, but may be this 'normal'.

PS. Interesting:

with(student):
`expand/Int`(1/(x-1)-1/x,x);


                        /              /
                       |    1         |
                       |  ----- dx -  |  1/x dx
                       |  x - 1       |
                      /              /

Now 'showstat(`expand/Int`)' shows a quite different code.

I will leave Paul to evaluate it...

For me, the problem with such low-level tricks, is that they are distracting. Ie they oblige to shift the attention away from Mathematics to Maple data structures. What both ways show is that for such a common operation a 'SummationTool:-Expand' command is missing and should be available (or something that works for integrals and sums).

How long would it take to any of those gifted developers of Maplesoft to provide a "SummationTool" package with some six commands equivalent to 'IntegrationTools'?
(my guess is a few hours at most).

 

 

 

I will leave Paul to evaluate it...

For me, the problem with such low-level tricks, is that they are distracting. Ie they oblige to shift the attention away from Mathematics to Maple data structures. What both ways show is that for such a common operation a 'SummationTool:-Expand' command is missing and should be available (or something that works for integrals and sums).

How long would it take to any of those gifted developers of Maplesoft to provide a "SummationTool" package with some six commands equivalent to 'IntegrationTools'?
(my guess is a few hours at most).

 

 

 

The top level 'expand' does not work the same as 'IntegrationTools:-Expand' with respect to linear combinations:

with(IntegrationTools):
v := Int(s*f(x)+t*g(x), x = a..b);
Expand(v);


                                      b                b
                                     /                /
                                    |                |
                                 s  |   f(x) dx + t  |   g(x) dx
                                    |                |
                                   /                /
                                     a                a


while
expand(v);
                          b
                         /
                        |
                        |   s f(x) + t g(x) dx
                        |
                       /
                         a
 

The top level 'expand' does not work the same as 'IntegrationTools:-Expand' with respect to linear combinations:

with(IntegrationTools):
v := Int(s*f(x)+t*g(x), x = a..b);
Expand(v);


                                      b                b
                                     /                /
                                    |                |
                                 s  |   f(x) dx + t  |   g(x) dx
                                    |                |
                                   /                /
                                     a                a


while
expand(v);
                          b
                         /
                        |
                        |   s f(x) + t g(x) dx
                        |
                       /
                         a
 

No, it should not be necesary to perform low level data structure gymnastics to make such a normal mathematical manipulation. In particular, what is missing here is a package "SumationTools", along the line of the package 'IntegrationTools', with some facilities eg. to distribute the sumation, split its range, combine terms, etc.

 

No, it should not be necesary to perform low level data structure gymnastics to make such a normal mathematical manipulation. In particular, what is missing here is a package "SumationTools", along the line of the package 'IntegrationTools', with some facilities eg. to distribute the sumation, split its range, combine terms, etc.

 

I see that the algolib Library comes with a replacement LaTeX package. For these two examples, one works better, but the other not:

with(LaTeX):
latex(2*x/(x-1));

\frac{2 x}{x - 1}

latex("x");

Error, (in typetomath) x: invalid for math mode

Apparently, if "algolib" is in the 'libname' path, before the main library, the native 'latex' command cannot be used (even as ':-latex') because of a "missing" export in the algolib version of 'LaTeX'. Eg:

latex(a);

Error, (in latex/latex/symbol) CheckLineBreak is not a command in the LaTeX package

It seems that a number of 'latex' replacements have been developed independently.

After adding algolib to 'libname':

Sn:=sum(2^k/k,  k=1..n);

                                             n                        n
                                   Pi n I + 2  LerchPhi(2, 1, n) n - 2
                           Sn := - ------------------------------------
                                                    n



seq(simplify(Sn),n=1..10);

                                         256  416  4832  8192  42496  74752
                       2, 4, 20/3, 32/3, ---, ---, ----, ----, -----, -----
                                         15   15   105   105    315    315


with(gfun):
guessgf([0,seq(simplify(Sn),n=1..10)],x);

                                    ln(-1 + 2 x) - Pi I
                                    [-------------------, ogf]
                                            x - 1

equivalent(%[1],x,n):
map(simplify,%) assuming n>0;

                                         (n + 1)       n
                                        2             2
                                        -------- + O(----)
                                           n           2
                                                      n

After adding algolib to 'libname':

Sn:=sum(2^k/k,  k=1..n);

                                             n                        n
                                   Pi n I + 2  LerchPhi(2, 1, n) n - 2
                           Sn := - ------------------------------------
                                                    n



seq(simplify(Sn),n=1..10);

                                         256  416  4832  8192  42496  74752
                       2, 4, 20/3, 32/3, ---, ---, ----, ----, -----, -----
                                         15   15   105   105    315    315


with(gfun):
guessgf([0,seq(simplify(Sn),n=1..10)],x);

                                    ln(-1 + 2 x) - Pi I
                                    [-------------------, ogf]
                                            x - 1

equivalent(%[1],x,n):
map(simplify,%) assuming n>0;

                                         (n + 1)       n
                                        2             2
                                        -------- + O(----)
                                           n           2
                                                      n

I think that a three (or four) argument version is better:

fas(expression,target,transformation)

plus an optional "avoid".

May be also, for multiple conversions at once, a list:

fas(expression,[[target1,transformation1],...[[targetN,transformationN]])

Or, perhaps, for consistency, follow the same  optional arguments in ?convert/to_special_function, as this stuff is really a patch to 'convert'.

Yet, an issue is stating the conditions of validity of the transformation. Perhaps also an option "info", say, would be useful.

 

 

 

 

First 77 78 79 80 81 82 83 Last Page 79 of 123