 My Math Forum QUick converging mimimization without derivatives?
 User Name Remember Me? Password

 Calculus Calculus Math Forum

 March 27th, 2018, 11:40 AM #1 Newbie   Joined: Oct 2013 Posts: 20 Thanks: 0 QUick converging mimimization without derivatives? We have three points: $\displaystyle x_0, x+h$ and $\displaystyle x-h$. We interpolate parabola using Stirling formula. Next, x:=parabola extreme. We can much decrease h and have next 3 points:$\displaystyle x_0, x+h$ and $\displaystyle x-h$. One problem: fast decreasing accuracy because of zero in denominator. Code: static double f(double x) { return (x - 1) * (x - 2) * (x - 3); } static void minparab(double x0,double h) { double kappa = 13.6; double xe = 1.4226497308103742355;//exact value for f(x) for (int i = 0; i < 10; i++) { double y0 = f(x0); double yp = f(x0 + h); double ym = f(x0 - h); double x = x0 + h * (0.25 * yp- 0.25 * ym) / (y0 - 0.5 *ym - 0.5 *yp); double hmin = Math.Abs(x - x0); if (hmin > h) h = hmin; double h2 = h * h / kappa; Console.WriteLine("{0}", x-xe); x0 = x; h = h2; } } static void test() { minparab(1.5, 0.1); } Tags converging, derivatives, mimimization, quick Thread Tools Show Printable Version Email this Page Display Modes Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Similar Threads Thread Thread Starter Forum Replies Last Post John Travolski Calculus 2 October 6th, 2016 09:26 AM ineedhelpnow Calculus 25 July 26th, 2014 10:02 PM bobcantor1983 Calculus 1 October 2nd, 2013 01:48 PM mathemadness Real Analysis 2 April 21st, 2010 10:41 AM milin Complex Analysis 8 October 19th, 2007 04:39 PM

 Contact - Home - Forums - Cryptocurrency Forum - Top      