online advertising

Wednesday, January 6, 2016

UTM Ideals Varieties and Algorithm - Chapter 1 Section 3 Exercise 16

Problem:




Solution:

Yet another very long question. We will just do it step-by-step.

Part (a)

I had fun with this one, I did complete the square, compute determinant or what not, but in fact this problem is trivial, just observe all the terms are actually positive.

$ (1 - t)^2 \ge 0 $
$ 2t(1 - t)w \ge 0 $
$ t^2 \ge 0 $

Therefore the denominator is always greater than or equal to 0.

We need just a little more. Notice the first and the third term cannot be simultaneously 0, so it follows the denominator never vanishes.

For part (b), it is obvious that $ (x, y) = (x_1, y_1) $ when $ t = 0 $ and $ (x, y) = (x_3, y_3) $ when $ t = 1 $, so it follows that two points are the beginning and the end of the curve, respectively.

Part (c) is complicated. Instead of messing with the algebra and eventually get to the same result. I simply used MATLAB to automate the differentiation. Here is the code I used to differentiate:

clear;
clc;
syms x1;
syms x2;
syms x3;
syms y1;
syms y2;
syms y3;
syms w;
syms t;
d = (1 - t)^2 + 2 * t * (1 - t) * w + t^2;
x =( (1 - t)^2 * x1 + 2 * t * (1 - t) * w * x2 + t^2* x3) / d;
y =( (1 - t)^2 * y1 + 2 * t * (1 - t) * w * y2 + t^2* y3) / d;
dx = diff(x, 't');
dy = diff(y, 't');
s1 = simplify(subs(dy/dx, t, 0))
s2 = simplify(subs(dy/dx, t, 1))

So we get the derivative at the endpoints as follow:

$ \begin{eqnarray*} \frac{dy}{dx}|_{t = 0} &=& \frac{-y_2+y_1}{-x_2+x_1} \\ \frac{dy}{dx}|_{t = 1} &=& -\frac{-y_2+y_3}{x_2-x_3} \end{eqnarray*} $



No comments:

Post a Comment