maxima

How to display a fraction as a mixed number in maxima?

て烟熏妆下的殇ゞ 提交于 2021-02-19 03:00:31
问题 I'm giving a course where students are used to the mixed number notation. However, all the calculations that maxima does, use the more traditional notation of fractions. Is it possible to present 3/2 as 1 1/2 . I need this for the latex output only. (%i4) tex(3/2); $${{3}\over{2}}$$ (%o4) false So instead of this I would like to get: (%i4) tex(3/2); $$1 {{1}\over{2}}$$ (%o4) false Is this possible? 回答1: You can assign TeX properties via texput . Rational numbers are represented as ((RAT) mmm

How can I solve exponential equation in Maxima CAS

家住魔仙堡 提交于 2021-02-10 12:54:54
问题 I have function in Maxima CAS : f(t) := (2*exp(2*%i*%pi*t) - exp(4*%pi*t*%i))/4; here: t is a real number between 0 and 1 function should give a point on the boundary of main cardioid of Mandelbrot set How can I solve equation : eq1:c=f(t); (where c is a complex number) ? Solve doesn't work solve( eq1,t); result is empty list [] Result of this equation should give real number t ( internal angle or rotation number ) from complex point c EDIT: Thx to comment by @JosehDoggie I can draw initial

Analog of Maple “unapply” or Mathematica “Function” in Maxima

孤者浪人 提交于 2021-02-09 07:41:00
问题 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_] = Function[{x, y}, x*f[x, y]] Then we can apply this operators to any function with any 2 arguments In[2]:= X[g][z, t] Out[2]= z g[z, t] There is a similar construction in Maple X:=proc(f) option operator; local x,y; unapply(x*f(x,y),x,y) end; with the

maxima tex output to show brackets for sin and cos

久未见 提交于 2021-01-24 09:01:05
问题 I use maxima's tex output and would like to change the way it outputs sin(x). It currently does: tex(sin(x)); $$\sin x$$ But I would like to have brackets around the x, but not always; for instance, if i use this: sin(x/2) already has \left( and \right) tex(sin(x/2)); \begin{equation} \sin \left({{x}\over{2}}\right) \end{equation} is this possible, maybe with the texput function? 回答1: Well, if you are not adverse to putting in a little Lisp code: (%i1) :lisp (setf (get '%sin 'tex) nil) (%i1)

Maxima's log is inconsistent with Maxima's plog and with itself?

假装没事ソ 提交于 2020-08-26 13:44:40
问题 What is the error with my thinking? Sometimes imagpart(log(-%i)) is negative: (%i1641) imagpart(log(-%i)); %pi (%o1641) - --- 2 But this shows the imaginary part of log ranging from 0 to 2*pi: wxplot2d(imagpart(log(-1/exp(%i*2*%pi*x))), [x, -1, +1]); image here. Are the results of Maxima's log() predictable without studying the source code, and if so, how? Edited to document additional bizarre Maxima behavior. Compare the ranges between these two: wxplot2d(imagpart(log(+exp(%i*2*%pi*x))), [x,

Maxima's log is inconsistent with Maxima's plog and with itself?

只谈情不闲聊 提交于 2020-08-26 13:44:26
问题 What is the error with my thinking? Sometimes imagpart(log(-%i)) is negative: (%i1641) imagpart(log(-%i)); %pi (%o1641) - --- 2 But this shows the imaginary part of log ranging from 0 to 2*pi: wxplot2d(imagpart(log(-1/exp(%i*2*%pi*x))), [x, -1, +1]); image here. Are the results of Maxima's log() predictable without studying the source code, and if so, how? Edited to document additional bizarre Maxima behavior. Compare the ranges between these two: wxplot2d(imagpart(log(+exp(%i*2*%pi*x))), [x,

maxima command line v5.43 is behaving differently than v5.41

雨燕双飞 提交于 2020-06-17 02:14:28
问题 I recently upgraded maxima from 5.41.0 to 5.43.2 and it broke my code. I could not find a solution that works in both versions the same way. Here is the simplified command line example I am executing: In version 5.41.0: user@system:~> maxima -version Maxima 5.41.0 user@system:~> maxima --very-quiet -r 'display2d: false$ leftjust: true$ ratprint: false$ dispflag: false$ is(equal((a+b)**2 = (a**2 + b**2 + 2*a*b), (a+b)*(a+b) = (a**2 + b**2 + 2*a*b))); ttyoff:true$ quit()$' true user@system:~>

windows下配置emacs和imaxima

佐手、 提交于 2020-03-01 00:20:18
在windows下配置emacs和imaxima很麻烦,折腾了2天多,做一下记录吧。 首先下载maxima,从SourceForge下载安装程序安装。 下载安装Emacs,可以从官网下载,但官网下载的windows版本Emacs默认不支持图片,要想处理图片需要自己编译,这个可以网上查,这里就不说了。最简单的是从 这里http://vgoulet.act.ulaval.ca/en/emacs/windows/ 下载重新编译过的Emacs。之后安装就好。 在Emacs的配置文件.emacs中将 “%maxima安装路径%\share\maxima\5.31.2\emacs”添加进Emacs的路径:(push "%maxima安装路径%\\share\\maxima\\5.31.2\\emacs\\" load-path),在再.emacs中添加: (autoload 'maxima-mode "maxima" "Maxima mode" t) (autoload 'imaxima "imaxima" "Frontend for maxima with Image support" t) (autoload 'maxima "maxima" "Maxima interaction" t) (autoload 'imath "imath" "Imath mode for math

maxima: use function as function argument

做~自己de王妃 提交于 2020-02-04 02:52:07
问题 Like the title says, I want to use a function as a function argument. Intuitive I tried something like: a(t,c) := t+c; b(R_11, R_12, R_13, d_1x, d_1y, d_1z) := R_11*d_1x + R_12*d_1y + R_13*d_1z; f( a(t,c), b(R_11, R_12, R_13, d_1x, d_1y, d_1z), %lambda ) := a(t,c) + %lambda * b(R_11, R_12, R_13, d_1x, d_1y, d_1z); But Maxima stated "define: in definition of f, found bad argument" My goal is to simplify my equations to get a better overview. When I differentiate like diff( f(...), R_11 ) the