Mathematica
- space is seen as $\times$
approximation
exact result by default, to get approximation
- add a dot at the end
…. - use
N[]
complex number
imaginary unit I
variable assignment
- unassigned variable treated as symbol
- assigned variable work like in other language
- clear variable
Clear[]
data structure
list `
- getter
list1[[index1]] - slicing
list1[[start1;;end1]] - show as list
FullForm[]
vector
vector are represented as list
- dot
.orDot[,] - cross
esc+cross+escorCross[,]
matrix
a list of list
- show as matrix
MatrixForm[]
hide output ;
force simplify Simplify[]
math function
define f[var1_]:=…
calculate f[…]
integration
- indefinite
Integrate[fun1[var1],var1] - definite
Integrate[fun1[var1],{var1,start1,end1}] - numerical
NIntegrate
equation
polynomial
SolveValue[] gives precise solution NSolveValue[] gives approximate solution
non-polynomial
FindRoot[] uses Newton’s Method
plot
search help