From: Richard F. <fa...@gm...> - 2023-07-15 20:50:19
|
I'm not sure what you really want to do, but maybe tex('integrate(f,x)= ratsimp(integrate(f,x))); will work? Any use of expand() except possibly just before display, is most likely unnecessary computationally. ratsimp() or ratexpand() are faster and more thorough for most situations. RJF On Sat, Jul 15, 2023 at 12:20 PM Jeronimo Pellegrini via Maxima-discuss < max...@li...> wrote: > Hi Eduardo! > > I'm not too familiar with the Maxima sources, but I believe you want the > `tex` function which is defined in src/mactex.lisp. > The definition looks like > > (defmspec $tex(l) ... ) > > and it uses the lisp function tex1, defined in the same file. > > Is that what you wanted to find? > > Jeronimo > > > On 2023-07-15 14:44, Eduardo Ochs wrote: > > Hi list, > > > > I just realized that I don't know how to go to the source of the "tex" > > function... I did this, > > > > f : x^3 * sqrt(1 - 4*x^2); > > F1 : 'integrate(f, x); > > F2 : changevar(F1, u=2*x, u, x); > > F3 : ev(F2, 'integrate); > > F4 : expand(F3); > > F5 : subst([u=2*x], F4); > > s : sqrt(1-4*x^2); > > F6 : expand(F5/s)*s; > > tex(F6, false); > > > > :lisp (describe '$changevar) > > :lisp (describe '$tex) > > > > and the ":lisp (describe '$changevar)" gave me lots of information: > > > > MAXIMA::$CHANGEVAR > > [symbol] > > > > $CHANGEVAR names a compiled function: > > Lambda-list: (&REST #:REST-ARG-1) > > Derived type: FUNCTION > > Source file: /home/edrx/bigsrc/maxima/src/outmis.lisp > > > > $CHANGEVAR has a compiler-macro: > > Documentation: > > Compiler-macro to convert calls to $CHANGEVAR to CHANGEVAR-IMPL > > Source file: /home/edrx/bigsrc/maxima/src/outmis.lisp > > > > Symbol-plist: > > SUBC -> NIL > > KIND -> (C) > > IMPL-NAME -> CHANGEVAR-IMPL > > TRANSLATED -> T > > ARG-LIST -> (EXPR TRANS NVAR OVAR) > > > > when I'm connected to Sly I can type `M-.' on the "MAXIMA::$CHANGEVAR" > > to go to the definition of changevar, and when I'm not using Sly I can > > use the "/home/edrx/bigsrc/maxima/src/outmis.lisp" to go to the file > > in which changevar is defined - so all good there. But the output of > > ":lisp (describe '$tex)" was just this: > > > > MAXIMA::$TEX > > [symbol] > > > > Symbol-plist: > > MFEXPR* -> #<FUNCTION (LAMBDA (L) :IN "/ho.. > > > > Is "tex" a different kind of function? Where can I read more about > > that? What is the right way to inspect it? > > > > Thanks in advance! > > Eduardo Ochs > > http://angg.twu.net/eev-maxima.html > > > > > > _______________________________________________ > > Maxima-discuss mailing list > > Max...@li... > > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > > > _______________________________________________ > Maxima-discuss mailing list > Max...@li... > https://lists.sourceforge.net/lists/listinfo/maxima-discuss > |