Lagrange Multipliers

6 visualizaciones (últimos 30 días)
Dhurgham Kadhim
Dhurgham Kadhim el 15 de Abr. de 2012
Comentada: Divy el 21 de En. de 2023
Use the Lagrange mulipliers to find the points on the parabola y=x^2+2x which are the closest to the point(-1,0).
  1 comentario
Walter Roberson
Walter Roberson el 15 de Abr. de 2012
http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer

Iniciar sesión para comentar.

Respuesta aceptada

bym
bym el 16 de Abr. de 2012
here is a nudge to solving your problem
syms x y L
d = ??? % for you to fill out; distance from (-1,0)
g = d+L*(x^2+2*x-y) % constraint for given parabola
% additional operations here
show some effort, and some additional help may be forthcoming
  1 comentario
Dhurgham Kadhim
Dhurgham Kadhim el 17 de Abr. de 2012
Thanks, that helped

Iniciar sesión para comentar.

Más respuestas (1)

Richard Brown
Richard Brown el 15 de Abr. de 2012
This is not a Matlab question, it's a calculus homework problem. Define a function f(x,y) that you want to minimise, a constraint c(x,y) = 0, and then solve c(x,y) = 0, together with
grad f = lambda grad c
for x, y, and lambda.
  3 comentarios
Richard Brown
Richard Brown el 16 de Abr. de 2012
It's pretty straightforward to solve by hand - I recommend you do it that way, you'll learn more if you do.
Divy
Divy el 21 de En. de 2023
nice ra

Iniciar sesión para comentar.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by