home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   sci.math.symbolic      Symbolic algebra discussion      10,432 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,842 of 10,432   
   acer to none Rouben Rostamian   
   Re: how does your CAS handle this integr   
   05 Mar 18 12:59:17   
   
   From: maple@rogers.com   
      
   On Monday, March 5, 2018 at 12:20:34 PM UTC-5, none Rouben Rostamian wrote:   
   > In article ...,   
   > acer   wrote:   
   > >restart;   
   > >integrand := cos(x)* sin(x)^2*cos(n*x):   
   > >int(integrand,x=0..2*Pi,allsolutions) assuming n::integer, n>0;   
   > >   
   > >                     /  1   
   > >                     |  - Pi         n = 1   
   > >                     |  4   
   > >                     |   
   > >                    <    1   
   > >                     | - - Pi        n = 3   
   > >                     |   4   
   > >                     |   
   > >                     \   0         otherwise   
   > >   
   >   
   > Let's look at a simpler case:   
   > restart;   
   > > kernelopts(version);   
   >            Maple 2017.3, X86 64 LINUX, Sep 27 2017, Build ID 1265877   
   >   
   > > int(cos(n*x), x=0..2*Pi, allsolutions) assuming n::integer;   
   >                             { 2 Pi          n = 0   
   >                             {   
   >                             {  0          otherwise   
   >   
   > That's good. But this one doesn't work -- the n=0 case should give 2 Pi:   
   > > int(exp(n*I*x), x=0..2*Pi, allsolutions) assuming n::integer;   
   >                                        0   
   >   
   > --   
   > Rouben Rostamian   
      
   That's a good observation.   
      
   It's likely always going to be tough for a CAS to robustly find   
   a finite number of exceptions to an arbitrary "generic" solution.   
      
   For the two examples given, it doesn't lose generality to   
   apply Re+Im*I .   
      
     restart;   
     int( (Re+Im*I)( exp(n*I*x) ), x=0..2*Pi, allsolutions)   
       assuming n::integer;   
      
                   { 2 Pi          n = 0   
                   {   
                   {  0          otherwise   
      
     restart;   
     int( (Re+Im*I)( cos(x)*sin(x)^2*cos(n*x) ), x=0..2*Pi, allsolutions)   
       assuming n::integer, n>0;   
      
                   {   Pi   
                   {  ----           n = 1   
                   {   4   
                   {   
                   {    Pi   
                   { - ----          n = 3   
                   {    4   
                   {   
                   {   0           otherwise   
      
      
   But I'd imagine that you'll always be able to find examples which   
   break this kind of thing. Computing the piecewise solution as   
   desired requires various short-circuiting of the usual mechanisms.   
   In part that's because extra analysis has to be done before simply   
   apply limits (FTOC).   
      
   It doesn help much that assumptions (in Maple if not other systems)   
   started out as a wrapping. Using them correctly at all junctures   
   must require algorithmic rewriting.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca