Electric vehicles (EVs) offer a compelling solution for mitigating pollution, addressing environmental alterations, and enhancing energy security. This research presents a methodology employing the Broyden Fletcher Gold- farb Shanno quasi-Newton technique to streamline the charging costs associated with plug-in electric vehicles (PEVs). The initial step involves formulating an objective function directed at minimizing the expenses tied to PEV charging. This function takes into account crucial constraints pertaining to charger specifications, state of charge limitations, and voltage levels. Subsequently, we de- tail the application of the BFGS Quasi-Newton algorithm in computing node topology voltages within a microgrid featuring distributed energy resources (DERs). The findings demonstrate that the BFGS-enabled method outperforms alternative approaches in minimizing the cost of charging PEVs