Using maxima for high school mathematics




On Mon, 11 Apr 2011, Daniel Dalton wrote:

< On Mon, Apr 04, 2011 at 08:50:25AM +0100, Rupert Swarbrick wrote:
< 
< > > 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.
< > >
< > 
< > Unless the calculators the other students are using do this by working
< > out a derivative "behind-the-scenes", what they probably do is the
< > following: Take an evenly spaced list of numbers across the interval in
< > which you're interested and evaluate the function at each of them. Then
< > you have an idea of where it's largest. If you want more precision, you
< > can then choose points closer together near where you think the
< > minima/maxima are. Obviously this gets done magically behind the scenes,
< > but it basically works in the same way as drawing a graph and finding
< > the minima/maxima by eye.
< 
< So if I were to use differentiation would I obtain the same accuracy?
< This is how I did it:
< f(x):=my function;
< 
< float(solve(diff(f(x),x)));
< float(f(%));
< 
< The answer was supposed to be in decimal btw.


You should be able to do all the calculations symbolically, then
convert the final answer to floating point. It is easier to check
intermediate steps if you do this.

I think, also, when you do

eqn : diff(f(x),x) = 0;
critical_points : solve(eqn,x);

you should get a list of 1 or more critical points. To find the value
of f at each of this points, you can do the following:

makelist( [ cp, y=f(rhs(cp)) ], cp, critical_points);

which will give you a list of pairs list [x=1,y=2], etc.


< 
< > But anyway, if you ask your teacher about this, try and find out exactly
< > what method he or she wants you to understand. If he or she just wants
< > you to get a numerical approximation to the answer, maybe so you get a
< > feel for a certain function, you could just look at the graph and do it
< > by eye!
< 
< Yes, though I'm blind so I can't look at the graph:) I presume what I
< said above with differentiation would give me just as accurate if not
< more accurate answer than looking at the graph? 
< 
< Using differentiation (like I describe above), would I receive an answer
< as accurate as the other students with their cas calculators? I know
< they get decimal values...
 
 Differentiation will give a more accurate answer, since the only
 approximation will be at the final step when you convert the exact
 symbolic answer to floating point; and even if you do the computations
 in floating point, it will still be more accurate (the human eye is
 unable to obtain more than 2 or 3 decimal points of accuracy).

 Leo

-- 
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.