acer

32632 Reputation

29 Badges

20 years, 45 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@Cody With a few edits and corrections, your PSeries can do both, sure.

> PSeries:=proc(cfn,var,minreg::integer,maxreg::integer)
>   local r,imaxreg,iminreg;
>     if minreg>maxreg then
>       imaxreg:=minreg; iminreg:=maxreg;
>     else
>       imaxreg:=maxreg; iminreg:=minreg;
>     end if;
>      add(cfn(r)*var(r),r=iminreg..imaxreg);
>   end proc:
 
> PSeries(i->1/i!, R->x^R, 2, 0);

                                             2
                                1 + x + 1/2 x

 
> PSeries(i->(-1)^(i-1), R->1/R^2, 4, 1);

                                      115
                                      ---
                                      144

 
> h:=proc(n::posint)
>   local i;
>   add( (-1)^(i-1) * 1/i^2 , i=1..n );
> end proc:
 
> seq(h(i),i=1..6);

                                  31  115  3019  973
                          1, 3/4, --, ---, ----, ----
                                  36  144  3600  1200

> seq( PSeries(i->(-1)^(i-1), R->1/R^2, i, 1), i=1..6);

                                  31  115  3019  973
                          1, 3/4, --, ---, ----, ----
                                  36  144  3600  1200

@mzh I just wrote Shift-minus because that's where the underscore is on my keyboard.

I believe that Command-underscore should get the subliteral on OSX. See the 2D Math shortcut keys help-page.

@mzh I just wrote Shift-minus because that's where the underscore is on my keyboard.

I believe that Command-underscore should get the subliteral on OSX. See the 2D Math shortcut keys help-page.

@jscottelder I didn't use any command from the IntegrationTools package here.

@jscottelder I didn't use any command from the IntegrationTools package here.

I am guessing that he is using 2D Math input and has a habit of leaving a space between the name and the bracketed arguments when typing in his function applications.

For example, he may be typing in Func (args) instead of Func(args). The extra space gets it interpreted as multiplication of Func and (args), ie. Func*(args) in 2D Math input.

acer

I am guessing that he is using 2D Math input and has a habit of leaving a space between the name and the bracketed arguments when typing in his function applications.

For example, he may be typing in Func (args) instead of Func(args). The extra space gets it interpreted as multiplication of Func and (args), ie. Func*(args) in 2D Math input.

acer

Sorry, I hope that the second thread is now linked properly, in the post.

Maybe wolframalpha can give an indication of its strength, using similar examples? It gave a result for,

Integrate[Cos[x]/(1+x^6),x,-infinity,infinity]

but timed out on,

Integrate[Cos[x]/(1+x^8),x,-infinity,infinity]

Now, with a little post-simplification I could obtain in Maple 16.01 a form pretty similar to that which wolframalpha obtained for the first of those two, ie.,

T:=int(cos(x)/(1+x^6),x=-infinity..infinity):

collect(subsindets(simplify(evalc(T),size),
                   specfunc(anything,{sinh,cosh}),
                   t->convert(t,expln)),
        exp(-1/2));

1 /   /1  (1/2)\    (1/2)    /1  (1/2)\\       /-1\   1           
- |cos|- 3     | + 3      sin|- 3     || Pi exp|--| + - Pi exp(-1)
3 \   \2       /             \2       //       \2 /   3           

But if it were using a contour method then I'd have expected Mathematica to get the second example quite quickly.

Is this an area for so-called hybrid symbolic-numeric computation (in the practical sense, as opposed to a grant application sense)? Poles might be found numerically, say.

acer

@LijiH No (edited: by which I mean, if you demand it without I=sqrt(-1))

@LijiH No (edited: by which I mean, if you demand it without I=sqrt(-1))

It's not clear what exactly you're saying. Could you upload a simple example in a worksheet, and clear mark what you think is a 2D Math literal subscript within it, and note the actions that undermine that aspect?

If you are working with summations (function calls to `Sum`, or unevaluated function calls to `sum`) then how can a literal subscript be of any special use? If a name that looks like x-subscript-i is a name with a literal subscript then it will not change as `i` changes. And, inside a `sum` that uses `i` as the index of summation then such an x-subscript-i would be equivalent to a constant.

It is not at all true that the whole point behind literal subscripts is to "make the equations visual." Such a claim makes it unclear whether your understanding of the term agrees with how it is used in Maple. If I misunderstand you then I apologize -- it's hard without an example worksheet. The purpose of a literal subscript is to provide a distinct name which is wholly independent of the base-name. In other words, the purpose is to provide a visually subscripted name which is acted upon as if it were a unique name with no relationship to either the unsubscripted base name or the subscript.

For example, suppose that x[i] was a name with a literal subscript. That means that it is not equal to x[0] when i=0 since that x[i] is its own unique identifier and depends upon neither x nor i, in both a mathematical and a syntactical way. Such a subscripted name is not useful in the usual way if used inside a sum indexed by `i`.

Indexed names, on the other hand, change identity as the value of the index changes. If x[i] is the 2D Math input representing the 1D Maple Notation name x[i] then it changes identity as `i` changes. Just as in 1D, this indexed name is like what usually gets used within a sum indexed by `i`. The whole point of making indexed names be marked up to appear as subscripted names when displayed as 2D Math input is so that some indexed formula is visual (ie. 2D).

acer

Some might find interesting the arXiv.org paper, Two-term recurrence formulae for indefinite algebraic integrals, and this usenet thread.

acer

@Markiyan Hirnyk I worked it out with Analytic approximately 12 hours ago, after quite a bit of digging inside `fsolve/polyill`, and then decided to wait to see whether he really needed all the nonreal roots. My answer coincided primarily with... lunch time.

I don't track the Recent pages here; just use a feed to google Reader which often has quite a delay in auto-freshing. It's not as if it were any great accomplishment to figure it out.

I'm more interested in what's going on in the hang by`fsolve/polyill` and RootFinding:-Isolate (only 72 roots found?... but why?) than I am in competing.

@Markiyan Hirnyk I worked it out with Analytic approximately 12 hours ago, after quite a bit of digging inside `fsolve/polyill`, and then decided to wait to see whether he really needed all the nonreal roots. My answer coincided primarily with... lunch time.

I don't track the Recent pages here; just use a feed to google Reader which often has quite a delay in auto-freshing. It's not as if it were any great accomplishment to figure it out.

I'm more interested in what's going on in the hang by`fsolve/polyill` and RootFinding:-Isolate (only 72 roots found?... but why?) than I am in competing.

It's an interesting give and take, between speed and memory allocation, with the combinat:-nextcomb command (new in Maple 16).

At (m,n)=(21,10) it can take only half the time to generate all combinations up front, but three times the allocation. Up at (m,n)=(26,10) the timing ratio is about the same (on my i7) but the memory for storing all combinations gets to about 30 times more than with using nextcomb (on 64bit Maple 16 on Windows 7).

restart:
st,ba:=time(),kernelopts(bytesalloc):
A:=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u]:
L := combinat:-choose(21, 10):
for B in L do testthis:=A[B]; end do:
time()-st,kernelopts(bytesalloc)-ba;

                        5.351, 325607424

restart:
with(combinat):
st,ba:=time(),kernelopts(bytesalloc):
A:=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u]:
M,N := nops(A), 10:
B := [$1..N]:
testthis:=A[B]:
for ii from 1 to numbcomb(M, N)-1 do
   B:=[nextcomb(B, M)[]];
   testthis:=A[B];
end do:
time()-st,kernelopts(bytesalloc)-ba;

                        11.248, 99635200

restart:
st,ba:=time(),kernelopts(bytesalloc):
A:=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]:
L := combinat:-choose(26, 10):
for B in L do testthis:=A[B]; end do:
time()-st,kernelopts(bytesalloc)-ba;

                       84.927, 3847241728

restart:
with(combinat):
st,ba:=time(),kernelopts(bytesalloc):
A:=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z]:
M,N := nops(A), 10:
B := [$1..N]:
testthis:=A[B]:
for ii from 1 to numbcomb(M, N)-1 do
   B:=[nextcomb(B, M)[]];
   testthis:=A[B];
end do:
time()-st,kernelopts(bytesalloc)-ba;

                       168.559, 99635200

Using nextcomb might strictly require even less memory than gets allocated in practice, since the Maple 16 kernel is more generous with allocating itself memory resources (...leading up to the amounts at which initial garbage collection happens).

acer

First 399 400 401 402 403 404 405 Last Page 401 of 597