## Lagrange Multipliers

### Dhurgham Kadhim (view profile)

on 15 Apr 2012
Accepted Answer by bym

### bym (view profile)

Use the Lagrange mulipliers to find the points on the parabola y=x^2+2x which are the closest to the point(-1,0).

Walter Roberson

on 15 Apr 2012

## Products

No products are associated with this question.

### bym (view profile)

on 16 Apr 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

### Dhurgham Kadhim (view profile)

on 17 Apr 2012

Thanks, that helped

### Richard Brown (view profile)

Answer by Richard Brown

### Richard Brown (view profile)

on 15 Apr 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

for x, y, and lambda.

### Dhurgham Kadhim (view profile)

on 16 Apr 2012

It is calculus and matlab as well.

Richard Brown

### Richard Brown (view profile)

on 16 Apr 2012

It's pretty straightforward to solve by hand - I recommend you do it that way, you'll learn more if you do.

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

### Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.