Gerneral Solution:

Gerneral Solution