Finding a cubic polynomial that attains a max/min value over an open interval

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 4K views
phosgene
Messages
145
Reaction score
1

Homework Statement



Give an example of a cubic polynomial, defined on the open interval (-1,4), which reaches both its maximum and minimum values.

Homework Equations



-

The Attempt at a Solution



I can see that I would need a function such that there is some f(a) and f(b) in (f(-1),f(4)) such that f(a) >= all f(x) for x in (-1,4) and f(b) <= all f(x) for x in (-1,4). I used an online tool to adjust the coefficients of a cubic until I got what I needed. But I have no idea how to do this by myself. All that I can think of is to somehow use the fact that at extrema, a function's derivative is zero.
 
Physics news on Phys.org
phosgene said:

Homework Statement



Give an example of a cubic polynomial, defined on the open interval (-1,4), which reaches both its maximum and minimum values.

Homework Equations



-

The Attempt at a Solution



I can see that I would need a function such that there is some f(a) and f(b) in (f(-1),f(4)) such that f(a) >= all f(x) for x in (-1,4) and f(b) <= all f(x) for x in (-1,4). I used an online tool to adjust the coefficients of a cubic until I got what I needed. But I have no idea how to do this by myself. All that I can think of is to somehow use the fact that at extrema, a function's derivative is zero.

Write your cubic as y = (x - a)(x - b)(x - c). The x-intercepts are at (a, 0), (b, 0), and (c, 0). Without too much effort you can put in values for a, b, and c so that all three intercepts are in the interval (-1, 4), with a local maximum between a and b, and a local minimum between b and c.
 
phosgene said:

Homework Statement



Give an example of a cubic polynomial, defined on the open interval (-1,4), which reaches both its maximum and minimum values.

Homework Equations



-

The Attempt at a Solution



I can see that I would need a function such that there is some f(a) and f(b) in (f(-1),f(4)) such that f(a) >= all f(x) for x in (-1,4) and f(b) <= all f(x) for x in (-1,4). I used an online tool to adjust the coefficients of a cubic until I got what I needed. But I have no idea how to do this by myself. All that I can think of is to somehow use the fact that at extrema, a function's derivative is zero.

You could find just any old cubic p(x) that has distinct maxima and minima, then shift and re-scale x until the max and min lie in your interval.