Use a root finding method to find a root of the derivative of the function

So I have been given an encrypted function (I can't alter it or view it) that can be invoked within matlab like so:
FabCorpV6(DesignParameter,Ncycles)
where FabCorpV6 is the encrypted function that I do not have a means of directly examining, Design Parameter is a value between -1 and 1 and Ncycles is a fixed integer from 1 to infinity. Basically, I need to use a root-finding method to determine what value of the DesignParameter would yield the minimum value possible for FabCorpV6. Any help with this is much appreciated. Right now I am hung up on how I'm supposed to use Matlab to evaluate the derivative of FabCorpV6 as a function of a fixed value for Ncycles of 5 and a range of values for the DesignParameter(ACCURATELY and EFFICIENTLY) in order to determine what values of the DesignParameter yield a value of zero for the derivative of FabCorpV6. Then I can evaluate the function at these extremes to determine which one is the absolute minimum of the function FabCorpV6. If anyone doesn't understand what I'm asking about, please don't hesitate to get clarification.

10 Comments

Is a root finding method imposed upon you? Or just finding minima? Do you need the global minimum or will any local minima do? Do you have the Global Optimization Toolbox?
I am not confined to any particular rootfinding method but must create an algorithm/matlab session that uses some root-finding method and explain why what I chose to do may be the "best choice for getting the best solution possible" So I certainly can't just use some built-in function that finds the minimum immediately. Global minimum is what I need. I'm not sure what the global optimization toolbox is, I'll find out while I'm waiting for your reply.
One text book that should help you out would be the "Numerical Methods for Engineers" by Steven C. Chapra and Raymond P. Canale. Which has multiple chapters that goes into detail about the different methods of finding roots of equations using graphical methods, bisectioning, false positioning, incremental searches, newton-raphson, secant, etc.
i have it. my problem is figuring out how to properly write an algorithm incorporating these methods to solve my problem
root finding methods applied to an opaque function can never be sure they have found the global minima.
However seeing that it is an assignment question with specific bounds and conditions, the function should be simple enough that the found global minimum has a fairly high certainty.
Okay well I don't really need the "global" minimum. I just need to write an algorithm that will efficiently and accurately approximate the value of the DesignParameter(btw -1 and 1) that will yield a value for the function FabCorpV6 that is less than all the other values in the domain -1 to 1
nothing really. Basically, I am clear on how I would implement a root-finding method at face value. But, seeing as how the function doesn't have any zero-values in the specified domain, I'm left wondering whether I can simply apply the root-finding methods to its derivative, in order to find where the extrema are. Then I can simply evaluate the function at those values of DesignParameter for which extrema do occur. So my problem is how can I apply the root-finding methods to determine where the extrema are by finding the roots of the derivative. I can't simply find the derivative with typical differentiation because the function I'm invoking is encrypted and I can't view it.
Basically, how can I apply iterative root-finding methods to the derivative of a function?

Sign in to comment.

 Accepted Answer

It sounds like you do not understand the problem at all. As you said the specified function doesn't have a zero value and you are not applying the root finding method to this function. You are applying the root finding method to its derivative. Find the derivative first and when you apply the root finding that will get you the local min/max values as the slope is zero at the local max/min. you say you cannot just perform a typical differentiation but how about an approximation? such as you'd use the trapezoidal method to approximate an integral.

3 Comments

harsh man! I understand most of it. I like your idea about approximating the derivative though! maybe i'll try to work that out.
And it should be. This question although related to MATLAB is heavily weighted in how to approach this mathematically. Going through whatever course you're using the "Numerical Methods for Engineers" book was probably what cemented my understanding of how to use and how to approach problems with Matlab. Which was aided by long nights in the comp lab, discussion with the other students and talking with the TA and prof.
sorry if i came off as blunt. I do not wish to put you off from the forums however the link http://www.mathworks.com/matlabcentral/answers/8626-how-do-i-get-help-on-homework-questions-on-matlab-answers should be a guideline for future posts about homework. this place should be where we break down some road blocks or give you the final push,.

Sign in to comment.

More Answers (1)

Pick a random point (D0, n0) in (D,n) . Initialize the minima M0 to f(D0,n0) . Then if there is any better minima, f(D1, n1) it will have to occur at a root crossing of (f(D, n) - M0). You will, however, not be able to know if a point is a root crossing unless you have probed at least one other nearby point and found it to have lower value in (f-M0). Take that lower point and assign it as the new minima M1. Repeat the sequence. When you can no longer find a root crossing then either your root crossing finding algorithm is not powerful enough or else you have found the minima over (D,n).
You may also want to research "gradient search". Or perhaps numeric estimation of Jacobian. Or simplex search.

1 Comment

thankyou. I appreciate the help. I'll try and do this to the best of my understanding tomorrow morning

Sign in to comment.

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Asked:

on 24 Mar 2014

Commented:

on 25 Mar 2014

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!