Trace Identity for Gradient Ricci Solitons