Solving equations with Lambert W functions