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?
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?