Some technical details about regular functions on quasiprojective varieties I have some confusion about some very basic notions in algebraic geometry.  I am using Shafarevich but I find the book to be pretty unclear at times.  
First, given a quasi projective variety $X$ over an algebraically closed field $\mathbb{k}$ (meaning $X$ is an open subset of a closed subset of projective space) when defining what it means for a function $f:X\to \mathbb{k}$ to be regular on $X$ is it the same thing to say "there are homogeneous polynomials $p$ and $q$ in $n+1$ variables of the same degree such that at every $x\in X$ we have $f(x) = p(x)/(q(x)$" and "about each point $x\in X$ there is an open neighborhood of $x$ in $X$ such that $f$ is the quotient of two homogenous polynomials in $n+1$ variables of the same degree"?  In other words I am asking if, in the Zariski topology, a function locally looks like a quotient of two rational functions must it globally look like a quotient of two rational functions?  This is obviously not true in the usual topology on $\mathbb{C}$ for example but I am confused about the case of the Zariski topology.
Something else I am confused about is the following.  If we have a regular function $f$ on a quasiprojective variety $X$ then the set $X - Z(f)$ is an affine variety.  This I understand.  But it is stated in Shafarevich that that the ring of regular functions on $X-Z(F)$ is the ring of regular functions of $X$ adjoin $\frac{1}{f}$.  It is clear that this is contained in the ring of regular functions, but I don't understand how we know that this is the entire ring.  
 A: For your first question, if $X$ is affine, then $f$ can be seen globally as a polynomial. I believe Shafarevich proves this. 
If $X$ is an irreducible quasiprojective in general, let $f=p/q$ locally at a point $x$, for $p$ and $q$ polynomials. If $y\in X$, let $f=r/s$ at $y$. Define
$$Y=\{z\in X:p(z)s(z)-q(z)r(z)=0\}.$$
This is a closed subset of $X$ (since the equation above is homogeneous and can be seen as defining a projective variety which we then intersect with $X$). Moreover, since $f=p/q$ (likewise with $f=r/s$) on an open (and therefore dense) subset of $X$, we see that this closed set contains a dense open set of $X$. Therefore $X=Y$.
Conclusion: You can define $f$ as $p/q$ wherever $q\neq0$. If $q(z)=0$ for some $z$, then you need another representation for $f$ at $z$.
Example: Take $X=\{x^2+y^2-1=0\}\subseteq\mathbb{A}^2$ and $f(x)=x^2/(y^2-1)$. $f$ could possibly have a pole at $y=\pm1$, but when we use the identity $y^2-1=-x^2$, we see that $f(x)$ is actually the constant function $-1$. This is a very boring example but it gets the point across.
For your second question, take a look at Lemma 2 in the section of Quasiprojective Varieties. First assume that $X$ is affine. The equations that Shafarevich finds for the affine variety $X-Z(f)$ are basically the equations for $X$, except that you can replace $T_{n+1}$ by $f$. Try to write the coordinate ring using this, and then see if you can generalize this to an arbitrary quasiprojective variety. 
