To find the maximum value of y = 3x^2 - x^3, we can take the derivative of y with respect to x, set it equal to zero, and solve for x.
First, we find the derivative of y:
dy/dx = 6x - 3x^2
Setting this equal to zero gives:
6x - 3x^2 = 0
Factor out x:
x(6 - 3x) = 0
Solving for x, we get two solutions:
x = 0 or x = 2
To determine which value of x gives the maximum value of y, we can use the second derivative test.
Taking the second derivative of y:
d^2y/dx^2 = 6 - 6x
Plugging in x = 0 and x = 2:
d^2y/dx^2 |x=0 = 6 > 0
d^2y/dx^2 |x=2 = -6 < 0
Since the second derivative is positive at x = 0 and negative at x = 2, this means that x = 0 corresponds to a minimum value of y, while x = 2 corresponds to a maximum value of y.
Therefore, the maximum value of y = 3x^2 - x^3 occurs when x = 2, and is equal to:
y = 3(2)^2 - (2)^3 = 4.
So the answer is 4.