Solving The Partial Differential Equation For Pricing Barrier Options Via Trigonometric Expansions