It is sometimes much easier to solve a general problem than a particular one. What are good examples in mathematics that are difficult to solve but solved successfully by solving more general ones?

For what it's worth, here's a trivial one: when explaining induction to students, I sometimes stress that it might be easier to prove a stronger result by induction than a weaker oneyou're trying to get more out, but you're putting more in. As a concrete example I note that proving that the sum of the first 100 odd numbers is a square sounds like it might be tricky, proving that the sum of the first $n$ odd numbers is a square for all $n\geq1$ sounds like it might be accessible using induction but in fact it still too weak, and proving that the sum of the first $n$ odd numbers is $n^2$ is really rather easy to prove. In some sense the stronger the statements get, the easier they become. 


Another way of proving that something is nonzero is to prove that it is odd. One good example of that idea is the proof of Sperner's lemma More generally, one can prove that something is nonzero by proving that it is nonzero mod p. That is the idea used in ChevalleyWarning theorem (one proves that the number of solutions is 0 mod p, then proves there is a trivial solution), and in the proof of Cauchy's theorem. 


Frequently in mathematics the best way to determine the value of a sequence at a particular index is to compute its value at every index, even though the latter seems on the surface like a harder problem. Here is one of my favorite examples of this phenomenon. Suppose you want to know how many vectors of a particular norm there are in some lattice $L$. On the surface, this seems like a hard problem  it involves figuring out how many times some quadratic form takes some value. One can solve this problem by solving the harder problem of determining the answer for every possible norm by writing down the theta function $$\Theta_L(\tau) = \sum_{v \in L} e^{\pi i \tau \left< v, v \right>}.$$ If $L$ satisfies certain technical properties, $\Theta_L$ is a modular form with respect to some congruence subgroup, and modular forms live in finitedimensional vector spaces; moreover, a lot is known about how to write down modular forms. For example, the theta function of the $E_8$ lattice is a modular form of weight $4$ and level $1$. The space of such forms is onedimensional  in fact, it's spanned by an Eisenstein series  and it then follows that $$\Theta_{E_8}(\tau) = 1 + 240 \sum_{n \ge 1} \sigma_3(n) q^n$$ where $q = e^{2\pi i \tau}$. Similar considerations lead to the wellknown formulas for the number of ways to represent an integer as the sum of two or four squares. 


Cantor proved the existence of transcendental real numbers by proving that most numbers are transcendental. The set of algebraic real numbers is countable. 


Some of the previous answers have said that sometimes the easiest way to prove a set it nonempty is to show that it's large or even infinite. A variation on that idea is to show that something exists by showing that the probability of selecting it at random from some larger set is positive. As one of my professors used to say, some things are so hard to find that the best way to look for them is at random. 


The only way to prove that there's at least one prime in every arithmetic progression is by proving that there are infinitely many primes in every arithmetic progression. This is intuitively a fairly tremendous jump in difficulty to get the initial rather modest result out. I imagine that most examples of this phenomenon take the form that the question as asked is "more difficult" only in the sense that it's been phrased in such a way as to mask what's "really going on." I think this is probably at the core of hundreds and thousands of problemsolving type puzzles  the difficulty of the puzzle comes from masking the influence of the governing theorem, which is likely to be easier to see how to prove in its general form than it is to realize which parts of the puzzle are the important ones. In short, puzzles have red herrings, good theorems do not. 


This might not be correctperhaps someone can confirmbut I was once told (when I was a graduate student) that the way that Leopoldt's conjecture was proved for abelian number fields was as follows: first do the standard reduction to show that Leopoldt is true if certain special values of certain $p$adic $L$functions $L(1,\chi)$ are nonzero, and then prove that these numbers are nonzero by showing that they are transcendental! As I say, I don't know for sure if this is true, but my source was pretty reliable. The emphasis was on the observation that (at the time at least), apparently the only way of proving the numbers were nonzero was by showing they were transcendental. 


Occasionally when trying to prove a certain type of object exists, it is easier to show that the set of those objects is very large. For instance, it's difficult to give an example of a transcendental number over the rationals. However, it is quite easy to show that the set of algebraic numbers is only countably infinite, so almost every real number is transcendental. 


Matijasevic's theorem, that all recursively enumerable sets are diophantine, was needed to prove that the set of primes is diophantine. 


It is easier to prove that almost all real numbers are normal than to prove that any particular real number is normal. Indeed, none of the most natural candidates, such as $\sqrt{2}$, $\pi$ or $e$, has yet been proved normal. 


Proving the general solution for lambert series is much easier than dealing with specific examples c.f. Apostol  Modular Functions and Dirichlet Series in Number Theory ch. 1 Ex. 14. 


I believe Fermat's Last Problem was solved by proving the Modularity Theorem (for the case of semistable elliptic curves), but I don't know the proof enough to say if the problem is just a direct corollary. The Modularity theorem is not in any sense easy anyway, but at least it's been proved successfully. :) 


The Carlson Lemmas in combinatorics. He told me at the time that he had struggled with the simple and natural way the problem was originally posed, but was able to push through a far more elaborate, stronger, and much less intuitive version. Timothy J. Carlson A dual form of Ramsey's theorem, (with S. Simpson) Advances in Mathematics 53 (1984), pp. 265290. Some unifying principles in Ramsey theory, Discrete Mathematics Volume 68 , Issue 23, (February 1988), Pages: 117  169 


The generating function proof of Cayley's theorem counting labeled trees (e.g., the theorem that there are $n^{n2}$ labeled trees on $n$ vertices) is a good example. In the lecture notes I linked to, the more general question is Theorem 1 and the particular question is Corollary 1. 


There are perhaps many examples found in inequalities because a given inequality with a mass of variables and functions can easily hide "Simple Inequality" of which it is a special case. 

