Using a simple nonlinear model based on rate equations, and by employing a harmonic balance method, we develop a theory Of Optimal mixing in directly modulated semiconductor laser diodes. We perform a consistent numerical solution. to the mixing in laser diodes to the arbitrary accuracy and intermodulation index (m, n). Through numerical computations we demonstrate that there is an optimal bias in mixing, corresponding to a relaxation frequency, f(r), coinciding with the subcarrier frequency, f(1), at which the mixing power is maximized nearly simultaneously for all intermodulation products, f(mn). In terms of increasing the signal's current amplitude, it will be shown that it would result in a monotonic increase in the optical power of all intermodulation products, as is normally expected. More generally and for the first time to the best of our knowledge, the condition, for optimal mixing power is found as f(mn) = kf(r) = mf(1) + nf(2). Applications are in data transmission beyond the resonant frequency of the laser diode as needed in future communication standards.