In this paper, based on the classical Yano’s formula, we first establish an optimal integral inequality for compact Lagrangian submanifolds in complex space forms, which involves Ricci curvature direction \(J\mathbf {H}\) and norm of covariant differentiation second fundamental form h, where J is almost structure \(\mathbf mean vector field. Second analogously, Legendrian Sasakian forms with \(...