Wednesday, February 8, 2012

challenge: function maximum in GSP

I finally finished a construction that has consumed much of my recent puzzling.  There is little to show for it at the moment, but I thought I would make a note here as it was an elegant problem with a fairly satisfying solution.  Rather than post my solution I will post the problem, which is of greater value to you, should you attempt to solve it:

Find the maximum value of a function f(x) on an interval (a, b).  

I have occasionally used a calculation with the sgn() function to determine the greater of two values, but I was hoping to use iteration to work through an interval.  My construction will improve with iterations, but of course it has some precision limitations with discontinuous or very steep functions; it is not calculus on smooth curves, after all.

I ought to add that I tried to do this myself and it's likely enough that while I thought it was tricky, I could have missed something that everyone else already knows about.  For example, I always thought that there was no explicit formula for Fibonacci numbers, but there is and I only learned about it recently. 

No comments:

Post a Comment