Hard problems solving tricks I'm a math student (last year undergraduate) and I really enjoy solving math problems but sometimes I face problems that I don't see how to solve even after trying every idea I had. When I look up at the solution I understand it perfectly but I can't figure out how the author actually found his solution. Their thinking process is never explained.
Let me take an example:

Let $P \in \Bbb R[X]$. Show that if $\forall x \in [0,1], P(x) \ge 0$ then $\exists A,B,C,D \in \Bbb R[X], P=A^2+XB^2+(1-X)C^2+X(1-X)D^2$.

What I've done:

*

*I tried to look at some special cases ($\deg P = 0,1,2$).

*tried to see if there is a structure behind this (by introducing $E= \{A^2+XB^2+(1-X)C^2+X(1-X)D^2 \ | \ A,B,C,D \in \Bbb R[X]  \}$ and looking if $E$ is stable by product) but this was hard.

*tried to reinforce the hypothesis by assuming $P \ge 0$, this worked well because I remembered another problem I solved ($P\ge 0 \implies \exists A,B \in \Bbb R[X], P=A^2 + XB^2$). I tried to adapt the proof (what I already tried previously) but it didn't help.

*tried to use coefficients (really bad idea here).

*tried Lagrange interpolation (not helpful either).

I posted this problem here and @orangeskid advised me to show that, in fact, $P(x)= A^2(x) + x(1-x)D^2(x)$ ie. we could let $B=C=0$, it was a very good hint. Even in a parallel world I'd never have thought of doing so. But why didn't I think of doing this? I don't know, it wasn't obvious for me or maybe I don't see far enough.
Another example:

Let $A, B \in \Bbb Z[X]$ such that $(\gcd(A(n), B(n)))_n$ is periodic. What can we say about $A$ and $B$?

What I tried:

*

*I supposed that $\deg A = \deg B = 1$ even with that $\gcd(A(n),B(n))$ is something that scares me because I don't have a lot of intuition on this sequence. So I applied, Bézout's theorem which says that we can find two sequences $a_n,b_n$ such that $(a_n A(n) + b_n B(n))_n$ is periodic.
And I got stuck here.

I saw a solution here using the resultant of two polynomials, something I never heard of.
There are other examples here, here and here: they all need a little trick, something close to magic (is that cleverness?).
So my questions are how could I find these tricks myself and make them natural? Why the origin of these tricks isn't explained? Should I just learn them "on the job"? Should I be worried (as a student in mathematics) if I don't see them? Thanks for your time!
 A: I think that a typical situation of a working mathematician is described by Nicholas Bourbaki, who said that “the mathematician does not work like a machine, nor as the workingman on a moving belt; we can not over-emphasize the fundamental role played in his research by a special intuition, which is not the popular sense-intuition, but rather a kind of direct divination (ahead of all reasoning) of the normal behavior, which he seems to have the right to expect of mathematical beings, with whom a long acquintance has made him as familiar as with the beings of the real world”.
This vision should be helpful to solve the most of usual problems.
The base of a general method of hard problem solving is sketched in a book “Mathematical discovery: on understanding, learning and teaching” by George Polya.

Should I just learn them "on the job"?

I think this is a usual way.

Why the origin of these tricks isn't explained?

I think there is no need for that. Also there is no need to memorize tons of tricks, because they come naturally, when you have knowledge. I think a trick usually emerges while thinking on the problem. I recommend Chapters 10–12 of Polya’s book for details.

how could I find these tricks myself and make them natural?

I can add to the above a few finding hints. Try to see a problem from different points of view, search familiar elements in the problem. Return to the problem time after time.

Should I be worried (as a student in mathematics) if I don't see them?

I think that although there can be specific mind problems blocking trick vision, usually a student in mathematics should not be worried about that. Leonardo da Vinci said: “There are three classes of people: those who see, those who see when they are shown, those who do not see”. A problem solver sometimes sees some tricks. More advanced see more, less advanced see less. But trick vision often requires a luck and even a very good problem solver can miss a simple trick.

Is there a book that lists some of them

I think a source for the tricks should be not a list but a general mathematical knowledge. Remark that “Mathematical quickies” by Charles Trigg is a collection of problems with tricky solutions.
A: I've thought a lot about my questions and I think I've found my answer.
The source of my problem is the existence of proofs that aren't natural (to me), and this disturbed me. By natural I mean whose main idea is obvious, or could be found with a little bit of work (on special cases, with a drawing, etc.) or by using a few elementary results of the courses for a student. For example showing that if $u_n \to l$ and $v_n \to l'$ then $u_n + v_n \to l+l'$ is natural. So a proof that is natural (to me) is one that starts from the hypothesis and arrive at the conclusion without using an idea that is far to see from the hypotheses. For example, I don't know natural proofs of the fundamental theorem of algebra or the Schröder-Bernstein theorem. They both use some kind of trick.
I was too accustomed to courses in which one proposal led to another in a quick and smooth way. And I think that I never actually realized that math isn't hard, it's very hard. Tricks are the witness of this. Most courses are designed not to scare students too much (e.g. when something is difficult to prove, we admit it, etc.).
