Question: Component with cycle for

Meanwhile, thank you so much for everything.
I know I'm asking a lot but if you have time, you can help me do this?

Building a system of interactive components that, taken a function, two points 'a' and 'b' values ​​and an integer n, the calculations point between a and b in which the function assumes the minimum value by using the following procedure:

• It divides the values ​​between a and b into n equal parts (these will distance the one with the other (b-n)/2);
• calculates the function in each of these points;
• located between these values,  what is the minimum (in case of a tie, take the one closest to a)

I think i have to create a vector for each  part and  prehaps with a fcycle for, calculate the function, finelly i'll use minimize with all function.
Do you think is the correct procedure? If yes, how can I do it?

Please Wait...