This research investigates the numerical solution of steady magnetohydrodynamic (MHD) mixed convection boundary layer flow of a nanofluid over a flat plate, incorporating heat generation/absorption and viscous dissipation effects. The study utilizes Gyarmati's variational principle to derive the governing equations, and compares computational results with existing numerical solutions to validate accuracy. The analysis aims to enhance understanding of heat transfer mechanisms in nanofluids, highlighting their potential in industrial applications.