Try (%i1) f(x,y) := ''(ratdisrep(taylor(('x+'y)^3, ['x, 'y], [2, 3], 2))) $ (%i2) f(2, 3); (%o2) 125 or (%i1) define(f(x, y), ratdisrep(taylor(('x+'y)^3, ['x, 'y], [2, 3], 2)))$ (%i2) f(2, 3); (%o2) 125 ...

is(equal(e1, e2)). Note that "=" is identity (i.e. same expression), while "equal" is equivalence. E.g. is(equal(x*(x + 1), x^2 + x)) => true while is(x*(x + 1) = x^2 + x) => false. Note also that is(equal(e1, e2)) actually computes ratsimp(e1 - e2) and looks to see if the result...

Maxima's concept of arrays, lists, and matrices is pretty confused, since various ideas have accreted in the many years of the project. Maxima's "subscripted variable" = symbol with subscript (with arbitrary index) and no assigned value. E.g. a[sqrt(2)] with no value assigned. Maxima's "undeclared array" = hash table with arbitrary...

There are a few options in Sage with solve, and this one seems to help (I assume the answer is okay). sage: solve(sqrt(x)==sqrt(20*(1500-x)),x,to_poly_solve=True) [x == (10000/7)] ...

When n is a literal integer (e.g. 2, 3, 5, etc) then chebyshev_t evaluates to a polynomial. When n is a symbol declared an integer (via declare(n, integer) then chebyshev_t evaluates to a summation. (%i1) display2d : false $ (%i2) chebyshev_t (5, u); (%o2) -25*(1-u)-16*(1-u)^5+80*(1-u)^4-140*(1-u)^3+100*(1-u)^2+1 (%i3) declare (m, integer); (%o3)...

matlab,math,wolfram-mathematica,maxima,wxmathplot

For Maxima, try implicit_plot(f1(x, y) = f2(x, y), [x, <x0>, <x1>], [y, <y0>, <y1>]) where <x0>, <x1>, <y0>, <y1> are some floating point numbers which are the range of the plot. Note that load(implicit_plot) is needed since implicit_plot is not loaded by default. As an aside, I see that your...

(%i1) display2d: false $ (%i2) indexX : [1,5,2] $ (%i3) indexY : [3,5,1] $ (%i4) map(lambda([[L]], arraymake('a, L)), indexX, indexY); (%o4) [a[1,3],a[5,5],a[2,1]] ...

I guess you are trying to capture the output of tex into a file. If so, here are a couple of other ways to do it: tex (expr, destination); where destination is either a file name (which is appended) or a stream, as created by opena or openw and closed...

Perhaps the function you need is elapsed_real_time. EDIT: you would use it like this: for i ... do block ([t0, t1], t0 : elapsed_real_time (), integrate (...), t1 : elapsed_real_time (), time[i] : t1 - t0); ...

You can set linel (%i7) makelist(42, i, 30); (%o7) [42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42, 42] (%i8) linel: 200; (%o8) 200 (%i9) makelist(42, i, 30); (%o9) [42,...

I think what you want is the :: operator, which evaluates its left-hand side and assigns to that. (%i1) M : [a, b, c] $ (%i2) M[1] :: 123 $ (%i3) a; (%o3) 123 ...

substitution,evaluation,maxima

I can see at least two ways to do it; we can probably find others as well. (%i1) omega (x, y, z) := x * y * z^2 $ (%i2) p : [2, 3, -1] $ (%i3) V : [1, 2, 3] $ (%i4) p2 : p + t *...

symbolic-math,maxima,computer-algebra-systems

I think ratsubst has the effect you want. (%i2) ratsubst(foo, x+y, x+y+z); (%o2) z + foo ...

I see that you have terminal = eps, therefore draw3d will create a .eps file and it won't display the image. I tried draw3d as you showed it, and it created maxima_out.eps in the current directory, and I can use a viewer (I used evince) to look at it, and...

You could make a list of curves in the loop and plot them all on a single graph. You can use a loop or makelist to build the curve list. makelist(x^d, d, 0, 1, 0.1); plot2d(%, [x, 0, 1]); If you're using wxMaxima, you can the with_slider_draw function to animate...

Take a look at simplify_sum which applies several kinds of identities, including Gosper's and Zeilberger's methods. (%i1) load (simplify_sum); (%o1) /usr/share/maxima/5.35.1/share/solve_rec/simplify_sum.mac (%i2) 'sum(k * x^k, k, 0, inf); inf ==== \ k (%o2) > k x / ==== k = 0 (%i3) simplify_sum (%); x (%o3) ------------ 2 x -...

Right. You'll use something like the following, with symmetric ranges for x and y. load(draw)$ draw2d( user_preamble="set zeroaxis linetype 5; set xtics axis; set ytics axis; set border 0;", explicit(sin(x),x,-%pi, %pi))$ ...

load(cartan); init_cartan([x,y]); omega:1/sqrt(x-y)*dx~dy; def_xy:[x=u^2+v^2,y=2*u*v]; phi:subst(def_xy,[x,y]); scalar:subst(def_xy,(diff(phi,u)|(diff(phi,v)|omega))); integrand:radcan(scalar); integrate(integrate(integrand,v,0,u),u,0,1); ...

limit,floating-accuracy,floating-point-precision,maxima

(1) use horner to rearrange the expression so that it can be evaluated more accurately. (%i1) display2d : false; (%o1) false (%i2) horner (x^5-6*x^4+14*x^3-20*x^2+24*x-16, x); (%o2) x*(x*(x*((x-6)*x+14)-20)+24)-16 (%i3) subst (x=1.999993580023622, %); (%o3) -1.77635683940025E-15 (2) use bigfloat (variable precision) arithmetic. (%i4) subst (x=1.999993580023622b0, x^5-6*x^4+14*x^3-20*x^2+24*x-16); (%o4) -1.332267629550188b-15 (%i5) fpprec : 50 $...

maxima,computer-algebra-systems

May be this is helpful, load("lrats"); lratsubst([x1*x2=z*(z+d),x1+x2=2*z+d], (2*z^3+(−3*x2−3*x1)*z^2+6*x1*x2*z)/6) (2*z^3+3*d*z^2)/6 Also if you want to test your identities, you could do z(x1,x2):=min(x1,x2)$ d(x1,x2):=abs(x1-x2)$ Now put numerical values say, z(2,3)*(z(2,3)+d(2,3))=6. Apparently these don't help in simplifying your expression....

In Maxima, a memoizing function is defined by f[x, y] := ..., that is, with square brackets instead of parentheses for the arguments. From what I can tell, this is a translation of the Clojure function: average (lst) := apply ("+", lst) / length (lst); sqsum (lst) := apply ("+",...

Not sure what you want to accomplish. Maybe append has the desired effect? (%i1) li : [[a, b, c], [[t, y, u]]] $ (%i2) apply (append, li); (%o2) [a, b, c, [t, y, u]] ...

Thanks to Fred Senese and rayryeng for the assist. I know someone may need this so here's some example code. This bit of code allows you to directly access maxima's symbolic solver from octave (allows you to execute multiple lines of maxima's commands). Since octave doesn't have a good symbolic...

In simple cases you can solve every branch everywhere and filter solutions: solve_and_filter(eq, var, p):= block([so: solve(eq, var), prederror: true], sublist(so, lambda([c], p(rhs(c))))) $ pw_solve(pw, var):= map(lambda([L], solve_and_filter(first(L), var, second(L))), pw) $ /* represent piecewise equation as a list of equation-predicate pairs [ [eq1, pred1], [eq2, pred2], ... ] */...

letsimp applies only to "*" expressions. You could try subst.

list,function,arguments,maxima

I don't know where the error about declare is coming from -- I don't find any calls to declare in pdiff.lisp. When I copy your second example, instead of an error, I get: 'diff(q(dst),dst,[1,2,3]) which is to be expected, I think. I guess you want to make a list with...