online advertising
Loading [MathJax]/jax/output/HTML-CSS/jax.js

Sunday, December 6, 2015

UTM Ideals Varieties and Algorithm - Chapter 1 Section 2 Exercise 12

Problem:


Solution:

This problem is adopted from a Calculus textbook.

Find the points on circle x2+y2=45 that are closest and farthest from (1,2).

The function to optimize is (x1)2+(y2)2. We do not take the square root as optimizing the square is the same as optimizing the square root.

The corresponding Lagrangian is

L(x,y,λ)=(x1)2+(y2)2λ(x2+y245).

The partial derivatives must be 0, therefore, we have

Lx=2(x1)2λx=0Ly=2(y2)2λy=0x2+y2=45

The system is not hard to solve manually, but it would be really nice to see this can be solved automatically with Groebner basis.

For the sake of completeness, let's solve this system manually, we see

2(x1)2λx=0x(1λ)=1
2(y2)2λy=0y(1λ)=2

Dividing them, we get x=2y, this make things very easy now.

x2+y2=45x2+(2x)2=455x2=45x=±3y=±6

No comments:

Post a Comment