Questions tagged [maxima]

Maxima is an opensource Computer Algebra System based on the legendary Macsyma. NOTE: This tag has NOTHING to do with 'finding the maxima' - for that, please use [max].

Maxima is an opensource Computer Algebra System based on the legendary Macsyma.

Maxima can manipulate a wide range of symbolic and numerical expressions. The system handles differentiation, integration, Taylor series, Laplace transforms, ordinary differential equations, systems of linear equations, polynomials, and sets, lists, vectors, matrices, and tensors.

Maxima yields high precision numeric results by using exact fractions, arbitrary precision integers, and variable precision floating point numbers. Maxima can plot functions and data in two and three dimensions.

More details:

841 questions
3
votes
1 answer

rationalize number with limit denominator

I know that Maxima CAS can rationalize floating point number ( convert to ratio): (%i215) rat(0.1667); (%o215) 1667/10000 Is it possible to rationalize floating point number with limit denominator like in python ? I would like to set limit…
Adam
  • 1,254
  • 12
  • 25
3
votes
1 answer

How do i use a loop in maxima to plot multiple vectors?

I am trying to plot some vectors of the form [x,-y] for any point (x,y) so I tried this: for i:1 while i<=21 do (for j:1 while j<=21 do (draw2d( xrange=[0,50], yrange=[0,50], vector([i,j],[i,-j]) ) …
Arcadio
  • 33
  • 4
3
votes
1 answer

Argument in fuction call inside function definition is not being replaced in Maxima

The problem Consider the following script written in Maxima $ cat main.max foo(a) ::= block( if a = 0 then return(0) else return(1) )$ bar(a) ::= block( return(foo(a)) )$ foo(0); bar(0); Executing this script yields to $ cat main.max |…
gfe
  • 157
  • 5
3
votes
1 answer

Maxima: replace function f(x) by its definition?

I cannot find anything about this, sorry. If I have expressions with the symbolic function f(x) and now I want to replace in these expression f(x) by its explicit form how to do it? For example: I have f(x):= x^2+sin(x) and in the…
Karl
  • 263
  • 3
  • 10
3
votes
1 answer

Why does Maxima give me an error on plot2d when trying to draw a parametric graph?

I am trying to draw a parametric graph in Maxima. The code I enter is this: wxplot2d([parametric, t^2/(t-1), t/(t^2-1), [t, 0, 2*%pi], [nticks, 300]]); But I get the following error: plot2d: parametric plots must include two expressions and an…
Sophia
  • 73
  • 6
3
votes
1 answer

Comparisons (for example <) in Maxima's ezunits are a lot slower in Maxima 5.42.0 than 5.41.0

For me the runtime of this comparison: 1`g < 2`g seems to be a lot slower in Maxima 5.42.0 (and 5.42.2, 5.43.0, and 5.43.2) than in 5.41.0. (Note that the first run is always slower.) Was there a change between 5.41.0 and 5.42.0 that could cause…
MOUSHerN
  • 33
  • 4
3
votes
1 answer

How to output equation without evaluation, but with variables replaced to their values?

I need to make tons of simple computations and present each step in my report with predefined manner: (for ex i got B=2, C=3): A=B+12-6/C^2; A=2+12-6/3^2=13.333; I can get 1st block and answer like this: B:2$ C:3$ A:'(B+12-6/C^2)$ print("A=",A,";…
NinaO
  • 43
  • 2
3
votes
2 answers

Maxima plot with dashed line

How can we plot in maxima with different line styles (for example dash, dash-dot, etc. and not just change the color of the lines). Minimal working example: f(x) := sin(x) $ g(x) := cos(x) $ plot2d( [f(x), g(x)], [x,0,10], [style, [lines,…
ASarkar
  • 469
  • 5
  • 16
3
votes
1 answer

Change standard tex output of multiplication in maxima

We try to change the way maxima translates multiplication when converting to tex. By default maxima gives a space: \, We changed this to our own latex macro that looks like a space, but in that way we conserve the sementical meaning which makes it…
Kasper
  • 12,594
  • 12
  • 41
  • 63
3
votes
1 answer

Analog of Maple "unapply" or Mathematica "Function" in Maxima

In Wolfram Mathematica we can define an operator acting on a function (i.e. function that returns function) e.g. as for the operator of multiplication by the first argument acting on a functions of two arguments in the example below X[f_] =…
3
votes
0 answers

How to avoid the error thrown by the maxima function polynomialp?

Look at the following two sequences of two commands. They are the same up to the choice of variable a or z, but the version with a produces an error whereas the function with z does not. First run (after a restart of maxima): declare(a,constant);…
3
votes
1 answer

Does the Maxima language have a map/dictionary data structure and if it does, how is one initiated and how are its values and keys accessed?

SourceForge is currently down, so I can't access Maxima's documentation and came here with this question. I'm building a question in Moodle that would benefit from this container type. I've tried optionmap : {"key1" : value1, "key2" :…
sesodesa
  • 1,473
  • 2
  • 15
  • 24
3
votes
1 answer

Simplification of expressions involving abstract derivatives in maxima

I'm trying to get maxima to perform some "abstract" Taylor series expansions, and I'm running into a simplification issue. A prototype of the problem might be the finite-difference analog of the gradient, g(x1,dx1) := (f(x1+dx1) - f(x1))/dx1; /*…
tholy
  • 11,882
  • 1
  • 29
  • 42
3
votes
1 answer

Maxima can't solve lineare equation with sum

I'm trying to calculate the equation for linear regression with maxima but maxima can't solve the linear system: Maxima 5.38.1 http://maxima.sourceforge.net using Lisp GNU Common Lisp (GCL) GCL 2.6.12 Distributed under the GNU Public License. See…
Thomas Sablik
  • 16,127
  • 7
  • 34
  • 62
3
votes
2 answers

How to draw graph of Gauss function?

Gauss function has an infinite number of jump discontinuities at x = 1/n, for positive integers. I want to draw diagram of Gauss function. Using Maxima cas I can draw it with simple command : f(x):= 1/x - floor(1/x); …
Adam
  • 1,254
  • 12
  • 25