What are some common pitfalls when squaring both sides of an equation? Squaring both sides of the equation $x=-\sqrt{y+1}$ leads to an equation that has more solutions than the original equation. 
When can we be sure that squaring both sides will result in the same solution set? What operations on both sides are "safe"(such as addition) and which ones are "not safe"(such as squaring or taking the root of both sides)?
As a side point, I don't remember encountering this pitfall in basic algebra. Is there any specific literature I can consult for a more in-depth treatment of equations?
 A: Briefly, it's "safe" to apply an injective (one-to-one) function whose domain is $\mathbb{R}$ to both sides of an equation. This condition is generally too strong, see below, but I think it properly addresses the original question.
In more detail, say your original equation has the form $A=B$, in which $A$ and $B$ are (for simplicity, real-valued) expressions in one or more variables. After transformation, your equation has the form $f(A)=f(B)$ for some function $f$. The question is: "When is the solution set of $f(A)=f(B)$ identical to that of $A=B$?" Injectivity, by definition, means that "$f(A)=f(B)$ implies $A=B$". (The converse implication is built into the definition of a function.)
In the original question, $f$ was "squaring", $f(A)=A^2$, which of course is not injective on $\mathbb{R}$. "Safe" choices of $f$ might represent adding an expression, multiplying by a non-zero expression, extracting an odd root, or exponentiation.
Once this idea makes sense, it's easy to extend. For example, if you know that $A$ and $B$ represent positive real numbers for all values of the variables, it's "safe" to take (real) logarithms or (non-negative) square roots of both sides. If you know $|A|$ and $|B|$ are no larger than $\pi/2$, it's "safe" to take the sine of both sides, etc., etc.
Two tangential remarks:


*

*One reason increasing functions are useful is that they preserve inequalities: $A<B$ if and only if $f(A)<f(B)$. Similar statements for decreasing and non-decreasing functions are left as an exercise.

*Over the complex numbers, exponentiation isn't injective, so log has branches, which leads to all manner of fun. My favorite example (found by a classmate many years ago) is this short "proof":
$$e^z = (e^{2\pi i})^{z/2\pi i} = 1^{z/2\pi i} = 1\quad\text{for all complex $z$}.$$
A: Why would squaring both sides lead to more solutions? It is not true. If your solution set is a subset of the real numbers, then $y + 1 \geq 0$. As you are solving for $y$, some potential solution may not satisfy the constraint $y \geq -1$. Overall, whenever you are squaring both sides, taking the logarithm of both sides, etc. you must satisfy certain constraints. Moreover, when you divide, you must make sure that you are not dividing by zero nor losing a root, e.g., $x(x + 1) = 0$ has one more solution than $x + 1 = 0$. Furthermore, if the right-hand side is nonnegative, then squaring both sides will not introduce any "fictitious" solutions. Both solution sets will be identical. I hope this answers your question.
A: You could refer to the book Elementary Mathematics by Dorofeev, Potapov and Rozov. It has a beautiful explanation as to what happens whilst squaring and also ways in which we allow more solutions than those of the original set.
