online advertising

Sunday, December 6, 2015

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

Problem:


Solution:

a)

The hint basically give out the answer.

Basic fact: Union or Intersection of two affine varieties is an affine variety.

Induction:

Base case is trivial, Union or Intersection of 1 affine variety is an affine variety, obviously.

Suppose the Union or Intersection of $ k $ affine varieties is an affine variety, because of the basic fact, the Union or Intersection of $ k + 1$ affine varieties is again an affine variety.

Therefore, by the principle of mathematical induction, the finite union and intersection is not an affine variety.

b)

We showed that the integer grid is not an affine variety, but it is an infinite union of a single points, which are affine varieties.

c)

We showed that the punctured line is not an affine variety, but a line and a point are both affine varieties and so that we have found an example.

d)

Just put all the governing polynomials together would work, of course, we need to rename the variables.

The proof that it works is trivial, a point that is in $ V \times W $ must be a point that satisfy all the governing polynomials.








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

Problem:


Solution:

a)

This is obvious, the arm cannot possibly reach anything outside the circle with radius 6.

b)

This is again obvious, the node between second and third arm has to stay on the circle with radius 5, the only remaining freedom is the third arm which can bring us anywhere in the annulus.

c)

We already know we are able to reach any point in the annulus, now we only need to worry about points in the inner circle with radius 4. Suppose we fold the second arm completely backwards to be parallel with the first arm, we can reach all points with a circle with radius 2.

On the other hand, if we can fix the angle between the first arm and the second arm to be at an angle such that the node of the second arm is of distance 3 from the origin, then we are done because now the last arm can cover all points between 2 and 4 from the origin.

To do that, we note that the first arm is distance 3 from the origin, the second arm is 2 distance from the first arm tip, and the second arm tip is again distance 3, so we form an isosceles triangle and therefore the angle is simply $ \cos^{-1} \frac{1}{3} $.

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

Problem:


Solution:

a)

I will skip this one, the picture is pretty obvious.

b) 3 variables.

The angle $ \theta_1 $ between the first arm and an arbitrary axis on the plane
The angle $ \theta_2 $ between the second arm and first arm
The angle $ \theta_3 $ between the third arm and the second arm.

c)

If we define the "state" as the space for all the angles, then they are all independent! They are in the space of $ [-\pi, \pi]^3 $, no equation is needed to govern them.

However, if we are thinking about the "state" as position and orientation, then it can get quite complex, we can still reason it with affine transforms, we simply stack the transforms up.

$ \left(\begin{array}{ccc} \cos \theta_1 & -\sin \theta_1 & 0 \\ \sin \theta_1 & \cos \theta_1 & 0 \\ 0 & 0 & 1\end{array}\right)
\left(\begin{array}{ccc} 1 & 0 & 3 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right)
\left(\begin{array}{ccc} \cos \theta_2 & -\sin \theta_2 & 0 \\ \sin \theta_2 & \cos \theta_2 & 0 \\ 0 & 0 & 1\end{array}\right)
\left(\begin{array}{ccc} 1 & 0 & 2 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right)
\left(\begin{array}{ccc} \cos \theta_3 & -\sin \theta_3 & 0 \\ \sin \theta_3 & \cos \theta_3 & 0 \\ 0 & 0 & 1\end{array}\right)
\left(\begin{array}{ccc} 1 & 0 & 1 \\ 0 & 1 & 0 \\ 0 & 0 & 1\end{array}\right) $

The product is the affine transformation that takes a coordinate (in homogeneous coordinates) in the third arms frame (i.e. origin at third arm's tip, x coordinate axis parallel with the third arm) to the world frame.

d)

The intuitive dimension of the variety of states is 3.




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 $ x^2 + y^2 = 45 $ that are closest and farthest from $ (1, 2) $.

The function to optimize is $ (x - 1)^2 + (y - 2)^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, \lambda) = (x - 1)^2 + (y - 2)^2 - \lambda(x^2 + y^2 - 45) $.

The partial derivatives must be 0, therefore, we have

$ \begin{eqnarray*} \frac{\partial L}{\partial x} = 2(x - 1) - 2\lambda x &=& 0 \\ \frac{\partial L}{\partial y} = 2(y - 2) - 2\lambda y &=& 0 \\ x^2 + y^2 &=& 45 \end{eqnarray*} $

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(x - 1) - 2\lambda x = 0 \implies x(1-\lambda) = 1 $
$ 2(y - 2) - 2\lambda y = 0 \implies y(1-\lambda) = 2 $

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

$ \begin{eqnarray*} x^2 + y^2 &=& 45 \\ x^2 + (2x)^2 &=& 45 \\ 5x^2 &=& 45 \\ x &=& \pm 3 \\ y &=& \pm 6 \end{eqnarray*} $

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

Problem:


Solution:

The two trivial solutions for both odd and even powers are

$ x = 0 $, $ y = 1 $
$ x = 1 $, $ y = 0 $

The two more trivial solutions for only even powers are

$ x = 0 $, $ y = -1 $
$ x = -1 $, $ y = 0 $

Suppose we have a non-trivial solution in $ \mathbf{Q} $, suppose the answer is $ x = \frac{p}{q} $, $ y = \frac{r}{s} $, then we have

$ (\frac{p}{q})^n + (\frac{r}{s})^n = 1 $

 Multiply both side by $ q^ns^n $, we get a non-trivial solution for Fermat's last theorem.

$ (ps)^n + (rq)^n = (qs)^n $.

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

Problem:


Solution:

According to my proof for exercise 6 in section 1, we have proved the following fact.

If a polynomial vanish on the whole integer grid, it must be the zero polynomial.

Now it is easy to prove this with that fact. Suppose $ \mathbf{Z}^n $ is an affine variety, it must be written as a finite collection of polynomials. All of its polynomials must vanish on the integer grid, and therefore all of them must be zero polynomials, but then $ \mathbf{Z}^n $ does not contain non-integer points yet its polynomial must also vanish there as well, so we have reached a contradiction and that $ \mathbf{Z}^n $ is not an affine variety.

This problem also give us a nice corollary, we know any single point is an affine variety. Now we show that the infinite union of affine variety need not be an affine variety. (Although finite unions are)

Friday, December 4, 2015

Integral (2)

Problem:

$ \int{\sqrt{\frac{4 - x}{4 + x}}dx} $

Solution:

This one is not easy, I am thinking about this identity

$ \sqrt{\frac{1 - \sin \theta}{1 + \sin\theta}} = \frac{1-\tan \frac{\theta}{2}}{1+\tan \frac{\theta}{2}} $

Therefore I let $ x = 4 \sin \theta $, that gives $ dx = 4 \cos \theta d\theta $, the integral becomes

$ \begin{eqnarray*} &=& \int{\sqrt{\frac{4 - 4\sin\theta}{4 + 4\sin\theta}}4 \cos \theta d\theta} \\ &=& \int{2\sqrt{\frac{1 - \sin\theta}{1 + \sin\theta}}4 \cos \theta d\theta} \\ &=& \int{2\frac{1-\tan \frac{\theta}{2}}{1+\tan \frac{\theta}{2}}4 \cos \theta d\theta} \\ &=& \int{2\frac{1-\tan \frac{\theta}{2}}{1+\tan \frac{\theta}{2}}4 \frac{1-\tan^2 \frac{\theta}{2}}{1+\tan^2 \frac{\theta}{2}} d\theta} \end{eqnarray*} $

Now it is quite obvious that we should do the t - substitution

$ \begin{eqnarray*} t &=& \tan \frac{\theta}{2} \\ dt &=& \sec^2 \frac{\theta}{2} \frac{1}{2} d \theta\\ dt &=& (1 + t^2) \frac{1}{2} d \theta \\ d \theta &=& \frac{2tdt}{1 + t^2} \\ \end{eqnarray*} $

$ \begin{eqnarray*} & & \int{2\frac{1-\tan \frac{\theta}{2}}{1+\tan \frac{\theta}{2}}4 \frac{1-\tan^2 \frac{\theta}{2}}{1+\tan^2 \frac{\theta}{2}} d\theta} \\ &=& \int{2\frac{1-t}{1+t}4 \frac{1-t^2}{1+t^2} \frac{2tdt}{1 + t^2}} \\ &=& 8\int{\frac{1}{1+t^2} - \frac{2t}{(1 + t^2)^2}dt} \end{eqnarray*} $

The first term can be solved by substitute $ t = \tan \phi $, $ dt = \sec^2 \phi d\phi $

$ \begin{eqnarray*} & & \int{\frac{1}{1+t^2}dt} \\ &=&\int{\frac{1}{1+\tan^2 \phi}\sec^2 \phi d\phi} \\ &=&\int{\frac{1}{\sec^2 \phi}\sec^2 \phi d\phi} \\ &=&\int{d\phi} \\ &=&\phi \end{eqnarray*} $

The second term can be solved by substitute $ u = 1 + t^2 $, $ du = 2tdt $

$ \begin{eqnarray*} & & \int{\frac{2t}{(1 + t^2)^2}dt} \\ &=& \int{\frac{1}{u^2}du} \\ &=& \frac{-1}{u} \end{eqnarray*} $

Putting them together, we have

$ \begin{eqnarray*} & & \int{\sqrt{\frac{4 - x}{4 + x}}dx} \\ &=& 8\int{\frac{1}{1+t^2} - \frac{2t}{(1 + t^2)^2}dt} \\ &=& 8(\phi + \frac{1}{u}) \\ &=& 8(\phi + \frac{1}{1 + t^2}) \end{eqnarray*} $

Now we have $ t = \tan \phi, t = \tan \frac{\theta}{2} $, so we simply have $ \phi = \frac{\theta}{2} $

$ \begin{eqnarray*} & & 8(\frac{\theta}{2} + \frac{1}{1 + t^2}) \\ &=& 8(\frac{\theta}{2} + \frac{1}{1 + \tan^2 \frac{\theta}{2}}) \\ &=& 8(\frac{\theta}{2} + \frac{1}{\sec^2 \frac{\theta}{2}}) \\ &=& 8(\frac{\theta}{2} + \cos^2 \frac{\theta}{2}) \\ &=& 8(\frac{\theta}{2} + \frac{1 + \cos \theta}{2}) \\ &=& 4(\theta + 1 + \cos \theta) \end{eqnarray*} $

Now constant can be dropped for indefinite integral, and $ x = 4 \sin \theta $, so finally we have

$ \begin{eqnarray*} & & 4(\theta + \cos \theta) \\ &=& 4(\arcsin(\frac{x}{4}) + \cos \theta) \\ &=& 4(\arcsin(\frac{x}{4}) + \sqrt{1 - \sin^2 \theta}) \\ &=& 4(\arcsin(\frac{x}{4}) + \sqrt{1 - (\frac{x}{4})^2}) \end{eqnarray*} $

There we go, what a complicated problem!