Using maxima for high school mathematics



On Sun, Apr 03, 2011 at 07:02:36PM +0100, Leo Butler wrote:
> <     Daniel> 1) Is it possible with maxima to find the local minimums/maximums of a
> <     Daniel> graph, along with the absolute/global minimum and maximum? I'm using the
> <     Daniel> command line interface...
> < 
> < If you have a symbolic expression, can't you compute the derivative
> < and use a numerical method to find the zeroes?  You can try solve or
> < mnewton or minpack_solve to find the zeroes.

We haven't covered this in our course yet. I was hoping their was a
function available like to the other students just to return the
points... I'll run this by my teacher anyway.

> <     Daniel> 2) When graphing with maxima, what is the best way to choose a suitable
> <     Daniel> x range for the plot2d argument? Is it possible to mark the major points
> <     Daniel> of my graphs (tp, min/max, end points, intercepts intersections etc.?)
> <     Daniel> Is there anyway to permanently set some variables like gnuplot_term so I
> <     Daniel> don't have to type so many arguments for the plot2d command? 
> < 
> < Look at set_plot_option.  You can set things like gnuplot_term there.

That sounds like what I was looking for, thanks.

> <     Daniel> 3) Suppose I have 5 (x,y) coordinates. On the standard casio devices at
> <     Daniel> school these points can be punched in and the user may trial a linear,
> <     Daniel> quadratic or cubic equation to see which is the best fit for the
> <     Daniel> points. The calculator provides a number of how successful the equation
> 
> Btw, a cubic always fits at least as good as a quadratic which fits in
> turn at least as good as a linear model. If your calculator tells you a
> linear model fits better than a cubic one, this is because it is using
> some measuring stick other than goodness-of-fit. 

So for examination purposes there is no point trying any other fit than
a cubic?

> <     Daniel> was eg. linear, quadratic or cubic. Is it possible to find the equation
> <     Daniel> for a set of points with maxima? 
> < 
> < Sure, but it looks like there's nothing completely builtin.  You can
> < do a least-squares fit using lbfgs or minpack_lsquares to produce the
> < equation.  But you'll have to set up the equations appropriately
> < before calling these routines.
> 
> Here is a function that does the job, using the lsquares package.
> 
> (%i2) load(lsquares);
> 
> (%o2)
> "/home/work/maxima/sandbox/git/maxima-git/share/contrib/lsquares.mac"
> 
<snip>

Thanks very much, when I get home I'll play with this...:)

I suppose your defining the function here? Is there any way to put this
into a file or something so it doesn't need to be done each time?
Anyway, I'll have a go at it when I get home this afternoon.

Thanks very much for your help,

Dan