solve variation