#2792 expand does not work correctly

None
closed
nobody
None
5
2014-08-19
2014-07-30
dan hayes
No

wxMaxima version: 13.4.0
Maxima version: 5.31.1
Maxima build date: 2013-09-24 09:49:12
Host type: i686-pc-mingw32
Lisp implementation type: GNU Common Lisp (GCL)
Lisp implementation version: GCL 2.6.8

(t:'integrate('integrate(('integrate(f("..",[z[1]-cos(aw)*k,y[1]-sin(ap)*sin(aw)*k,x[1]-cos(ap)*sin(aw)*k],[sqrt(m[1]/m[2])*cos(aw)*k+z[2]
,sqrt(m[1]/m[2])*sin(ap)*sin(aw)*k+y[2], sqrt(m[1]/m[2])*cos(ap)*sin(aw)*k+x[2]], ".."),k,0,ul))*sin(aw),aw,0,%pi),ap,0,2*%pi)
,tc:changevar(t,kk1+z[1]-cos(aw)*k,kk1,k),td:expand(diff(tc,z[1])),ldisp([length(td)]))

NOw it is obvious there are 3 parts which i want to deal with - those which are integrated with respect to 2 variables and those wrt 3 variables. for length(td) it gives 4 instead of the correct 3 and totally nonsensical parts when i ask for eg.
part(td,2) , part(td,3) ,part(td,4)
Seems no way to pull out the correct parts so I can continue.

Related

Bugs: #2792

Discussion

  • Robert Dodier

    Robert Dodier - 2014-07-30
    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -5,9 +5,11 @@
     Lisp implementation type: GNU Common Lisp (GCL)
     Lisp implementation version: GCL 2.6.8
    
    +~~~~
     (t:'integrate('integrate(('integrate(f("..",[z[1]-cos(aw)*k,y[1]-sin(ap)*sin(aw)*k,x[1]-cos(ap)*sin(aw)*k],[sqrt(m[1]/m[2])*cos(aw)*k+z[2]
     ,sqrt(m[1]/m[2])*sin(ap)*sin(aw)*k+y[2], sqrt(m[1]/m[2])*cos(ap)*sin(aw)*k+x[2]], ".."),k,0,ul))*sin(aw),aw,0,%pi),ap,0,2*%pi)
     ,tc:changevar(t,kk1+z[1]-cos(aw)*k,kk1,k),td:expand(diff(tc,z[1])),ldisp([length(td)]))
    +~~~~
    
     NOw it is obvious there are 3 parts which i want to deal with - those which are integrated with respect to 2 variables and those wrt 3 variables. for length(td) it gives 4 instead of the correct 3 and totally nonsensical parts when i ask for eg.
     part(td,2) , part(td,3) ,part(td,4)
    
     
  • Robert Dodier

    Robert Dodier - 2014-07-30

    (1) Please enclose blocks of code in four tildes ~~~~ on a separate line before and after the code, so that it's formatted as code. Otherwise it is unreadable.

    (2) td is an integral of the form 'integrate(<stuff>, ap, 0, 2*%pi), therefore length(td) returns 4, and the four parts of the integral are the integrand (<stuff>), ap, 0, and 2*%pi. That all seems correct. If you expected something else, you must say what you expected, and what you got instead. It is more or less impossible for others to guess what is going on.

     
  • dan hayes

    dan hayes - 2014-07-31

    this is especially bad it does not work in this case as the main reason for using changevar(...) is in successive integration by parts and the first thing one certainly wants is to separate the integrated(at limits) parts from the successive to be continued in integral parts.

    On Wednesday, July 30, 2014 12:31 AM, dan hayes zmth@users.sf.net wrote:


    [bugs:#2792] expand does not work correctly
    Status: open
    Group: None
    Created: Wed Jul 30, 2014 05:31 AM UTC by dan hayes
    Last Updated: Wed Jul 30, 2014 05:31 AM UTC
    Owner: nobody
    wxMaxima version: 13.4.0
    Maxima version: 5.31.1
    Maxima build date: 2013-09-24 09:49:12
    Host type: i686-pc-mingw32
    Lisp implementation type: GNU Common Lisp (GCL)
    Lisp implementation version: GCL 2.6.8
    (t:'integrate('integrate(('integrate(f("..",[z[1]-cos(aw)k,y[1]-sin(ap)sin(aw)k,x[1]-cos(ap)sin(aw)k],[sqrt(m[1]/m[2])cos(aw)k+z[2]
    ,sqrt(m[1]/m[2])sin(ap)sin(aw)k+y[2], sqrt(m[1]/m[2])cos(ap)sin(aw)k+x[2]], ".."),k,0,ul))sin(aw),aw,0,%pi),ap,0,2%pi)
    ,tc:changevar(t,kk1+z[1]-cos(aw)k,kk1,k),td:expand(diff(tc,z[1])),ldisp([length(td)]))
    NOw it is obvious there are 3 parts which i want to deal with - those which are integrated with respect to 2 variables and those wrt 3 variables. for length(td) it gives 4 instead of the correct 3 and totally nonsensical parts when i ask for eg.
    part(td,2) , part(td,3) ,part(td,4)
    Seems no way to pull out the correct parts so I can continue.


    Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/maxima/bugs/2792/
    To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

     

    Related

    Bugs: #2792

    Attachments
  • Robert Dodier

    Robert Dodier - 2014-08-01

    It appears that you expect changevar to carry out an integration by parts. changevar doesn't do that. You can try the function byparts which is in share/integration/byparts.mac and you can load it via load(byparts);.

     
  • Robert Dodier

    Robert Dodier - 2014-08-08
    • status: open --> closed
     
    • dan hayes

      dan hayes - 2014-08-09

      ok that about by parts was just a secondary issue. Anyway the problem is expand(....) DID not work regardless of about by parts. In fact i was not trying to do integration by parts but it came out that it hapenned to be like that in this case.

      On Friday, August 8, 2014 6:05 PM, Robert Dodier robert_dodier@users.sf.net wrote:

      * status: open --> closed
      * Comment:
      

      It appears the problem is due to a misunderstanding about changevar. Therefore closing this report.


      [bugs:#2792] expand does not work correctly
      Status: closed
      Group: None
      Created: Wed Jul 30, 2014 05:31 AM UTC by dan hayes
      Last Updated: Fri Aug 01, 2014 09:42 PM UTC

      Owner: nobody
      wxMaxima version: 13.4.0
      Maxima version: 5.31.1
      Maxima build date: 2013-09-24 09:49:12
      Host type: i686-pc-mingw32
      Lisp implementation type: GNU Common Lisp (GCL)
      Lisp implementation version: GCL 2.6.8
      (t:'integrate('integrate(('integrate(f("..",[z[1]-cos(aw)k,y[1]-sin(ap)sin(aw)k,x[1]-cos(ap)sin(aw)k],[sqrt(m[1]/m[2])cos(aw)k+z[2] ,sqrt(m[1]/m[2])sin(ap)sin(aw)k+y[2], sqrt(m[1]/m[2])cos(ap)sin(aw)k+x[2]], ".."),k,0,ul))sin(aw),aw,0,%pi),ap,0,2%pi) ,tc:changevar(t,kk1+z[1]-cos(aw)k,kk1,k),td:expand(diff(tc,z[1])),ldisp([length(td)]))
      NOw it is obvious there are 3 parts which i want to deal with - those which are integrated with respect to 2 variables and those wrt 3 variables. for length(td) it gives 4 instead of the correct 3 and totally nonsensical parts when i ask for eg.
      part(td,2) , part(td,3) ,part(td,4)
      Seems no way to pull out the correct parts so I can continue.


      Sent from sourceforge.net because maxima-bugs@lists.sourceforge.net is subscribed to https://sourceforge.net/p/maxima/bugs/
      To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.



      Maxima-bugs mailing list
      Maxima-bugs@lists.sourceforge.net
      https://lists.sourceforge.net/lists/listinfo/maxima-bugs

       

      Related

      Bugs: #2792

      Attachments
      • dan hayes

        dan hayes - 2014-08-09

        also my maxima does  NOT have anything named "byparts" . IT does NOT appear in the help index or even search.

        On Friday, August 8, 2014 8:38 PM, dan hayes zmth@users.sf.net wrote:

        ok that about by parts was just a secondary issue. Anyway the problem is expand(....) DID not work regardless of about by parts. In fact i was not trying to do integration by parts but it came out that it hapenned to be like that in this case.
        On Friday, August 8, 2014 6:05 PM, Robert Dodier robert_dodier@users.sf.net wrote:
        * status: open --> closed * Comment:
        It appears the problem is due to a misunderstanding about changevar. Therefore closing this report.


        [bugs:#2792] expand does not work correctly
        Status: closed
        Group: None
        Created: Wed Jul 30, 2014 05:31 AM UTC by dan hayes
        Last Updated: Fri Aug 01, 2014 09:42 PM UTC
        Owner: nobody
        wxMaxima version: 13.4.0
        Maxima version: 5.31.1
        Maxima build date: 2013-09-24 09:49:12
        Host type: i686-pc-mingw32
        Lisp implementation type: GNU Common Lisp (GCL)
        Lisp implementation version: GCL 2.6.8
        (t:'integrate('integrate(('integrate(f("..",[z[1]-cos(aw)k,y[1]-sin(ap)sin(aw)k,x[1]-cos(ap)sin(aw)k],[sqrt(m[1]/m[2])cos(aw)k+z[2] ,sqrt(m[1]/m[2])sin(ap)sin(aw)k+y[2], sqrt(m[1]/m[2])cos(ap)sin(aw)k+x[2]], ".."),k,0,ul))sin(aw),aw,0,%pi),ap,0,2%pi) ,tc:changevar(t,kk1+z[1]-cos(aw)k,kk1,k),td:expand(diff(tc,z[1])),ldisp([length(td)]))
        NOw it is obvious there are 3 parts which i want to deal with - those which are integrated with respect to 2 variables and those wrt 3 variables. for length(td) it gives 4 instead of the correct 3 and totally nonsensical parts when i ask for eg.
        part(td,2) , part(td,3) ,part(td,4)
        Seems no way to pull out the correct parts so I can continue.


        Sent from sourceforge.net because maxima-bugs@lists.sourceforge.net is subscribed to https://sourceforge.net/p/maxima/bugs/
        To unsubscribe from further messages, a project admin can change settings at https://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.



        Maxima-bugs mailing list
        Maxima-bugs@lists.sourceforge.net
        https://lists.sourceforge.net/lists/listinfo/maxima-bugs


        [bugs:#2792] expand does not work correctly
        Status: closed
        Group: None
        Created: Wed Jul 30, 2014 05:31 AM UTC by dan hayes
        Last Updated: Fri Aug 08, 2014 11:05 PM UTC
        Owner: nobody
        wxMaxima version: 13.4.0
        Maxima version: 5.31.1
        Maxima build date: 2013-09-24 09:49:12
        Host type: i686-pc-mingw32
        Lisp implementation type: GNU Common Lisp (GCL)
        Lisp implementation version: GCL 2.6.8
        (t:'integrate('integrate(('integrate(f("..",[z[1]-cos(aw)k,y[1]-sin(ap)sin(aw)k,x[1]-cos(ap)sin(aw)k],[sqrt(m[1]/m[2])cos(aw)k+z[2] ,sqrt(m[1]/m[2])sin(ap)sin(aw)k+y[2], sqrt(m[1]/m[2])cos(ap)sin(aw)k+x[2]], ".."),k,0,ul))sin(aw),aw,0,%pi),ap,0,2%pi) ,tc:changevar(t,kk1+z[1]-cos(aw)k,kk1,k),td:expand(diff(tc,z[1])),ldisp([length(td)]))
        NOw it is obvious there are 3 parts which i want to deal with - those which are integrated with respect to 2 variables and those wrt 3 variables. for length(td) it gives 4 instead of the correct 3 and totally nonsensical parts when i ask for eg.
        part(td,2) , part(td,3) ,part(td,4)
        Seems no way to pull out the correct parts so I can continue.


        Sent from sourceforge.net because maxima-bugs@lists.sourceforge.net is subscribed to http://sourceforge.net/p/maxima/bugs/
        To unsubscribe from further messages, a project admin can change settings at http://sourceforge.net/p/maxima/admin/bugs/options. Or, if this is a mailing list, you can unsubscribe from the mailing list.



        Maxima-bugs mailing list
        Maxima-bugs@lists.sourceforge.net
        https://lists.sourceforge.net/lists/listinfo/maxima-bugs

         

        Related

        Bugs: #2792

        Attachments
  • Robert Dodier

    Robert Dodier - 2014-08-08

    It appears the problem is due to a misunderstanding about changevar. Therefore closing this report.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks