Applied Optimization: reals x, y s.t. x+y=S, x^my^n is a maximum

debased

New member
Joined
Oct 19, 2018
Messages
28
I'm trying to do an applied optimization problem but I'm at a point where I'm not sure if I did the right thing or not. I'll post my work and the problem below:

Given a positive real number S and two positive integers m and n, find the values of two non-negative reals x and y such that x + y = S and the value of x^my^n is a maximum.

x+y = S

let L be the product of x^my^n

L = x^m * y^n

Constraint must be 0 <= x <= S

L=x^m * (S - x)^n

dL/dx = -x^m * n(S - x)^n-1 + mx^(m-1) * (S - x)^n
OR
x^m(S - x)^n * (-n(S - x)^-1 + mx^-1)


First of all, I'm fairly certain I differentiated correctly (checked on WolframAlpha), but I'm not sure if I defined the relationship or constraint properly. From here, setting that derivative to 0 and solving for x to obtain the stationary points is confusing because if I divide out (-n(S - x)^-1 + mx^-1) and solve x^m(S - x)^n I get x = 0 and x = S which means the product is 0 in both cases. If I do the opposite and solve for (-n(S - x)^-1 + mx^-1) then I get something like x = (S * m)/(n + m). Did I solve for x correctly?
 
I'm trying to do an applied optimization problem but I'm at a point where I'm not sure if I did the right thing or not. I'll post my work and the problem below:

Given a positive real number S and two positive integers m and n, find the values of two non-negative reals x and y such that x + y = S and the value of x^my^n is a maximum.

x+y = S

let L be the product of x^my^n

L = x^m * y^n

Constraint must be 0 <= x <= S

L=x^m * (S - x)^n

dL/dx = -x^m * n(S - x)^n-1 + mx^(m-1) * (S - x)^n
OR
x^m(S - x)^n * (-n(S - x)^-1 + mx^-1)


First of all, I'm fairly certain I differentiated correctly (checked on WolframAlpha), but I'm not sure if I defined the relationship or constraint properly. From here, setting that derivative to 0 and solving for x to obtain the stationary points is confusing because if I divide out (-n(S - x)^-1 + mx^-1) and solve x^m(S - x)^n I get x = 0 and x = S which means the product is 0 in both cases. If I do the opposite and solve for (-n(S - x)^-1 + mx^-1) then I get something like x = (S * m)/(n + m). Did I solve for x correctly?

I would say that the constraint is x+y=S; it looks like all your work is correct. At the end, you don't really want to divide; you have a factored form, so the product is zero when any of the factors is zero:

x^m(S - x)^n (-n(S - x)^-1 + mx^-1) = 0 when x^m = 0 or (S - x)^n = 0 or (-n(S - x)^-1 + mx^-1) = 0.

Your answer is correct; just calculate y as well. When you simplify it, it should look much like the formula for x.

I would probably have factored differently, factoring out the smaller power of each base:

-x^m * n(S - x)^n-1 + mx^(m-1) * (S - x)^n = x^(m-1)(S - x)^n-1[-nx + m(S - x)]

That makes the solving easier.
 
I would say that the constraint is x+y=S; it looks like all your work is correct. At the end, you don't really want to divide; you have a factored form, so the product is zero when any of the factors is zero:
x^m(S - x)^n (-n(S - x)^-1 + mx^-1) = 0 when x^m = 0 or (S - x)^n = 0 or (-n(S - x)^-1 + mx^-1) = 0.

Your answer is correct; just calculate y as well. When you simplify it, it should look much like the formula for x.

I would probably have factored differently, factoring out the smaller power of each base:
-x^m * n(S - x)^n-1 + mx^(m-1) * (S - x)^n = x^(m-1)(S - x)^n-1[-nx + m(S - x)]

That makes the solving easier.

Alright, so calculating L of 0 and S I get 0. Calculating L of mS/(n+m) I get a maximum of: (mS/(n+m))^m * (S(n+m) - mS/(n+m))^n. And in so doing I calculated the y: S(n+m) - mS/(n+m) which satisfies x + y = S. Is this the correct answer?
 
Alright, so calculating L of 0 and S I get 0. Calculating L of mS/(n+m) I get a maximum of: (mS/(n+m))^m * (S(n+m) - mS/(n+m))^n. And in so doing I calculated the y: S(n+m) - mS/(n+m) which satisfies x + y = S. Is this the correct answer?

I think you meant to say y = [S(n+m) - mS]/(n+m) which can be simplified (as I urged you to do) to nS/(n+m). This makes sense, since x and y are symmetric in the problem, and the formula you get for y should correspond to the formula for x, with m and n interchanged.

Looks good to me.
 
I think you meant to say y = [S(n+m) - mS]/(n+m) which can be simplified (as I urged you to do) to nS/(n+m). This makes sense, since x and y are symmetric in the problem, and the formula you get for y should correspond to the formula for x, with m and n interchanged.

Looks good to me.

Alright thanks!
 
Top