## 3 High Gain FEL Equations and Harmonic Generation  
In this section we discuss the mechanism of harmonic generation in \(FEL\) devices, which is a process \"naturally\" associated with the evolution of the fundemental harmonic. The importance of these further contributions in developing tools extending the capabilities of \(FEL\)s was soon recognized in the community, but the practical implementations took some time. The pendulum equations, including the higher order harmonics, can be written as (differently from the index \(n\) in the perturbative terms discussed in Equation (11); in this case \(n\) is just the order of the harmonic) [38]  
\[ \begin{split}\frac{d^{2}}{d\tau^{2}}\zeta&=\sum_{n=0 }^{\infty}\mid a_{n}\mid\cos(\psi_{n}),\hskip 42.679134 pt\psi_{n}=n\zeta+ \phi_{n},\\ \frac{d}{d\tau}a_{n}&=-j_{n}\langle e^{-in\zeta} \rangle,\hskip 42.679134 ptj_{n}=2\pi g_{0,n}\end{split}  \tag{36}\]  
Figure 4: Power density (a.u.) vs. \(z\) and gain function “measured” at different points inside the undulator. Above the last point, where the dotted curve starts, the small signal gain is not properly defined because the small signal approximation does not strictly apply. The curves have been derived for the parameters \(\rho_{0}=6.8\cdot 10^{-4}\) and \(\lambda_{u}=5\) cm. The small signal gain coefficient goes from \(5.35\cdot 10^{-3}\) to \(5.35\). where \(a_{n}=\mid a_{n}\mid e^{i\phi_{n}}\) is the dimensionless amplitude of the \(n\)-th order harmonics and \(g_{0,n}\) is the \(n\)-th harmonic small signal gain parameter to be specified later [39]. \[ \begin{split}&\frac{d}{d\tau}a_{n}=-2\pi g_{0}b_{n}e^{-i\
u_{n}\tau}+i \pi ng_{n}\int_{0}^{\tau}(\tau-\tau^{\prime})a_{n}(\tau^{\prime})e^{-i\
u_{n}( \tau-\tau^{\prime})}d\tau^{\prime},\\ &\
u_{n}=2\pi N\frac{n\omega_{0}-\omega}{n\omega_{0}}.\end{split}  \tag{37}\]  
It is evident that the same considerations developed for the fundamental harmonic (\(n=1\)), hold in the present case too, the only significant difference being that the \(n\)-the harmonic Pierce is now specified by  
\[\rho_{n}^{*}=\sqrt[3]{n}\,\rho_{n},\qquad\rho_{n}=\rho\bigg{(}\frac{f_{b,n}}{f _{b}}\bigg{)}^{\frac{2}{3}},\ \ f_{b,n}=J_{\frac{n-1}{2}}(n\xi)-J_{\frac{n+1}{2}}(n\xi),\qquad f_{b,1}=f_{b}. \tag{38}\]  
The gain length determining the harmonic linear growth is  
\[L_{g,n}^{*}=\frac{\lambda_{u}}{4\pi\sqrt{3}\rho_{n}^{*}}=\frac{1}{\sqrt[3]{n} }L_{g,n}. \tag{39}\]  
where \(L_{g,n}\) is defined in terms of \(\rho_{n}\) as  
\[L_{g,n}=\frac{\lambda_{u}}{4\pi\sqrt{3}\rho_{n}} \tag{40}\]  
The role of \(L_{g,n}^{*}\) in the harmonic generation is clarified below; it is just a consequence of the assumption (summarized in Equation (36), where the electron field phase \(\psi_{n}\) is written as \(n\zeta\)) that the process is dominated by the bunching induced by the fundamental harmonic. It is worth noting that the correction term \(\sqrt[3]{n}\) in the definition of the harmonic Pierce parameter was initially suggested in references [17; 18; 39] as a consequence of an accurate analysis of the numerical data from the code PROMETEO [40]. In Figure 5 we have reported the harmonic intensity growth vs. the longitudinal coordinate; the relevant behavior is the same as for \(n=1\), reproduced by equations of the type (29) with \(L_{g,n}^{*}\) in place of \(L_{g}\). Figure 5: Harmonic evolution and nonlinear harmonic generation which is triggered after the dashed line, where the bunching effects become significant. However, this is only a part of the story. The harmonic intensities \((3,5)\) follow a growth rate characterized by two different regimes. After the lethergic region, the growth rates is initially specified by the inverse of the harmonic gain length \(L_{g,n}^{s}\) and then by an abrupt increase of the growth ruled by \(nL_{g}^{-1}\). This behavior is the signature of a complex mechanism underlying the harmonic generation emission.