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 件のコメント

Walter Roberson
Walter Roberson 2012 年 4 月 15 日
http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer

サインインしてコメントする。

 採用された回答

bym
bym 2012 年 4 月 16 日

0 投票

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 件のコメント

Dhurgham Kadhim
Dhurgham Kadhim 2012 年 4 月 17 日
Thanks, that helped

サインインしてコメントする。

その他の回答 (1 件)

Richard Brown
Richard Brown 2012 年 4 月 15 日

0 投票

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 件のコメント

Dhurgham Kadhim
Dhurgham Kadhim 2012 年 4 月 16 日
It is calculus and matlab as well.
Richard Brown
Richard Brown 2012 年 4 月 16 日
It's pretty straightforward to solve by hand - I recommend you do it that way, you'll learn more if you do.
Divy
Divy 2023 年 1 月 21 日
nice ra

サインインしてコメントする。

カテゴリ

質問済み:

2012 年 4 月 15 日

コメント済み:

2023 年 1 月 21 日

Community Treasure Hunt

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

Start Hunting!

Translated by