Yes, but as soon as you 'touch' it again, it will be simplified.
Why exactly do you want this? Is it to confirm that you entered the
expression correctly? Then maybe something like the following would be
useful?
(%i2) inputprint(n):= block([simp:false], apply('display,[concat('%i,n)]))$
(%i3) x/x;
(%o3) 1
(%i4) x/4*1/(x+1);
(%o4) x/(4*(x+1))
(%i5) inputprint(3)$
%i3 = x/x
(%i6) inputprint(4);
%i4 = x/4*1/(x+1)
It looks as though the playback function could have an option to print the
input (not just output) expressions in 2d. Would that solve your problem?
-s
On Mon, Oct 24, 2011 at 14:09, Ether Jones <maxima at etherjones.us> wrote:
>
> Thanks for the suggestion Stavros. Bracketing the expression with
> simp:false and simp:true seems to give what I want:
>
> simp:false$
> ex1: (W/4)*(1/());
> simp:true$
> ex1;
>
> See attached PNG screenshot for output.
>
>
> ------------------------------
> *From:* Stavros Macrakis <macrakis at alum.mit.edu>
> *To:* Ether Jones <maxima at etherjones.us>
> *Cc:* maxima <maxima at math.utexas.edu>
> *Sent:* Monday, October 24, 2011 10:49 AM
> *Subject:* Re: [Maxima] display expression exactly as entered
>
> You can disable Maxima's default transformations a.k.a. general
> simplification, by setting simp:false.
>
> However, this breaks most of Maxima's functionality. For example:
>
> (%i4) simp:false;
> (%o4) false
> (%i5) (W/4)*(1/(1+x));
> (%o5) W/4*(1/(1+x))
> (%i6) diff(%,x);
> (%o6) 'diff(1/(1+x),x,1)*(W/4)+0*(1/(1+x))
>
> In this case, 0*(1/(1+x)) is not simplified to 0, diff(1/(1+x),x,1) is not
> performed. This second case may seem mysterious until you understand that
> Maxima normally does not use a division operator internally, but transforms
> it to multiplication and exponentiation -- (a/b) internally is actually a *
> b^-1, as you can see in the Lisp representation:
>
> (%i7) ?print(a/b)$
> ((MQUOTIENT) $A $B)
> (%i8) simp:true$
> (%i9) ?print(a/b)$
> ((MTIMES SIMP) $A ((MEXPT SIMP) $B -1))
>
> You can also block default simplifications by using the "box" function (and
> set boxchar:" " if you want the boxes to be invisible).
>
> But this doesn't guarantee to preserve order:
>
> (%i3) box(W/4)*box(1/(1+x));
> (%o3) box(1/(x+1))*box(W/4)
>
> And Maxima functions treat boxes as unknown functions:
>
> (%i4) diff(%,x);
> (%o4) 'diff(box(1/(x+1)),x,1)*box(W/4)
>
> Why exactly do you want to preserve your input form? Is it because you
> find it more intuitive when you're manipulating the expression? Because you
> want to present this form as part of your output? Because you want to do
> transformations which depend on the form of the expression?
>
> In the last case, you might want to look at ratsubst rather than subst:
>
> (%i5) expr: (W/4)*(1/(1+x));
> (%o5) W/(4*(x+1))
> (%i6) subst(q,W/4,%);
> (%o6) W/(4*(x+1)) <<< W/4 is not syntactically
> present in expr
> (%i7) ratsubst(q,W/4,%);
> (%o7) q/(x+1) <<< but ratsubst recognizes it
>
> Does that help?
>
> -s
>
>
> On Mon, Oct 24, 2011 at 10:01, Ether Jones <maxima at etherjones.us> wrote:
>
> Hello,
>
> Is there a way to force maxima to display an expression exactly as I have
> entered it, rather than "simplifying" it for me?
>
> For example, when I enter (W/4)*(1/(1+x)) it displays as W/(4*(x+1))
>
> Please see attached WXM file or the PNG screenshot.
>
> Thank you.
>
>
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>
>
>
>
>