Solving equations with specific solutions