I would like to numerically solve the 1D heat equation
$$ \frac{\partial T}{\partial t} = \alpha \frac{\partial^{2} T}{\partial x^{2}} $$
using a pseudospectral (i.e., collocation) method with inhomogeneous Dirichlet boundary conditions. I am aware that this equation has an analytical solution. It is a proxy for a different PDE (a phase-field model for a materials problem) that is not so easily solved (but this is a MWE). I recall that one can do Dirichlet conditions with either a sine or cosine basis (I cannot remember which off-hand). Do they allow for inhomogeneous conditions, or do I need to use something more complex (like a Chebyshev basis)? References would be much appreciated.