Ok, thats all you need to solve this problem. What you want to do is solve f '(x) for zero. Find all the x coordinate points where y equals zero in that equation and you'll have the x positions in the function f(x) at which the gradient is zero.

In a quartic like f(x) the derivative will have 3 points where y=0, so 3 turning points in f(x), one will be the maximum, one will be the minimum, and another will be in between both.

Once you have the x values calculated from the derivative f '(x) you can sub the 3 values back in to the original function f(x) and find which of those is the minimum and thus which value of x is the minimum.

But!.... Since you have been given a range for x, you might find that 2 of those values of x you found in the derivative function are outside those bounds, so you can exclude those straight away.

For example:
x1 = -12.3 , x2 = 0.4 , x3 = 54.6

In this case, both x1 and x3 lie outside the bounds of zero and one (0<=x<1) so the answer would be x2.

Identify the appropriate x value, then sub it back in to the original equation and give the corresponding y value for the minimum.

If this solved your problem, stop reading here. If you still haven't solved it, read on.

-----------------------------------------

You might find that none of the 3 calculated x values lie within the boundaries specified, so simply take the lower limit (in this case "0") and sub that in as the x value in the original function f(x). Then sub in the upper limit (in this case "1") in f(x) and find which is smaller, and that will be your answer.

I haven't told you how to solve for x in this :P I can't do everything for you now can I? If you need help with that, let me know and I'll step you through solving for x in a cubic derivative.

Ok, thats all you need to solve this problem. What you want to do is solve f '(x) for zero. Find all the x coordinate points where y equals zero in that equation and you'll have the x positions in the function f(x) at which the gradient is zero. Mr F says: So you're proposing to langers2k that s/he solve a general cubic equation ......

In a quartic like f(x) the derivative will have 3 points where y=0, so 3 turning points in f(x), one will be the maximum, one will be the minimum, and another will be in between both. Mr F says: Not true. For example, has only one (minimum) turning point.

Once you have the x values calculated from the derivative f '(x) you can sub the 3 values back in to the original function f(x) and find which of those is the minimum and thus which value of x is the minimum.

But!.... Since you have been given a range for x, you might find that 2 of those values of x you found in the derivative function are outside those bounds, so you can exclude those straight away.

For example:
x1 = -12.3 , x2 = 0.4 , x3 = 54.6

In this case, both x1 and x3 lie outside the bounds of zero and one (0<=x<1) so the answer would be x2.

Identify the appropriate x value, then sub it back in to the original equation and give the corresponding y value for the minimum.

If this solved your problem, stop reading here. If you still haven't solved it, read on.

-----------------------------------------

You might find that none of the 3 calculated x values lie within the boundaries specified, so simply take the lower limit (in this case "0") and sub that in as the x value in the original function f(x). Then sub in the upper limit (in this case "1") in f(x) and find which is smaller, and that will be your answer.

I haven't told you how to solve for x in this :P I can't do everything for you now can I? Mr F wryly observes: Very glib. The devil is in the detail. Which would be why there is none .......

If you need help with that, let me know and I'll step you through solving for x in a cubic derivative. Mr F remarks: I think you're biting off more than you can chew here, sport.

Hope it helps, and good luck.

I'm certain there's more to the question that what's been posted ......

I'm certain there's more to the question that what's been posted ......

Not sure, its not technically a question that has been set. I need to make a simulator of sorts and deal with collisions, I will be using this to calculate collision times so I can model them accurately.

Originally Posted by mr fantastic

Mr F says: So you're proposing to langers2k that s/he solve a general cubic equation ......

Unfortunately it will be used in a computer program, so the values of a to e can be anything.

Assuming the rest of Makka's method is fitting to my requirements can you give me advice on how to solve the cubic? Thanks!

If a, b, c, d, e are unrestrained constants, then the minimum value of the quartic over the interval [0, 1) can be anything you want it to be!!!!

The quartic has a minimum value of k occuring at x = 1/2. k is any real number.

The question as posted has no sensible answer.

I don't know what a, b, c, d, e will be when I create the program, but at run-time they are fixed. Surely there will be a minimum value of y given a range of x values?

I may not have explained my question very well and I certainly don't even pretend to understand polynomials past the 2nd degree, but given 5 co-efficients that are known when the equation is going to be solved, we should be able to get an answer back?

I don't know what a, b, c, d, e will be when I create the program, but at run-time they are fixed. Surely there will be a minimum value of y given a range of x values?
I may not have explained my question very well and I certainly don't even pretend to understand polynomials past the 2nd degree, but given 5 co-efficients that are known when the equation is going to be solved, we should be able to get an answer back?

If I have missing something please let me know.

Well you didn't say that in your statement of the question. The replies you get are only going to be as good as the information you give.

There are standard numerical algorithms for finding the minimum value of a polynomial over a given domain. I believe advice along that line has already been given in one of your other posts.

I'll be the first to admit I'm not an expert. But I thought what I did respond with was sufficient to get him on the right track, and tbh it sounds like it at least got over the initial hurdle and outlined a basic technique to start the problem, which is what I thought his problem was... where to start?

If he doesn't include actual numbers, I'm not going to spend all day going over every possible combination or result in examples, I'll generalize a little for the sake of simplification. I'm quite aware not all cubics have 3 turning points, but that would certainly be a worst case scenario in this instance (most work).

I apologise if my response confused or was so woefully incorrect that you found it necessary to dress me down, but at least I pinged a light bulb initially.

Do you know that a graphics or CAS calculator can easily do what you're asking ....?

Incidentally, unless you're suggesting a graphics calculator with a program thats designed to show all the working steps in solving a cubic, I don't think thats what he's after. The "user input constants" were included because the formula needs to be applied to a program, not just a one time solution with the inbuilt graphing functions of a calculator.

I use a website QuickMath Automatic Math Solutions to simplify my equations and things, as well as performing various functions, however I haven't played around with it enough to know whether it gives a descent cubic solving function. Though it does do a nice job of showing each and every step, you can leave your formula in the ax^2 + bx + c stage and see the final position of each constant in the end formula. That'll cut right past the understanding of each solving step if you're only interested in getting your program/simulator running. It will however give quite messy equations, but at least they work :S

-----------------------------------------------------

I had a quick look at some techniques for solving cubics in the material I have, your best bet is to just google around and find something that works for you if you want to understand the process, theres heaps of good stuff out there, rather than getting only 1 type of solution. The reason there are more than one way of solving things (other than being mathematically possible) is because some people find certain ways of doing things easier than others. So shop around and find something that works for you. I can give you a bunch of links to some good material on cubics and how to solve them logically, but nothing better than you'll find yourself if you google a bit. But I'm sure theres someone willing to run through one process with you here (i'm just unfortunately not one of them).