2

I'm wondering if there is any way to tell Maxima to return

1/2*x

instead of

x/2

I'm trying to handle u-substitutions using changevar however, it's returning expressions like:

\frac{\int \cos{u} \de{u}}{5}

whereas I'd like to have it display as

\frac{1}{5} \int \cos(u) \de{u}

or

\int \cos(u) \frac{1}{5} \de{u}

Is this possible? If so, any suggestions as to where to start?

Robert Dodier
  • 16,905
  • 2
  • 31
  • 48
Rax Adaam
  • 790
  • 3
  • 11

1 Answers1

2

I think the display option pfeformat has the effect you want. By default it's false. Here's what I get when it is enabled:

(%i2) pfeformat: true $

(%i3) 'integrate(cos(u),u)/5;
                              /
                              [
(%o3)                   (1/5) I cos(u) du
                              ]
                              /
(%i4) tex(%);
$${{1}\over{5}}\,\int {\cos u}{\;du}$$

The internal form of the expression is the same -- you can call ?print to see what it is -- and pfeformat just changes the way it's displayed.

Robert Dodier
  • 16,905
  • 2
  • 31
  • 48
  • Thanks Robert! I'll give this a try -- looks like exactly what I was hoping to find :) Thanks for always taking the time to help! – Rax Adaam Dec 24 '20 at 15:47