Sharedmaxima-in-sagews.sagewsOpen in CoCalc
Author: Samuel Lelièvre
Views : 2
Description: Maxima in CoCalc's sagews worksheets

Using Maxima in CoCalc's .sagews worksheets

This discussion is prompted by CoCalc issue no. 54, see https://github.com/sagemathinc/cocalc/issues/54

Use cell magic to set the worksheet to Maxima mode

The first thing to do is to use the %default_mode magic to set the whole worksheet to Maxima mode.

%default_mode maxima

We can now use Maxima syntax.

cos(%pi/6)
sqrt(3)/2
trigsimp(2c929-411b-4b17-b67c-bb794095328bs %e,numer
2.718281828459045
%md # Title

%hide

%e, line 1188, in execute\n flags=compile_flags) in namespace, locals\n File \"\", line 1, in <module>\n File \"/cocalc/lib/python2.7/site-packages/smc_sagews/sage_server.py\", line 1271, in execute_with_code_decorators\n code = code_decorator(code)\n File \"sage/symbolic/expression.pyx\", line 5447, in sage.symbolic.expression.Expression.__call__ (build/cythonized/sage/symbolic/expression.cpp:33873)\n return self._parent._call_element_(self, *args, **kwds)\n File \"sage/symbolic/ring.pyx\", line 977, in sage.symbolic.ring.SymbolicRing._call_element_ (build/cythonized/sage/symbolic/ring.cpp:11660)\n raise ValueError(\"the number of arguments must be less than or equal to %s\"%len(vars))\nValueError: the number of arguments must be less than or equal to 0\n"}
%pi, numer
%e, numr
%pi, numer /* notice the initial space in this cell */
3.1e1592653589793
%c3-44a9-40--b2sea-e855521bcf4935e