lehrkraefte:blc:math:maxima-cheatsheet

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
lehrkraefte:blc:math:maxima-cheatsheet [2019/04/28 17:46]
Ivo Blöchliger created
lehrkraefte:blc:math:maxima-cheatsheet [2024/05/03 09:06] (current)
Ivo Blöchliger [Using results of solve for further computations]
Line 20: Line 20:
 (%o11)        [x = ---------------------------------------------] (%o11)        [x = ---------------------------------------------]
                                       log(2)                                       log(2)
 +
 +</code>
 +Und sonst halt mit ''find_root (expr, x, a, b)''
 +===== Output stuff like Maxima Input =====
 +<code txt>
 +(%i14) x^2/3;
 +                                       2
 +                                      x
 +(%o14)                                --
 +                                      3
 +(%i15) string(%);
 +(%o15)                               x^2/3
 </code> </code>
  
 +===== Derivative as a new function (force evaluating the differentiation) =====
 +<code txt>
 +f(x):=a*2^((x-2)/10)+2;
 +define(ff(x), diff(f(x),x));
 +</code>
 +
 +===== Using results of solve for further computations =====
 +<code txt>
 +sol:solve(x^2-x-1=0,x);
 +x^2-x, sol[2];
 +expand(%);
 +val:x,sol[2];
 +/* Usable inside an expresseion: */
 +subst(sol[2],x);
 +</code>
 +Or even better:
 +<code text>
 +rhs(sol[2]);
 +map(rhs, sol);
 +</code>
 +===== Nummerically solve equations =====
 +[[https://maxima.sourceforge.io/docs/manual/maxima_116.html|Maxima doc]]
 +<code txt>
 +find_root(sin(2*x)=x,x,0.5,2);
 +</code>
 +
 +===== Vector operations =====
 +<code maxima>
 +load("vect");
 +cross(u,v):=express(u ~ v);
 +norm(a):=sqrt(a.a);
 +area(a,b,c):=1/2*norm(cross(b-a,c-a));
 +vec2eq(eq):=makelist(rhs(eq)[i]=lhs(eq)[i], i, 1, length(rhs(eq)));
 +</code>
 +
 +===== Binomial Distribution =====
 +<code maxima>
 +load("distrib");
 +pdf_binomial (25,500,0.03);   
 +cdf_binomial (25,500,0.03);
 +</code>
  
  • lehrkraefte/blc/math/maxima-cheatsheet.1556466372.txt.gz
  • Last modified: 2019/04/28 17:46
  • by Ivo Blöchliger