A lot of confusion in the "Polynomial Remainder Theorem"? Lately I've been reading about Polynomial Remainder Theorem from various sources, mainly from the wikipedea article, this post and some high school books. Wikipedea says that if we divide a polynomial $f(x)$ with another polynomial $g(x)$ then
$$f(x)=q(x)g(x) + r(x)\quad \text{and}\quad r(x) =0 \; \text{or}\; \deg(r)<\deg(g)\ \tag{1}$$

*

*Why is the expression for $q(x)$ same for all values of $x$? E.g. suppose $f(x) = x^3 - 12x^2 - 42$ and $g(x) = x-3$ then $q(x)$ might be of form $q(x)=ax^n+bx^{n-1}+cx^{n-2} \cdots$ . For whatever reason the following relation is true,
$$f(x) = x^3 - 12x^2 - 42 = (x-3)(x^2+15x)+3$$
Here why is $a=1$, $b=15$, $c=0$ and $n=2$ always true irrespective of the values $x$ take?


*Why is $\deg(r)$ always less than $\deg(q)$? As far as I know things are equivalent to usual Euclid's division, $|r(x)|<|g(x)|$. Now it might be that for any polynomial $r(x)$ to be less than another polynomial $g(x)$, $r(x)'s$ degree has to be less than that of $(g(x)'s$ -- but I don't know why is this true or how I can prove it.


*What is the logic behind long division? Why do we keep on taking the reminder in each step? E.g. while dividing $x^3 - 12x^2 - 42$ with $(x-3)$ why is in first step quotient is $x^2$, why not just $x$, why always choose the maximum possible value?
This was about the confusions related to the definition. It is said that in equation $1$ if $g(x)=(x-a)$ then $f(a)=r$, because of $$f(x)=q(x)(x-a) + r \tag{2}$$
But why is equation $2$ true for $x=a$? Here $g(a)=0$ so we can't just perform the Euclid division over $f(x)$. Moreover the expression for equation $2$ with $g(x)$ being $0$ must be something like
$$f(x)=0 q(x)+f(x)$$
That is the reminder should be $f(x)$ itself. Most of the answers on the similar question say that we aren't actually dividing by $0$, we are just figuring out an algebraic identity of sort, $f(x)=(x-a)q(x)+r$. I agree that if we actually multiply $(x-a)$ with $q(x)$ and then add $r$ to it to observe that the identity holds then $f(a)=r$, but what we actually do is Euclid division to find out $q(x)$, which we can't do because we can't divide with $0$. But then I don't understand why does the value of $q(x)$ found with Euclid division under the condition of $x\neq a$ is same as the value found by trial and error by actually multiplying with guessed values of $q(x)$ with $x-a$.
Another answer says equation $2$ is true for $x=a$ because the following relation holds,
$$\begin{eqnarray} f'(a) &=\,& \dfrac{f(x)-f(a)}{x-a}\Bigg|_{\large\, x\,=\,a}\\ \\ {\rm i.e.}\ \ \ f'(a) &=\,& q(a)\ \ {\rm where}\ \ f(x)-f(a) = q(x)(x-a)\end{eqnarray}$$
As far as I know he/she is using the Maan Value Theorem by substituting $x$ for $b$ in the standard equation,
$$ f'(c) = \frac{f(b) - f(a)}{b-a}$$
Where $x,c \to a$, but we can't take $x=c=b$. So equation (1) might be true for $x \to a$ but not for $x=a$.
 A: First bullet:
This important theorem is about polynomials, not general functions, so it only involves polynomials. A polynomial is by definition a sum of constant coefficients times an integer power of the variable. So the expression of $q(x)$ does not depend on $x$ just because the theorem is looking for a polynomial, it is a "design" choice.
Polynomials follow arithmetic laws that conserve them: the sum, difference or product of two polynomials is also a polynomial. The quotient of two polynomials is not a polynomial, in general.
Second bullet:
You can't simply compare polynomials like $p(x)<q(x)$, because the outcome of the comparison could depend on $x$. On the other hand, you can compare the degrees of polynomials.
The Remainder Theorem indeed tries to mimic Euclid's algorithm and find the smallest possible residue. It turns out that the smallest residue polynomial can always be of degree inferior to that of the divisor ($\deg(r)<\deg(g)$). 
The reason is easily understood: if the residue is of degree $g$ or more, it is possible to cancel its leading term by subtracting the divisor multiplied by an appropriate monomial. In other words, if the residue has degree $g$ or more, we can lower its degree, and repeat until the degree has become less than $g$.
For example, assuming a residue $x^3-12x^2-42$ and a divisor $x^2-3$, we can subtract $x$ times $x^2-3$, i.e. $x^3-3x$, and get the residue $-12x^2+3x-42$. The operation can be iterated once and will yield a first degree polynomial.
Third bullet:
The rationale of the remainder theorem is that you want to find how many "times" the divisor can be found in the dividend. This "times" is indeed another polynomial, and you are trying to factor the dividend as $f(x)=q(x)g(x)$; in general this is not possible, there is a remainder $r(x)=f(x)-q(x)g(x)$, but you want to make it as small as possible.
The procedure works by building the quotient polynomial $q(x)$ term by term, from the highest to the lowest degree. Every time you add a term, you get a smaller residue, until you reach the smallest possible residue.
The basic step has already been evoked above: take $r(x)$, and subtract the divisor multiplied by the monomial that will cancel its leading term. This yields another residue $r'(x)$ of a smaller degree. Repeat until this is no more possible.
Final remarks:
When the divisor is a binomial $x-a$, the formulas are very simple. You are invited to retrieve them by working out a complete division.
The Polynomial Remainder Theorem gives you another important clue: for given $f$ and $g$, the quotient and remainder polynomials $q$ and $r$ (with $\deg(r)<\deg(g)$) are uniquely determined, there is no other possibility.
A: Let's forget the word "division" for a moment.
The claim is that if $f$ and $g$ are polynomials in one variable (i.e., in one indeterminate) with coefficients in a field (e.g., with rational coefficients), and if $g$ is not the zero polynomial, then there exist unique polynomials $q$ and $r$, with $\deg r < \deg g$, such that
$$
f = qg + r.
$$
The preceding equation expresses equality of polynomials as abstract algebraic entities. If you're working with coefficients in a field of characteristic zero (e.g., rational, real, or complex coefficients), it's safe to reformulate the preceding in terms of values of polynomial functions:
$$
f(x) = q(x) g(x) + r(x)
  \quad\text{for all $x$.}
\tag{1}
$$
The discussion below uses "function value" language.
Uniqueness is easy: if
$$
q_{1}(x) g(x) + r_{1}(x)
  = f(x)
  = q_{2}(x) g(x) + r_{2}(x)
  \quad\text{for all $x$,}
$$
then $\bigl(q_{1}(x) - q_{2}(x)\bigr) g(x) = r_{2}(x) - r_{1}(x)$. Since the left-hand side is a polynomial multiple of $g$ (hence is either $0$ for all $x$, or is a polynomial of degree at least $\deg g$) and the right-hand side is a polynomial of degree strictly smaller than $\deg g$, each side must be $0$. That is, $q_{1}(x) = q_{2}(x)$ for all $x$, and $r_{1}(x) = r_{2}(x)$ for all $x$.
One proof of existence proceeds by successive subtraction of (polynomial multiples of) $g$ from $f$: The preceding conclusion may be written
$$
f(x) - q(x) g(x) = r(x)
  \quad\text{for all $x$,}
$$
in which case it's clear the goal is "to subtract a polynomial multiple of $g$ from $f$, obtaining a polynomial of degree strictly smaller than $\deg g$".
To illustrate the main idea, consider the example
$$
f(x) = x^{3} - 12x^{2} - 42,\quad
g(x) = x - 3.
$$
The "game" will be to subtract successive monomial multiples of $g$ from $f$ with the goal of reducing the degree of the difference at each step.
To that end, focus on the highest-degree term of each: $f(x) = x^{3} + \cdots$ and $g(x) = x + \cdots$. Since $x^{3} = x^{2} \cdot x$, we're led to consider
\begin{align*}
f(x) - x^{2}g(x)
  &= x^{3} - 12x^{2} - 42 - x^{2}(x - 3) \\
  &= -9x^{2} - 42.
\end{align*}
Since $\deg (-9x^{2} - 42) = 2 < 3 = \deg f$, we've succeeded in writing $f$ as a polynomial multiple of $g$ plus a remainder of degree smaller than $\deg f$ [sic., not $\deg g$]. Note that the preceding holds for all $x$.
Continue in this vein. By similar consideration of the highest-degree terms, $-9x^{2} = -9x\cdot x$, we're led to write
\begin{align*}
\bigl[f(x) - x^{2}g(x)\bigr] - (-9x)\, g(x)
  &= \bigl[-9x^{2} - 42\bigr] + 9x(x - 3) \\
  &= -27x - 42.
\end{align*}
Combining the two preceding steps, we have
$$
f(x) - (x^{2} - 9x)\, g(x) = -27x - 42\quad\text{for all $x$.}
$$
The remainder still has degree greater than or equal to the degree of $g$, so we can perform another step, obtaining
$$
f(x) - (x^{2} - 9x - 27)\, g(x) = -123\quad\text{for all $x$.}
$$
Here the process ends: Since $\deg(-123) = 0 < \deg g$, we cannot reduce the degree of the remainder further by subtracting monomial multiples of $g$. We have established a decomposition of the form (1) in this example:
$$
f(x) - \underbrace{(x^{2} - 9x - 27)}_{q(x)}\, g(x) = \underbrace{-123}_{r(x)}\quad\text{for all $x$.}
$$
The close analogy with Euclid's algorithm should be clear. The customary "polynomial long division" notation expresses this process more concisely.

Writing out a general proof is straightforward. The key technical step is the following observation: If $f(x) = a_{n}x^{n} + a_{n-1}x^{n-1} + \cdots$ is a polynomial of degree $n$ (i.e., if $a_{n} \neq 0$), if $g(x) = b_{m} x^{m} + b_{m-1}x^{m-1} + \cdots$ has degree $m$ (i.e., if $b_{m} \neq 0$), and if $\deg g = m \leq n = \deg f$ (i.e., if we do not already have a "remainder" of degree smaller than $\deg g$), then
$$
f(x) - \frac{a_{n}}{b_{m}} x^{n - m}\, g(x)
  = \underbrace{\left(a_{n} - \frac{a_{n}}{b_{m}}\, b_{m}\right)}_{= 0} x^{n}
  + \left(a_{n-1} - \frac{a_{n}}{b_{m}}\, b_{m-1}\right) x^{n-1} + \cdots
$$
has degree at most $n - 1$. (The second coefficient in parentheses might be zero, so the degree of this "partial remainder" might be strictly smaller than $n - 1$.)
Now do induction on the following statement $P_{n}$:

If $f$ is a polynomial of degree an most $n$ in one variable, and if $g$ is a polynomial in one variable, there exist polynomials $q$ and $r$ such that $f(x) = q(x) g(x) + r(x)$ and $\deg r < \deg g$.

As base case, the induction starts with constant polynomials, for which the conclusion is obvious.
The "key technical step" above shows that if $\deg f = k + 1$, then $f$ may be written as a monomial multiple of $g$ plus a polynomial of degree at most $k$, to which the inductive hypothesis may be applied.
A: I think this comment of yours is the heart of your problem.

I can solve any question on long division, be it for numbers or
  polynomials. But I do not understand the logic behind long division. I
  know how the algorithm works but I don't know why it works. 

Once you understand that, you should be able to answer the rest of your questions.
I could write my explanation for why the long division algorithm works - but it might not suit your learning style. There are many explanations on the web. I searched

why does the long division algorithm work

and found several useful websites. This one might help you: http://www.mathpath.org/Algor/algor.long.div.htm
One  with somewhat more rigor and explanation is
http://www.math.hawaii.edu/~lee/courses/Division.pdf.
Understanding the long division algorithm really comes down to understanding base 10 notation - the fact that $234$ is shorthand for
$$2\times 10^2 + 3 \times 10^1 + 4 \times 10^0$$.
Then you can think of the polynomial $2x^2 + 3x + 4$ as a thing written in base $x$. I won't call that thing a number, since it isn't, since $x$ is just a symbol to keep track of when you do polynomial arithmetic. So once you understand the base 10 algorithms you can transfer that understanding to the base $x$ arithmetic of polynomials. In fact the polynomial arithmetic is easier, since there's no carrying or borrowing from one column to another.
