/* [wxMaxima batch file version 1] [ DO NOT EDIT BY HAND! ]*/ /* [ Created with wxMaxima version 0.8.4 ] */ /* [wxMaxima: section start ] Introduction to Maxima [wxMaxima: section end ] */ /* [wxMaxima: comment start ] This is the tutorial wxMaxima notebook for the 'Introductory Computer Algebra' module of the Department of Mathematical Sciences of Durham University. Please consult http://maths.dur.ac.uk/users/kasper.peeters/intro_computer_algebra.html for more details and versions for other computer algebra systems. [wxMaxima: comment end ] */ /* [wxMaxima: subsect start ] Computing with Numbers [wxMaxima: subsect end ] */ /* [wxMaxima: input start ] */ 2^4+3*7; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ 1/3!+1/5; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ sin(%pi/4); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ yy: (125*24)/(74*15); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ yy; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ float(exp(1)); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ fpprec: 30; bfloat(exp(1)); /* [wxMaxima: input end ] */ /* [wxMaxima: subsect start ] Symbolic Computation [wxMaxima: subsect end ] */ /* [wxMaxima: input start ] */ z: (x+a)*(x-a)+yy; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ expand(z); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ f(x) := x^3*exp(x); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ 42+f(x^2); /* [wxMaxima: input end ] */ /* [wxMaxima: subsect start ] Plotting [wxMaxima: subsect end ] */ /* [wxMaxima: input start ] */ wxplot2d(sin(x), [x,0,3]); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ wxplot2d(x*exp(x), [x,-2,2], [color,red]); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ wxplot2d([f(x),f(-x),abs(f(x))], [x,-1,1]); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ wxplot3d(sin(x+2*y),[x,-3,3],[y,-3,3]); /* [wxMaxima: input end ] */ /* [wxMaxima: subsect start ] Calculus [wxMaxima: subsect end ] */ /* [wxMaxima: input start ] */ diff(sin(x)*cos(x),x); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ diff(sin(2*x),x,3); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ integrate(1/x,x); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ integrate(log(x), x, 0, 10); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ integrate(exp(-3*x), x, 0, inf); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ integrate(exp(-x^2),x,-inf,inf); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ bfloat(%); /* [wxMaxima: input end ] */ /* [wxMaxima: subsect start ] Linear Algebra [wxMaxima: subsect end ] */ /* [wxMaxima: input start ] */ u: matrix([1], [2], [3]) ; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ v: matrix([3],[5],[7]); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ u.v; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ A: matrix( [1,0,0], [0,2,0], [-1,0,3]); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ A.u; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ load("vect"); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ [1,2,3]~[3,5,7]; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ express(%); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ u ~ v; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ express(%); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ %.v; /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ invert(A); /* [wxMaxima: input end ] */ /* [wxMaxima: input start ] */ %.A; /* [wxMaxima: input end ] */ /* Maxima can't load/batch files which end with a comment! */ "Created with wxMaxima"\$