Experienced mathematicians simplifying messy algebra $$\frac{pa}{n}\left(p\frac{a-1}{N-1}+q\frac{b+1}{N+1}\right)+p\left(1-\frac{a}{N}\right)\left(\frac{pa}{N-1}+\frac{qb}{N+1}\right)+\frac{qb}{N}\left(p\frac{a+1}{N+1}+q\frac{b-1}{N-1}\right)+q\left(1-\frac{b}{N}\right)\left(\frac{pa}{N+1}+\frac{qb}{N-1}\right)=\frac{(p+q)(pa+qb)}{N}$$
The ways people with different experience in math simplify algebra ranges massively. It is something assumed trivial, so any techniques or tricks in doing so are only found by finding them yourself. Any googling will land you at an elementary school homepage.
As a first year, my attempt at the above simplification was to set denominators equal, which made for two pages of tedious workings. I would be very interested in hearing how people with more experience in math than myself would approach this simplification, or other daunting simplifications in general.
To prevent this question being too broad, I also asked my professor what he would do, he suggested that I "factorise groups of terms which had obvious common factors". The meaning of these words independently is obvious, but could somebody explain the better approach he is alluding to, as I can only see approaches equivalent to matching denominators?
 A: I'm not sure there's all that many tricks.  What I would do, however, is simply get rid of the denominators by multiplying the whole shebang by $N(N- 1)(N + 1)$.
A: Looking for patterns, and careful use of variable substitutions, can help.
For instance, the LHS has the obvious common denominator $N(N-1)(N+1)$.  We can then let $x = N-1$ and $y = N+1$.  Also, note that $a$ and $b$ never appear alone, but always multiplied by $p$ and $q$, respectively.  This suggests letting $c = pa$ and $d = qb$.  We then obtain as the LHS numerator
$$c((c-p)y + (d+q)x) + (Np-c)(cy+dx) + d((c+p)x + (d-q)y) + (Nq-d)(cx + dy).$$  Multiplying everything out results in cancellations:
$$(\color{red}{c^2 y} - cpy + \color{blue}{cdx} + cqx) + (Ncpy + Ndpx - \color{red}{c^2 y} - \color{blue}{cdx}) + (\color{blue}{cdx} + dpx + \color{green}{d^2 y} - dqy) + (Ncqx + Ndqy - \color{blue}{cdx} - \color{green}{d^2 y}). $$  Then factoring the remaining terms yields
$$\begin{align}
(N-1)cpy &+ (N+1)dpx + (N-1)dqy + (N+1)cqx  \\
&= cpxy + dpxy + dqxy + cqxy \\
&= xy(c+d)(p+q) \\
&= (N-1)(N+1)(pa + qb)(p + q)
\end{align}$$
and the result follows.

I think a common theme when dealing with reasonably symmetric expressions like these is to take sub-expressions that occur more than once, assign a variable to these, and break the simplification task into smaller parts.  Of course, when the expression is not symmetric, or doesn't have "nice" features, it becomes much more tedious to simplify, and there is no real trick to it other than to go through it mechanically.  But if you're taking pages of work to simplify this one, I would say that you're not doing it efficiently.
A: $$\frac{pa}{N}\left(p\frac{a-1}{N-1}+q\frac{b+1}{N+1}\right)+p\left(1-\frac{a}{N}\right)\left(\frac{pa}{N-1}+\frac{qb}{N+1}\right)+\frac{qb}{N}\left(p\frac{a+1}{N+1}+q\frac{b-1}{N-1}\right)+q\left(1-\frac{b}{N}\right)\left(\frac{pa}{N+1}+\frac{qb}{N-1}\right)= \\
\frac{pa}{N}\left(\frac{pa}{N-1} -\frac{p}{N-1}+\frac{qb}{N+1} + \frac{q}{N+1}\right)+\left(p-\frac{pa}{N}\right)\left(\frac{pa}{N-1}+\frac{qb}{N+1}\right)+\frac{qb}{N}\left(\frac{pa}{N+1}+\frac{p}{N+1}+\frac{qb}{N-1} - \frac{q}{N-1}\right)+\left(q-\frac{qb}{N}\right)\left(\frac{pa}{N+1}+\frac{qb}{N-1}\right)$$
So what I did so far: I just broke the terms with $a+1,a-1,b+1,b-1$ in two parts,one with the letter and one with the $1$. Note that this way i can simplify the minus terms in the second and fourth parentheses with those in the first and third respectively. Which gives:
$$   \frac{pa}{N}\left(-\frac{p}{N-1}+ \frac{q}{N+1}\right)+p\left(\frac{pa}{N-1}+\frac{qb}{N+1}\right)+\frac{qb}{N}\left(+\frac{p}{N+1}- \frac{q}{N-1}\right)+q\left(\frac{pa}{N+1}+\frac{qb}{N-1}\right)$$
Now, I would like to have $\frac{1}{N}$ outside so:
$$   \frac{1}{N}\left[pa\left(-\frac{p}{N-1}+ \frac{q}{N+1}\right)+pN\left(\frac{pa}{N-1}+\frac{qb}{N+1}\right)+qb\left(+\frac{p}{N+1}- \frac{q}{N-1}\right)+qN\left(\frac{pa}{N+1}+\frac{qb}{N-1}\right)\right]$$
Now if you observe carefully you may see that the $N-1,N+1$ will go away but to make it more clear:
$$ \frac{1}{N}\left[pa\left(-\frac{p}{N-1}\right)+ pa\left(\frac{q}{N+1}\right)+pN\left(\frac{pa}{N-1}\right) +pN\left(\frac{qb}{N+1}\right)+qb\left(+\frac{p}{N+1}\right)- qb\left(\frac{q}{N-1}\right)+qN\left(\frac{pa}{N+1}\right)+qN\left(\frac{qb}{N-1}\right)\right]$$
Now pair the first term with the third and we get $p^2a$, the second with the seventh and we get $qpa$, the fourth with the fifth and we get $qpb$ and
the sixth with the eighth and we get $q^2b$. Putting it all together:
$$\frac{1}{N}(p^2a + qpa + qpb + q^2b) = \\
 \frac{1}{N}[pa(p + q) + qb(p + q)] = \\
\frac{(pa+qb)(p + q)}{N}$$
