Suppose that,

With boundary value problem
 = f(t) \mbox{ and }u(L,t) = g(t) \mbox{ for }t\geq 0)
.
And initial value problem
 = h(x) \mbox{ for }0\leq x\leq L)
.
Write the function
)
as
+w(x,t))
such that
)
satisfies the boundary value problem. For example,
![v(x,t) = f(t) + \frac{x}{L}[g(t) - f(t)]](http://latex.codecogs.com/png.latex?v(x,t) = f(t) + \frac{x}{L}[g(t) - f(t)])
. And
)
is the modified function that is needed to solve the equation.
Substitute that into the equation,

.
Thus,
![\frac{\partial^2 w}{\partial x^2} - \frac{\partial w}{\partial t} = f'(t) + \frac{x}{L} [ g'(t) - f'(t)]](http://latex.codecogs.com/png.latex?\frac{\partial^2 w}{\partial x^2} - \frac{\partial w}{\partial t} = f'(t) + \frac{x}{L} [ g'(t) - f'(t)] )
.
With,
 = w(L,t) = 0 \mbox{ for }t\geq 0)
.
And,
![w(x,0) = h(x) - v(x,0) = h(x) - f(0) + \frac{x}{L}[ g(0)-f(0)]](http://latex.codecogs.com/png.latex?w(x,0) = h(x) - v(x,0) = h(x) - f(0) + \frac{x}{L}[ g(0)-f(0)])
.
Therefore, we have transformed an equation with a non-homogenous boundary value problem into an equation with a homogenous boundary value problem
but it has an 'uglier' form. Meaning we have to solve the inhomogenous heat equation.
Now there is a method for solving (with homogenous boundary),
)
.
For a given differenciable function
)
.
But that is a totally different question.