Brackets: () ‐ Normal Brackets {} ‐ To contain elements of a set (unique, order not conserved) [] ‐ To contain elements of a list (not unique, order conserved) <> ‐ For entering vectors and matrices Value assignment: a:=b ‐ Assign ‘b’ to ‘a’ a:=‘a’ ‐ Unassign ‘a’ Expressions [y=] and Functions [f(x)=]: y:=x^2‐x ‐ Expression f:=x‐>x^2‐x ‐ Function f(3) ‐ Possible for functions Functions: abs(x) ‐ Absolute value (Or modulus for complex numbers) sqrt(x) ‐ Square root exp(x) ‐ Exponential log(x) ‐ Natural Log sin(x) ‐ Sine arcsin(x) ‐ Inverse sine ifactor(x) ‐ Factor into primes (only integers) igcd(x,y) ‐ Greatest common divisor ilcm(x,y) ‐ Least common Multiple max(x,y,z) ‐ Maximum of a sequence min(x,y,z) ‐ Minimum of a sequence binomial(x,y)‐ Binomial coefficient where x is the row and y is the column in Pascals triangle subs(expression1=expression2,expression3) ‐ Substitute expression2 for all instances of expression1 in expression3 f:=piecewise(condition1,expression1,condition2,expression2,lastexpression) ‐ For functions with multiple parts. See Page 3 for better explanation factor(x^2‐1)‐ Factors polynomials normal(1/(x‐1)‐1/(x+1)) ‐ Attempts to cancel common factors to get a common denominator (polynomials) simplify(x) ‐ Tries to simplify as much as possible combine(x+y) ‐ Combines functions as much as possible convert(x,y) ‐ Converts x into terms of y limit(expression, variable=value, <Optional left/right parameter>) ‐ Find the limit of expression as variable approaches value. (Can ask for left or right limit) diff(expression, variable$x) ‐ Differentiate expression with respect to variable, x amount of times. D[1$x](function) ‐ Differentiate function, x amount of times. implicitdiff(equation,variable1,variable2) ‐ Implicitly differentiate against variable1 and variable2 maximize(expression,variable=a..b) ‐ Find maximum of expression for variable between a and b (If second part not given then global maximum is found) minimize(expression,variable=a..b) ‐ Similar to maximise except for minimum int(expression,variable) ‐ Integrate with respect to variable (Indefinite integral) int(expression,variable=a..b) ‐ Integrate with respect to variable between a and b (Definite integral) evalf(expression) ‐ Evaluates the expression giving decimals seq(f,i=m..n) ‐ Generate a sequence for expression ‘f’ for variable ‘i’ = ‘m’ to ‘n’ Packages: Extra packages/commands loaded by using: with(<package name>); evalc(expression) ‐ Evaluate complex numbers Re(expression) ‐ Get real part Im(expression) ‐ Get imaginary part argument(expression) ‐ Get argument of complex number abs(expression) ‐ Get modulus of complex number conjugate(expression) ‐ Get complex conjugate lhs(equation) ‐ Get left hand side of equation rhs(equation) ‐ Get right hand side of equation solve(expression,variable) ‐ Obtains exact solution. Variable is optional if obvious. map(function,set/list) ‐ Applies function to all elements in set or list fsolve(equation,variable,a..b) ‐ Get approximate solution to equation for values between a and b plot(expression, variable=min..max, rangemin..rangemax, <discont=true>) ‐ Plots expression between min and max within rangemin and rangemax. Min/max nad range are optional. Use discont=true only if expression is not continuous. plot([function1(t),function2(t), t=a..b]) ‐ Plot two parametric functions of t for t between a and b plot([[x 1 ,y 1 ],[x 2 ,y 2 ],[x 3 ,y 3 ],[x 4 ,y 4 ]],style=point) ‐ Plots points. (Points given as a list of lists) with(plots) ‐ Load plots package (for polarplot and implicit plot functions) polarplot(f(theta), theta=a..b) ‐ Polar plot function of theta between a and b implicitplot(expression,variable1=a..b,variable2=c..d, <scaling=constrained>) ‐ Implicitly plot expression for variable1 between a and b and for variable2 between c and d. Optional scaling parameter. Option: scaling = constrained – Forces both axis to use same scale. v1:=<a,b,c> ‐ Creates a column vector (commas used to separate values) v2:=<a|b|c> ‐ Creates a row vector (pipe “|” used to separate values) M1:=<v1|v1> ‐ Creates a matrix with 2 columns, 3 rows. v1[n] ‐ Extracts the n’th value from v1. N can also be a list of numbers E.g. [3..6,8,1] M1[r,c] ‐ Extracts the value in the r’th row and c’th column. Use negative values to count from the bottom/right with(LinearAlgebra) ‐ Loads LinearAlgebra package (for all functions after this) SubMatrix(M,r 1 ..r 2 ,c 1 ..c 2 ) ‐ Gets the matrix between r 1 , r 2 , c 1 & c 2 from matrix M. Row(M,a) ‐ Extracts the a’th row from matrix M. Column(M,b) ‐ Extracts the b’th column from matrix M. IdentityMatrix(n) ‐ Create an identity Matrix n by n size. DiagonalMatrix([a,b,c]) ‐ Create a diagonal matrix of correct size with a,b,c etc down the diagonal. <A|b> ‐ Augment Matrix A by Vector b to give (A|b) RowOperation(A,[r1,r2]) ‐ Swap rows r1 and r2 in A RowOperation(A,r,m) ‐ Multiply row r of A by the value of m RowOperation(A,[r1,r2],m) ‐ Add m times row r2 to r1 in A, so new r1 = old r1 + r2*m (Note Order) GaussianElimination(A) ‐ Gives the row‐echelon form of A Piecewise: ReducedRowEchelonForm(A) ‐ Gives the fully‐reduced form of A BackwardSubstitute(W) ‐ Does backsubstitution on a Matrix W in echelon form, where W has been derived from an augmented Matrix (A|b) LinearSolve(A,b) ‐ Solves Ax=b