# Nonzero Neumann Conditions for the Heat Equation

I'm just looking for some guidance on how to proceed when dealing with a heat equation that looks like a Neumann condition problem, but has nonzero boundaries. Here's the general problem I would like to solve:

$$u_t=ku_{xx}, \,\,\,\,0\leq x\leq L, \,\,\,\,t>0$$ $$\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\textbf{BC: }\,\,\,\, u_x(0,t)=a, \,\, u_x(L,t)=b, \,\,\,\,t>0$$ $$\textbf{IC: }\,\,\,\, u(x,0)=f(x),\,\,\,\, 0\leq x\leq L$$

Is it as easy as just applying a stead state argument like I would do for the boundary conditions $$u(0,t)=a, \,\,\,\,u(L,t)=b$$? If the boundary conditions were instead time-dependent would I also be able to use the same adaptation of the steady state as well? This seems like the obvious answer, but I simply cannot find any references that provide a solution to such a problem.

We need to reduce the problem to an equivalent one which is the sum of two easily solved differential equations.

$$u(x,t)=v(x,t)+w(x),$$

where $$w(x)$$ satisfies the boundary conditions $$w_x(0)=a$$, and $$w_x(L)=b$$. The caveat of this problem is that we will need to integrate our result afterwards to determine the boundary conditions of $$v(x,t)$$. This is easy enough though, because $$w(x)$$ does not depend on $$t$$. We take $$\frac{dw}{dx}$$ to be linear: $$\frac{dw}{dx}=\frac{(b-a)}{L}x+a.$$ Then, integration gives $$w(x)=\int_0^x \left[ \frac{(b-a)}{L}t+a\right] dt=\frac{(b-a)}{2L}x^2+ax$$

Now, we need only solve for $$v(x,t)$$. The fact that $$w(x)$$ is a second degree polynomial means that $$v(x,t)$$ is a nonhomogeneous differential equation with homogeneous boundary conditions. I.e.

$$v_t-kv_{xx}=\frac{k(b-a)}{L},$$

$$\textbf{BCs:}\,\,\,\,v_x(0,t)=v_x(L,t)=0,$$ $$\textbf{IC}\,\,\,\,\,\,\,\,\,v(x,0)=f(x)-w(x).$$

The solution for $$v(x,t)$$ can easily be found using Duhamel's Principle, which is well documented for all homogeneous boundary conditions.