How do you create a cubic polynomial function with a local max of 2, local min of -2 , and a point of inflection at 0?

suppose y = ax^3+bx^2+cx+d

so, y" = 6ax+2b
you know that
y"(0) = 0
so, b=0
y" = 6ax
since y(2) is a maximum, y"(2) < 0, so a<0
y' = m(x-2)(x+2) = m(x^2-4) = 3ax^2+c
y'(2)=y'(-2)=0, so 12a+c = 0
c = -12a
so,
y = ax^3-12ax+d
so, let's try some value for a, say -1. Then we have
y = -x^3+12x
The d does not matter.
You can see from the graph that we are done.

https://www.wolframalpha.com/input/?i=-x%5E3%2B12x

To create a cubic polynomial function with a local max of 2, a local min of -2, and a point of inflection at 0, we need to follow a step-by-step process.

Step 1: Determine the general form of a cubic polynomial function.

The general form of a cubic polynomial function is:
f(x) = ax^3 + bx^2 + cx + d

Step 2: Use the given information to set up a system of equations.

We know that the local max occurs at a certain value of x, where the derivative of the function is equal to 0. Similarly, the local min occurs at a point where the derivative is equal to 0. The point of inflection occurs where the second derivative is equal to 0. We can set up equations based on these conditions.

Equation 1: f'(x) = 0 at the local max
Equation 2: f'(x) = 0 at the local min
Equation 3: f''(x) = 0 at the point of inflection

Step 3: Find the derivatives of the function and set them equal to 0 to solve for the variables.

To find the first derivative, take the derivative of the general form of the polynomial function:
f'(x) = 3ax^2 + 2bx + c

To find the second derivative, take the derivative of the first derivative:
f''(x) = 6ax + 2b

Now, plug in the values we know from the given information:

Equation 1: 3ax^2 + 2bx + c = 0 (at the local max)
Equation 2: 3ax^2 + 2bx + c = 0 (at the local min)
Equation 3: 6ax + 2b = 0 (at the point of inflection)

Step 4: Solve the system of equations to find the values of a, b, and c.

Since we have three unknown variables (a, b, c), we need three independent equations to solve for them.

Considering equation 3 (6ax + 2b = 0), we know that x = 0 at the point of inflection. Substituting x = 0, we find that 2b = 0. Therefore, b = 0.

Now, substituting b = 0 into equations 1 and 2, we get:

Equation 1 (3ax^2 + c = 0): 3ax^2 + c = 0 (at the local max)
Equation 2 (3ax^2 + c = 0): 3ax^2 + c = 0 (at the local min)

Since both equation 1 and equation 2 are the same, we can conclude that a and c must also be equal. Let's denote them as a = c = k.

Now, substituting a = c = k back into equation 3 (6ax + 2b = 0), we get:

6kx = 0
Therefore, x = 0.

Step 5: Find the value of d.

To find the y-intercept (the value of d), we can substitute the value of x from the point of inflection into the original equation.

Substituting x = 0 into the general form of the polynomial function:

f(0) = a(0^3) + b(0^2) + c(0) + d
f(0) = d

Since we know that the local max occurs at f(0) = 2 and the local min occurs at f(0) = -2, we can conclude that d = 2 and d = -2.

Based on this, we can write our cubic polynomial function:

f(x) = kx^3 + 0x^2 + kx + 2 (for the local max)
f(x) = kx^3 + 0x^2 + kx - 2 (for the local min)