We say that $f:\mathbb{R}\to\mathbb{R}$ is of **Baire Class $1$** if it is a pointwise limit of a sequence of continuous functions.

One can generalize the definition above by taking pointwise limit of each 'previous' level(s) to obtain 'next' level. More precisely,

For any countable ordinal $\xi\geq 1,$ we say that $f:\mathbb{R}\to\mathbb{R}$ is of

Baire Class $\xi$if it is a pointwise limit of a sequence of Baire Class $\zeta$ functions where $\zeta<\xi.$

The generalization covers the case $\xi=1$ as every continuous function is of Baire Class $0.$

When $\xi = 2,$ it is well-known that $\chi_\mathbb{Q}$ is of Baire Class $2$ as it is a pointwise limit of $(g_n)_{n=1}^\infty$ where $g_n(x) = \max\{0,1-n d(x,K)\}$ and $K$ is a finite collection of rationals. (extracted from Wiki) Since $\chi_\mathbb{Q}$ is discontinuous everywhere, so it is not of Baire Class $1.$

This MSE post also contains other Baire Class $2$ functions.

However, I fail to obtain any Baire Class $3$ function and above.

Question: For each countable ordinal $\xi\geq 3,$ what are some examples of Baire Class $\xi+1$ but not $\xi$ function by using the pointwise limit definition?

A Second Course on Real Functions. This part of the book is essentially about showing that $\mathscr B_{\xi+1} \setminus \mathscr B_\xi$ is none-empty for a countable ordinal $\xi$. $\endgroup$ – Martin Sleziak May 31 '18 at 10:28On Borel measures and Baire's class$3$ (proof on pp. 310-311) for a "naturally occurring" Baire $3$ function that is not Baire $2$, and see my comments in this 14 May 2009 sci.math post. $\endgroup$ – Dave L Renfro Jun 1 '18 at 8:29