Optimisation problem help

The answer given in the textbook is : 16 and 24, however I'm finding two different values, 15 and 25. Any assistance would be greatly appreciated.

The sum of two positive integers is 40. Find the two integers such that the product of the square of one number and the cube of the other number is a maximum:

P = (x^2)(y^3)

As x + y = 40, x = 40 - y

Substituting this back into the product expression:

P = (40-y)^2(y^3)

P = (1600 -80y + y^2)y^3

P = 1600y^3 -80y^4 +y^5

dP/dy = 4800y^2 -320y^3 +5y^4

When such equals zero, 5y^2(960-64y) = 0

Obviously y=0 is not a solution, so 64y = 960 , y = 15

Is there another method of finding the solution?

Re: Optimisation problem help

Look again at the line where you remove as a factor.

Re: Optimisation problem help

As indicated, you have factored incorrectly, but to answer your question about whether there is another method, one can use Lagrange multipliers. We are given the function:

subject to the constraint:

giving the system:

which implies:

The first factor gives us the possible solutions:

both of which yield:

The second factor gives:

and substituting into the constraint, we find: