To have straightforward and homogeneous boundary conditions for solving $$u_t = \kappa u_{xx}$$ with boundary conditions of $$u_x(0,t)=A\\ u_x(L,t)=0$$ To solve the PDE with homogenous boundaries, $$u(x,t) = w(x) + \nu(x,t)$$ where $w(x)$ is time-independent steady state condition. Then solution for $\nu(x,t)$ with new boundary conditions of $$\nu(0)=\nu(L)=0$$ by the method of separation of the varaibles $\nu(x,t)=X(x)T(t)$, the general solution is $$X(x)=a \cos \lambda x + b \sin \lambda x$$ by applying the boundary conditions, the solution is
$$\nu(x,t)= \sum_{n=1}^\infty b_n e^{-t\kappa(n\pi/L)^2} \sin\left( \frac{n\pi x}{L}\right) \\ b_n=\frac{2}{L} \int_0^L f(x) \sin\left(\frac{n\pi x}{L}\right) \,\mathrm{d}x$$
For deriving $f(x)$, we use the boundary condition of $$u(x,0) = f(x) = \sum_{n=1}^\infty b_n \sin(n \pi x)$$
How do we find $u(x,0)$ from the original boundary condition of $u_x=A$?