~~stoggle_buttons~~
====== sagemath ======
===== Jupyter =====
$ jupyter notebook --generate-config # genera la configuración. Descomentar a mano:
c.NotebookApp.enable_mathjax = True
show(expr) para mathjax
%display typeset # Activa por defecto mathjax
===== General =====
n(expr[, digits=15]) -> evaluación numérica
help(funcion), funcion? (lo abre aparte en jupyter)
x = var('x')
diff(y*cos(x), x, 2, y, 1)
f.diff(x), f.diff(y)
solve(expr, x) # Resuelve simbólicamente
solve([eq1, eq2], [x, y])
find_root(expr, x) # Resuelve numéricamente
expr.full_simplify()
integral(f, x, a, b) # Sólo en una variable
infinito = oo
===== Ecuaciones diferenciales =====
Bastante pijo con la definición de las variables y funciones:
t = var('t') # define a variable t
x = function('x')(t) # define x to be a function of that variable
DE = diff(x, t) + x - 1
desolve(DE, [x,t])
===== Maxima =====
%maxima maxima_expr
hay que poner assume antes de ejecutar ciertas funciones (no pregunta interactivamente)