This study proposes a strategy for effectively utilizing distributed generation (DG) and capacitors in islanded distribution networks during power mismatch conditions. The optimal placement and capacity are determined using the Jaya algorithm to minimize power losses and enhance operational efficiency. Results from case studies on IEEE 33-bus and 69-bus networks indicate that matching the load power factor with the source significantly improves the operational capacity of the distributed sources.