Phase mismatching is an important aspect of second harmonic generation (SHG) in nonlinear optics. The second harmonic wave is generated at one place and its original phase is 0. Another harmonic wave is generated at another place and its original phase is . When , is largest. When , the sum is 0. Therefore, the length is defined as the optimum length in SHG.