maxima

How to make the output of Maxima cleaner?

a 夏天 提交于 2019-12-04 08:59:49
I want to make use of Maxima as the backend to solve some computations used in my LaTeX input file. I did the following steps. Step 1 Download and install Maxima. Step 2 Create a batch file named cas.bat (for example) as follows. rem cas.bat echo off set PATH=%PATH%;"C:\Program Files (x86)\Maxima-5.31.2\bin" maxima --very-quiet -r %1 > solution.tex Save the batch in the same directory in which your input file below exists. It is just for the sake of simplicity. Step 3 Create the input file named main.tex (for example) as follows. % main.tex \documentclass[preview,border=12pt,12pt]{standalone}

Maxima: how to replace common subexpressions with symbols

风流意气都作罢 提交于 2019-12-03 08:03:52
Suppose I have an expression like (actually mine is much more complex, thousands of characters) expr:a+b*c+b*c*d; and I want to replace an internal sub-expression with a symbol (useful to avoid recomputation of common subexpressions), say k in place of b*c : subst(b*c=k,expr); returns k+b*c*d+a How I can make Maxima calculate the "right" substitution so to return (apart from obviuos simplification, here) k+k*d+a ? Take a look at let and letsimp . E.g.: (%i2) expr : a + b*c + b*c*d; (%o2) b*c*d+b*c+a (%i3) let (b*c, k); (%o3) b*c --> k (%i4) letsimp (expr); (%o4) d*k+k+a letsimp differs from