e-Mathematics > Guide for Developers

Maxima extension

QUESTION. Find the equation for the parabola shown below.

Image qgmax_plot0

In this example we expect students to know that the two $x$-intercepts $x_0$ and $x_1$ formulates the quadratic equation $y = a(x-x_0)(x-x_1)$, and then identify $a$ from any third point $(x,y)$ (for which a pair of integers is a good choice if possible). Here we will create any number of different problems by changing the values $a$, $x_0$ and $x_1$.

Maxima is open source computer algebra system and freely available at maxima.sourceforge.net. It manipulates mathematical formulas symbolically and displays mathematical functions graphically, and is quite useful when problems at precalculus and calculus level are discussed. The following example of Maxima-embedded LATEX document can be placed between \begin{document} and \end{document}.

\maximacode
  a: 1;
  x0: 1;
  x1: 4;
\endmaximacode

\maximaplot [a*(x-x0)*(x-x1),x0-1,x1+1] \endmaximaplot

The figure shows the following equation for the parabola

\maxima expand(a*(x-x0)*(x-x1)) \endmaxima

Maxima code, a set of maxima expressions, is placed between \maximacode and \endmaximacode. In a similar manner a single maxima expression is placed between \maxima and \endmaxima. While the maxima code in the first control sequence has no output, the maxima expression in the second one is replaced by the math mode $ output $ and the TEX-mathmode output will be inserted.

\maximacode
maxima code;
.........
maxima code;
\endmaximacode

\maxima maxima expression \endmaxima

Plotting is controlled by \maximaplot and \endmaximaplot. The maxima expressions in this control sequence is first evaluated by Maxima, and passed onto gnuplot.

\maximaplot

[f(x), x-axis lower limit, x-axis upper limit]

\endmaximaplot

The comma-separated values “f(x)”, “x-axis lower limit”, and “x-axis upper limit” are Maxima expression, not allowed to contain commas (“,”) themselves. Other form of control sequence may be chosen from one of the following:

[f(x), x-axis lower limit, x-axis upper limit, y-axis lower limit, y-axis upper limit]

[parametric, lower end of t, upper end of t, f(t) in x-axis, g(t) in y-axis, .....]

[parametric, lower end of t, upper end of t, xrange, x-axis lower limit, x-axis upper limit, f(t) in x-axis, g(t) in y-axis, .....]

[parametric, lower end of t, upper end of t, xrange, x-axis lower limit, x-axis upper limit, yrange, y-axis lower limit, y-axis upper limit, f(t) in x-axis, g(t) in y-axis, .....]


© TTU Mathematics