In this article, a new approach to find the Fourier expansion coefficients have been carried out by a recursive algorithm without computing their correspondent integral. Finally, in virtue of this new method, some Partial differential equations have been solved and compared with their exact solutions.After deriving the recursive relation, some differential equations have been solved with the partial differentiation and compared with the numerical answers in addition. The Fourier series coefficients were computed more accurate and fast in this method as compared to others then we calculate cylinder potential in electrodynamics by this method. The results show that the algorithm proposed in this paper has achieved better results.