Solve for f E=hf