Find the maximum value of the quantity x + 2 y + 2 z 2 , subject to the constraint x 2 + y 2 + z 2 = 1 .
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The constrained optimization problem can be converted to an unconstrained optimization problem by recognising that the optimal solution must lie on the unit sphere. This means:
x = sin θ cos ϕ ; y = sin θ sin ϕ ; z = cos θ
0 ≤ θ ≤ π ; 0 ≤ ϕ ≤ 2 π
This converts the cost function to:
F = sin θ cos ϕ + 2 sin θ sin ϕ + 2 cos 2 θ
Now, one can compute the partial derivative of F with respect to θ and ϕ and proceed from there, but I have resorted to a shortcut. I swept across the parameter space using a short script of code which is attached below. Code is commented. The maximum value is ≈ 2 . 6 2 5 .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
|
Substituting the spherical constraint in for z 2 gives us a function in two variables f ( x , y ) = x + 2 y + 2 ( 1 − x 2 − y 2 ) = x + 2 y − 2 x 2 − 2 y 2 + 2 . Taking g r a d f = 0 yields:
f x = 1 − 4 x = 0 ⇒ x = 4 1 ,
f y = 2 − 4 y = 0 ⇒ y = 2 1 .
The Hessian Matrix of f computes to:
F ( x , y ) = [ − 4 0 0 − 4 ] = − 4 ⋅ I 2 x 2
which is negative-definite for all x , y ∈ R . Hence, the maximum value of f is just f ( 4 1 , 2 1 ) = 2 . 6 2 5 .
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
1 |
|
Problem Loading...
Note Loading...
Set Loading...
Using z 2 = 1 − x 2 − y 2 , we have x + 2 y + 2 z 2 = x + 2 y + 2 ( 1 − x 2 − y 2 ) = 2 + x − 2 x 2 + 2 y − 2 y 2 = 2 − 2 ( x − 4 1 ) 2 + 8 1 − 2 ( y − 2 1 ) 2 + 2 1 ≤ 2 + 8 1 + 2 1 = 8 2 1 = 2 . 6 2 5 This value of 8 2 1 is attained at x = 4 1 and y = 2 1 , hence z 2 = 1 − 1 6 1 − 4 1 = 1 6 1 1 , so z = ± 4 1 1 . Hence, this maximum is attained at a legitimate point ( x , y , z ) .