Solving equations with a specified solution