In this earlier question I wrote:
Sir Harold Jeffreys wrote: $\dagger$
Consider the integrals $$ I_n = \int_{-1}^1 (1-x^2)^n \cos\alpha x \,dx. $$ Two integrations by parts give the recurrence relation $$ \alpha^2 I_n = 2n(2n-1) I_{n-1} - 4n(n-1) I_{n-2}, \qquad n\ge 2. $$
So I did the two integrations by parts and got $$ \frac{2n}{\alpha^2} \int_{-1}^1 \cos(\alpha x) (1-x^2)^{n-2}(1 - (2n-1) x^2) \, dx, $$ so I had to ascertain whether that was equal to the right side of the recurrence relation. That comes down to this: \begin{align} & (1-x^2)^{n-2}(1 - (2n-1) x^2) \\[6pt] = {} & (2n-1)\,\underbrace{(1-x^2)^{n-1}} {} - 2(n-1) \underbrace{(1-x^2)^{n-2}} \end{align}
As I said in that earlier question, here we use the set $\{ (1-x^2)^n : n=0,1,2,\ldots \}$ as a basis of the space of even polynomials.
$$ \left\{\begin{array}{l} \textbf{Note inspired by a comment below:} \\ \textbf{The QUESTION posed here is NOT} \\ \textbf{how to deal with this integral, and} \\ \textbf{appears BELOW, and can be understood} \\ \textbf{ONLY by reading what appears below.} \\ {} \\ \textbf{AND this question is NOT about THIS integral.} \end{array}\right. $$
As I did not say in that earlier question, I attempted to ascertain whether the equality holds before it occurred to me to express the function I got as a linear combination of the functions in that particular sequence. Despite the triviality of it, seemingly being a matter for routine secondary-school algebra, it was hairy and icky until I realized that expressing everything as a linear combination of these functions is what was how it should be done.
So now my somewhat vague question is whether, in the context of elementary sorts of integrals like this, there are OTHER instances of easily defined special functions whose employment instantly reveals a pattern without which the problem is hairy and with which it is straightforward and has a nice pattern? Just as there are tables of integrals, would it be worth making a table of such things?
$\dagger$ Scientific Inference, third edition, Cambridge University Press, 1973. Appendix III. If I'm not mistaken, this appendix does not appear in other editions.