# Thread: Lagrangian Fucntion.

1. ## Lagrangian Fucntion.

$\displaystyle 36x - 2x^2+48y-3y^2$

Constraint of x+y = 15.

Can someone check to see if i am doing this correctly. I keep coming up with the wrong answer.
$\displaystyle L = 36x - 2x^2+48y-3y^2 - \lambda (x+y-15)$

$\displaystyle L_x = 36 - 4x - \lambda$

$\displaystyle L_y = 48- 6y - \lambda$

$\displaystyle L_{\lambda} = -x- y +15$

$\displaystyle x= \frac{\lambda-36}{-4}$

$\displaystyle y = \frac{\lambda-48}{-6}$

$\displaystyle \lambda = -\frac{\lambda-36}{-4}-\frac{\lambda-48}{-6}+15$

$\displaystyle \lambda = \frac{\lambda-36}{4}+\frac{\lambda-48}{6}+15$

$\displaystyle \lambda = \frac{3\lambda-108}{12}+\frac{2\lambda-96}{12}+15=0$

$\displaystyle \frac{5\lambda-204}{12}=15$

$\displaystyle 5\lambda -204 =180$

$\displaystyle 5\lambda = 384$

$\displaystyle \lambda=76.8$

I have gone wrong somewhere in here but can't figure out where.

2. Originally Posted by el123
$\displaystyle 36x - 2x^2+48y-3y^2$

Constraint of x+y = 15.

Can someone check to see if i am doing this correctly. I keep coming up with the wrong answer.
$\displaystyle L = 36x - 2x^2+48y-3y^2 - \lambda (x+y-15)$

$\displaystyle L_x = 36 - 4x - \lambda$

$\displaystyle L_y = 48- 6y - \lambda$

$\displaystyle L_{\lambda} = -x- y +15$

$\displaystyle x= \frac{\lambda-36}{-4}$

$\displaystyle y = \frac{\lambda-48}{-6}$

$\displaystyle \lambda = -\frac{\lambda-36}{-4}-\frac{\lambda-48}{-6}+15$

$\displaystyle \lambda = \frac{\lambda-36}{4}+\frac{\lambda-48}{6}+15$

$\displaystyle \lambda = \frac{3\lambda-108}{12}+\frac{2\lambda-96}{12}+15=0$

$\displaystyle \frac{5\lambda-204}{12}=15$

$\displaystyle 5\lambda -204 =180$

$\displaystyle 5\lambda = 384$

$\displaystyle \lambda=76.8$

I have gone wrong somewhere in here but can't figure out where.
I assume you're talking about Lagrange multipliers. Set f(x, y) = 36x - 2x^2 + 48y - 3y^2, g(x, y) = x + y. Taking grad(f) = lambda*grad(g), we have

36 - 4x = lambda,
48 - 6y = lambda,
x + y = 15.

Solve this system of equations.