If you have homogeneous boundary conditions,the Steklov's theorem works and you can seek for a solution of your problem in the form of Fourier series with respect to eigenfunctions of the corresponding Sturm-Liouville problem. In this case you also have to expand the right hand side of your heat equation into Fourier series with respect to eigenfunctions of this Sturm-Liouville problem. There are some restrictions on function f(x,t) in order to insure existence and uniqueness of this problem's solution. Roughly speaking, f(x,t) should be continuous in 0
It does not matter, function f may be even, odd or neither, i.e. from this point of view function f may be of any type. However, function f should satisfy conditions (on its smoothness), which are listed in Vladimirov's book.
Your PDE is linear and Non-homogeneous.The non- homogeneous function f(x,t) must be known real valued continuous function on given domain.It may be any function.There are so many methods for solving this equation under suitable initial and/ or boundary conditions.Some of them are:
I) Method of Separation (Oldest and simplest method)
II) Method of integral Transform
III) Adomian Decomposition method
IV) Perturbation Method
But the non- homogeneous function f is nonlinear in U then we have to put certain conditions on f. It is different issue.