## 6 Numerical Experiments  
### Double-Frequency Tuning for Gain Factor Optimization  
Assume that a 250 THz (\(\lambda_{\textit{free space}}=1.2\ \upmu\)m) infra-red stimulus wave \(E_{st}\) and a high power pump wave \(E_{\textit{hp}}\) that is composed of two high-intensity ultrashort pulses (frequencies are to be determined) are propagating inside a low-loss (high Q) cavity that has two reflecting walls (see Figure 5). The wall on the left side can be thought as an optical isolator, which fully transmits from its left side and almost fully reflects from its right side. The wall on the right side represents an optical band-pass filter with a frequency-dependent reflection coefficient \(\Gamma(f)\). Both waves are generated at x = 0 \(\upmu\)m, at the time instant t = 0 s. The waves and the parameters of the gain medium are as given below:  
\[E_{\textit{hp}}(x=0\mu m,t)=\sum\
olimits_{i=1}^{2}A_{i}\cos(2\pi f_{i}t+ \psi_{i})(u(t)-\ u(t-\Delta T_{i}))\quad(u(t):\textit{Unit step function})\]  
\[\textit{Where }A_{1}=2\times 10^{8},\ \ A_{2}=1.5\times 10^{8},\ \ \psi_{1}=0,\ \ \psi_{2}=0,\ \ \Delta T_{1}=0.5 ps,\ \ \Delta T_{2}=1 ps\]  
\[E_{st}(x=0\mu m,t)=1\times\sin\!\left(2\pi\!\left(2.5\times 10^{14}\right) \right)\ V/m,\ \ \ for\ \ 0\leq t\leq 10 ps\]  
\[\textit{Dielectric constant of the gain medium }=\ \varepsilon_{\infty}=1+\chi=12\quad(\mu_{r}=1)\]  
\[\textit{Resonance frequency of the gain medium }:\ f_{0}=500 THz\]  
\[\textit{Damping coefficient of the gain medium }:\ \ \gamma=1\times 10^{9}Hz\]  
\[\textit{Time interval and duration of simulation }:\ \ 0\leq t\leq 10 ps\]  
\[\textit{Spatial range of the gain medium }:0\mu m<x<10\mu m\]  
\[\textit{Right cavity wall location }:\ \ x=10\mu m;Left\ \textit{cavity wall location }:\ \ x=0\mu m\]  
\[\textit{Electron density of the gain medium }:\ N=3.5\times 10^{28}/m^{3};\ \ \textit{ Atomic diameter }:\ d=0.3\ nm\]  
**Our problem:** find the optimal pump wave pulse frequencies \(f_{p1},\ f_{p2}\) that maximize the magnitude of the monochromatic stimulus wave in the cavity \(\big{(}\big{|}E_{st}(\ f_{st}=250\ THz)\big{|}\big{)}\big{)}\), for \(10\ THz<\big{\{}f_{p1},f_{p2}\big{\}}<10007 Hz\) (\(\ THz\) to UV), and for \(\ 0\mu m<x<10\mu m,0\leq t\leq 10 ps\), such that  
\[\textit{Where }A_{1}=2\times 10^{8},\ \ A_{2}=1.5\times 10^{8},\ \ \psi_{1}=0,\ \ \psi_{2}=0,\ \ \Delta T_{1}=0.5 ps,\ \ \Delta T_{2}=1 ps\]0  
\[ \begin{array}{l}\frac{\partial^{2}P_{hp}}{\partial t^{2}}+\gamma\frac{ \partial P_{hp}}{\partial t}+{\omega_{0}}^{2}\big{(}P_{hp}\big{)}-\frac{{ \omega_{0}}^{2}}{N\text{e}d}\Big{(}P_{hp}\big{)}^{2}-\frac{{\omega_{0}}^{2}}{ N^{2}e^{2}d^{2}}\Big{(}P_{hp}\Big{)}^{3}=\frac{Ne^{2}}{m}E_{hp}\Big{(}f_{p1},\ f_{p2}\big{)}.\\ \\ \
abla^{2}E_{st}\Big{(}f_{p1},\ f_{p2}\big{)}-\mu_{0}\varepsilon_{\infty}\frac {\partial^{2}E_{st}\Big{(}f_{p1},\ f_{p2}\big{)}}{\partial t^{2}}=\mu_{0} \sigma\frac{\partial E_{st}\Big{(}f_{p1},\ f_{p2}\big{)}}{\partial t}+\mu_{0} \frac{\partial^{2}P_{st}}{\partial t^{2}}\\ \\ \frac{\partial^{2}(P_{st})}{\partial t^{2}}+\gamma\frac{\partial(P_{st})}{ \partial t}+{\omega_{0}}^{2}(P_{st})-\frac{{\omega_{0}}^{2}}{N\text{e}d}\Big{[} \frac{P_{st}^{2}+2P_{st}P_{hp}}{\big{]}}-\frac{{\omega_{0}}^{2}}{N^{2}e^{2}d^ {2}}\Big{\{}P_{st}{}^{3}+3P_{st}{}^{2}P_{hp}+3P_{st}{}^{2}P_{hp}}^{2}\Big{\}} \\ =\frac{Ne^{2}}{m}E_{st}\Big{(}f_{p1},\ f_{p2}\big{)}\end{array} \]  
Our aim is to maximize the magnitude of the stimulus wave at its original frequency \(f_{st}=250 THz\) (monochromatic form). This is a precaution against any degree of spectral broadening that the stimulus wave may go through while being amplified. Therefore, our cost function is chosen as (at any spatial point \(x=x^{\prime}\) inside the cavity):  
\[\begin{array}{l}Q=\quad\Big{|}E_{st}(f_{st}=250 THz)\Big{|}\\ \quad\quad\quad\quad=\Big{|} \begin{array}{l}2.5\times 10^{14}+\Delta f \\ 2.5\times 10^{14}-\Delta f\end{array} \Big{\{}\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\!\! \!\!\!\!