Is this problem "Lagrangable"? What is the minimum value of \(x^2 + y^2 + z^2\) given\[\dfrac{x^2}{4} + \dfrac{y^2}{5} + \dfrac{z^2}{25}=1\]and \(z=x+y\).
Or just maybe...\[\dfrac{x^2}{4} + \dfrac{y^2}{5} + \dfrac{(x+y)^2}{25}=1\]
yes looks like nice candidate for lagrange :)
But I'd like a solution through Lagrange Multipliers (if one exists).
OK, I'm just learning about them.\[x^2 + y^2 + z^2 +\lambda (x+y-z)\]Or will we use the second condition?
\[\dfrac{\partial f}{\partial x} =2x + \lambda \]Is this right?
Similarly,\[\dfrac{\partial f}{\partial y}=2y + \lambda\]\[\dfrac{\partial f}{\partial z}=2z-\lambda\]
OK, so \(y =z\)
hey constraint is this : \(\dfrac{x^2}{4} + \dfrac{y^2}{5} + \dfrac{(x+y)^2}{25}=1\) right ?
Oh, right...
So will we just remove \(z\) from existence and plug in \(x+y\) in everything?
you're given two constraints, and one function to optimize
So i think we need to merge the constraint and take it for lagrange
Anyway\[x^2+y^2 + z^2+\lambda\left(\dfrac{x^2}{4} + \dfrac{y^2}{5} + \dfrac{x^2 + 2xy + y^2}{25}\right)\]
Oh, forgot the \(-1\) there
^^
\[x^2+y^2 + z^2+\lambda\left(\dfrac{x^2}{4} + \dfrac{y^2}{5} + \dfrac{x^2 + 2xy + y^2}{25}-1\right)\]OK.
it shouldnt matter as it becomes 0 when u take derivative..
Oh whoops, didn't plug in \(x+y \) for \(z\) either.
\[x^2+y^2 + (x+y)^2+\lambda\left(\dfrac{x^2}{4} + \dfrac{y^2}{5} + \dfrac{x^2 + 2xy + y^2}{25}-1\right)\]Finally
Oh, you want to eliminate z and do it in two variables is it ?
Yes. :)
earlier one is also fine, but this gives less equations to solve... :)
Yes, OK - should I first combine the terms or go for it?
go for it may be...
Either should work. Bleh.\[\dfrac{\partial{f}}{\partial x}=2x +2x + 2y + \dfrac{\lambda}{2} + \dfrac{2\lambda}{25} + \dfrac{2\lambda y}{25}\]Phew.
looks good !
Nononono not that one... should be \(2\lambda x/4\)
I've confused myself. ?_?
Actually, both of them. Dagnabbit.
\(\large f(x,y) = x^2+y^2 + (x+y)^2+\lambda\left(\dfrac{x^2}{4} + \dfrac{y^2}{5} + \dfrac{x^2 + 2xy + y^2}{25}-1\right) \) \(\large \dfrac{\partial{f}}{\partial x}=2x +2(x + y) + \lambda\left( \frac{2x}{4}+ \frac{2x + 2y}{25}\right)\)
And\[\large \dfrac{\partial f}{\partial y}=2y + 2(x+y) +\lambda \left(\dfrac{2y}{5} + \dfrac{2y + 2x}{25}\right)\]Lesson of the day: use brackets wisely.
\(\large f(x,y) = x^2+y^2 + (x+y)^2+\lambda\left(\dfrac{x^2}{4} + \dfrac{y^2}{5} + \dfrac{x^2 + 2xy + y^2}{25}-1\right) \) \(\large \dfrac{\partial{f}}{\partial x}=2x +2(x + y) + \lambda\left( \frac{2x}{4}+ \frac{2x + 2y}{25}\right) \) \(\large \dfrac{\partial{f}}{\partial y}=2y +2(x + y) + \lambda\left( \frac{2y}{5}+ \frac{2x + 2y}{25}\right) \)
And I was sitting there expanding every little thing. -_-
hahah more variables more fun :)
hey... whats the difference between \dfrac, and \frac ?
`\dfrac` doesn't reduce the numbers in fractions to half their original size.
oh ! \(\large \frac{1}{2}, \dfrac{1}{2}\) gotcha :)
Like you can see how the fractions come out really small in `\frac`. By the way, fractions shouldn't be coming out small if you write \(\LaTeX\) within `\[ \]`. I see that you use `\( \)`
All right, let's subtract the two equations.
\[\dfrac{2x}{4} - \dfrac{2y}{5}=0\]
Oh wait.
\[\left( 2x -2y \right) +\left( \dfrac{x}2 - \dfrac{2y}{5}\right)=0\]
\(\LaTeX\), Y U NO WORK
Oh, looks like there should be a \(\lambda\) in there too?
yes lol
\[\left( 2x -2y \right) +\lambda \left( \dfrac{x}2 - \dfrac{2y}{5}\right)=0\]
the better way is not to subtract the equations
How do we get rid of the \(\lambda\)? ;_;
cuz, by subtracting the equations we lost some info
Lagrange works like this : At local max/min points, the gradiants are proportional, so we get : 1) \(\dfrac{\partial f}{\partial x} = 0\) 2) \(\dfrac{\partial f}{\partial y} = 0\)
above both give u two equations in 3 variables : \(\large x, y, \lambda\)
but how can u solve 3 variables wid just 2 equations ?
Oh, so we should have included the \(z\) :O
use the constraint as 3rd equation : 3) \(\dfrac{x^2}{4} + \dfrac{y^2}{5} + \dfrac{(x+y)^2}{25}=1\)
Oh, OK.
3 equations and 3 unknowns, feed it to wolfram. dont bother solving it manually lol
it gets messy
OK, thank you for helping! ^_^ The way I learnt the basics was this: https://www.quora.com/What-is-a-Lagrange-multiplier
Can you explain the "gradients are proportional" part?
once u have 3 equations, its just algebra to sovle them..
yeah sure :)
Aah, I'm beginning to see why \(\partial/\partial x\) is 0.
It's just like how any one-variable function works.
two different things : 1) finding max/min of a multivariable funciton : f(x, y, z) 2) finding max/min of a multivariable funciton : f(x, y, z) under given constraints
|dw:1397554659175:dw|
Join our real-time social learning platform and learn together with your friends!