## richyw 3 years ago Find the points on $$x^2+xy+y^2=3$$ which are closest and farthest from $$(0,0)$$

1. AccessDenied

Hmm... What sort of class are you doing this problem for?

2. richyw

refresher course in calculus.

3. richyw

this is a multivariable optimization problem.

4. AccessDenied

Ah. I had a feeling it was calc. ;P I was thinking of maybe using rotation of axes and trying to use conic section properties. I'm not as familiar with the multivar calc methods I saw before.

5. richyw

Would you be able to do it without calc? Any method that get's the answer is fine by me haha.

6. AccessDenied

It's been a while since I did rotation of axes, but what it basically does is removes the obnoxious 'xy' term by using more obnoxious trig. With any luck though, we could possibly get a nice conic section like an ellipse, where we can identify the major and minor axes for those maximum/minimum distances

7. AccessDenied

This PDF has some pretty sweet pictures and explanation, I thought it was really helpful: http://www.stewartcalculus.com/data/CALCULUS%20Early%20Vectors/upfiles/RotationofAxes.pdf

8. cruffo

I have a suggestion that may not require much more than calc 1...

9. cruffo

We want to maximize and minimize the distance between the curve and the point. $\large \text{Distance}^2 = (x-0)^2 + (y-0)^2 = x^2 + y^2$ problem is that the curve is not easily solved for y. But If you use quadratic formula and solve for y thus, $\large y^2 +xy + (x^2 -3) = 0$ you may have some luck..

10. richyw

hmm. that could work. but will keep bumping for a calc answer! Thanks for all your help though.

11. AccessDenied

Alright, I got my method to work out, although it is quite long and tedious. lol ------------------------------------------------------------- w = r cos t z = r sin t x = r cos(t + p) y = r sin(t + p) x = r cos t cos p - r sin t sin p y = r sin t cos p + r cos t sin p x = w cos p - z sin p y = z cos p + w sin p (w cos p - z sin p)^2 + (w cos p - z sin p)(z cos p + w sin p) + (z cos p + w sin p)^2 = 3 w^2 cos^2 p - 2 wz sin p cos p + z^2 sin^2 p + wz cos^2 p + w^2 sin p cos p - z^2 sin p cos p - wz sin^2 p + z^2 cos^2 p + 2 wz cos p sin p + w^2 sin^2 p = 3 w^2 (cos^2 p + sin p cos p + sin^2 p) + wz(-2sin p cos p + cos^2 p - sin^2 p + 2sin p cos p) + z^2 (sin^2 p - sin p cos p + cos^2 p) = 3 w^2 (1 + sin p cos p) + wz(cos^2 p - sin^2 p) + z^2(1 - sin p cos p) = 3 w^2 (1 + sin p cos p) + wz cos(2p) + z^2 (1 - sin p cos p) = 3 w^2 (1 + 1/2 sin(2p)) + wz cos(2p) + z^2 (1 - 1/2 sin(2p)) = 3 cos(2p) = 0 2p = pi/2 p = pi/4 w^2 (1 + 1/2 sin 2(pi/4)) + wz cos(2 pi/4) + z^2 (1 - 1/2 sin(2 pi/4)) = 3 w^2 (1 + 1/2) + 0wz + z^2(1 - 1/2) = 3 3/2 w^2 + 1/2 z^2 = 3 1/2 w^2 + 1/6 z^2 = 1 Our rotation of axes doesn't affect (0, 0)'s position, so we can ignore messing with it. sqrt(2) is 1/2 the length of our minor axis, and it is along the x-axis. (+- sqrt(2), 0) are our minor vertices. sqrt(6) is 1/2 the length of our major axis, and it is along the y-axis. (0, +- sqrt(6) are our major vertices. So, the last thing to do now is convert back to the original system. (w, z) = (sqrt(2), 0) x = sqrt(2) cos(pi/4) - 0 sin(pi/4) y = 0 cos(pi/4) + sqrt(2) sin (pi/4) x = sqrt(2)* sqrt(2)/2 = 1 y = sqrt(2) sqrt(2)/2 = 1 (1, 1) is the minimum point, along with (-1, -1). (w, z) = (0, sqrt(6)) x = 0 cos(pi/4) - sqrt(6) sin(pi/4) y = sqrt(6) cos(pi/4) + 0 sin(pi/4) x = -sqrt(6) * sqrt(2)/2 = -sqrt(3) y = sqrt(6) * sqrt(2)/2 = sqrt(3) (-sqrt(3), sqrt(3)), and (sqrt(3), -sqrt(3)) Conclusion: Points closest to (0, 0): (1, 1) and (-1, -1). Points farthest from (0, 0): (-sqrt(3), sqrt(3)) and (sqrt(3), -sqrt(3)). --------------------------------------------

12. cruffo

Got the same thing using the same method :)

13. richyw

holy! thanks for putting in that effort. I really appreciate it.

14. AccessDenied

I looked into a method of solving this using Lagrange Multipliers. I'm no expert with this multivariable calc, but here's my attempt: Let $$D = d^2 = x^2 + y^2$$ be the equation we are trying to optimize, and our constraint is $$x^2 + xy + y^2 = 3$$. In general, this Lagrange Multiplier stuff says that: $$\nabla f(x,y) = \lambda \nabla g(x,y)$$ We can then break this up into individual partial derivatives in each variable. $$f_x(x,y) = \lambda g_x(x,y)$$, and $$f_y(x,y) = \lambda g_y(x,y)$$. Pairing this up with our constraint, we have a three-variable system of equations: $$f_x(x,y) = \lambda g_x(x,y)$$, $$f_y(x,y) = \lambda g_y(x,y)$$, $$g(x,y) = k$$ Now, we'll go back to our problem and we'll apply this information. $$f(x,y) = D$$, $$g(x,y) = x^2 + xy + y^2$$, and $$k = 3$$. $$D_x = \lambda g_x$$, $$D_y = \lambda g_y$$ $$g = k$$ $$2x = \lambda \left(2x + y\right)$$ $$2y = \lambda \left(2y + x\right)$$ $$x^2 + xy + y^2 = 3$$ From what I can see, solving this system gives you the answers. I suppose there are some checks that should be carried out to verify that your answers are correct from there. http://www.wolframalpha.com/input/?i=solve+system+%7B2x%3Dz%282x%2By%29%2C+2y%3Dz%282y%2Bx%29%2C+x%5E2%2Bxy%2By%5E2%3D3%7D