Problem:(adsbygoogle = window.adsbygoogle || []).push({});

Fix some vector ##\vec{a} \in R^n \setminus \vec{0}## and define ##f( \vec{x} ) = \vec{a} \cdot \vec{x}##. Give an expression for the maximum of ##f(\vec{x})## subject to ##||\vec{x}||_2 = 1##.

My work:

Seems like a lagrange multiplier problem.

I have ##\mathcal{L}(\vec{x},\lambda) = \vec{a} \cdot \vec{x} - \lambda(||x||_2 - 1)##

Then ##D_{xi} \mathcal{L}(\vec{x},\lambda) = a_i - 1/2\lambda(\vec{x} \cdot \vec{x})^{-1/2}2x_i = a_i - \lambda x_i/||x|| = 0##. Solving for ##x_i## yields ##x_i = a_i||x||/\lambda##

Also ##D_{\lambda} \mathcal{L}(\vec{x},\lambda) = -||x|| + 1 = 0,## so ||x|| = 1.

Plugging that into the above expression I get ##x_i=ai/\lambda##.

But this answer doesn't make sense to me. For one, lambda should fall out, right? Also, just thinking about it -- wouldn't we want to set ##x_i = 1## for the max ##a_i## and have all ##j\neq i, x_j = 0##, because any deviation from that would be smaller?

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# I Dot product constrained optimization

Tags:

Have something to add?

Draft saved
Draft deleted

Loading...

Similar Threads - product constrained optimization | Date |
---|---|

B Product rule OR Partial differentiation | Jan 10, 2018 |

B Derivative with the double cross product | Jul 18, 2017 |

B Derivation with logarithms and product | May 27, 2017 |

I Geometrical interpretation of gradient | May 26, 2017 |

Constrained Extrema and Lagrange Multipliers | Mar 25, 2015 |

**Physics Forums - The Fusion of Science and Community**