Originally Posted by

**ThePerfectHacker** Suppose that,

$\displaystyle \frac{\partial u}{\partial t} = \frac{\partial ^2 u}{\partial x^2}$

With boundary value problem $\displaystyle u(0,t) = f(t) \mbox{ and }u(L,t) = g(t) \mbox{ for }t\geq 0$.

And initial value problem $\displaystyle u(x,0) = h(x) \mbox{ for }0\leq x\leq L$.

Write the function $\displaystyle u(x,t)$ as $\displaystyle v(x,t)+w(x,t)$ such that $\displaystyle v(x,t)$ satisfies the boundary value problem. For example, $\displaystyle v(x,t) = f(t) + \frac{x}{L}[g(t) - f(t)]$. And $\displaystyle w(x,t)$ is the modified function that is needed to solve the equation.

Substitute that into the equation,

$\displaystyle \frac{\partial^2 v}{\partial x^2} + \frac{\partial^2 w}{\partial x^2} = \frac{\partial v}{\partial t} + \frac{\partial w}{\partial t}$.

Thus,

$\displaystyle \frac{\partial^2 w}{\partial x^2} - \frac{\partial w}{\partial t} = f'(t) + \frac{x}{L} [ g'(t) - f'(t)] $.

With, $\displaystyle w(0,t) = w(L,t) = 0 \mbox{ for }t\geq 0$.

And, $\displaystyle 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),

$\displaystyle \frac{\partial^2 w}{\partial x^2} - \frac{\partial w}{\partial t} = \mu (x,y)$.

For a given differenciable function $\displaystyle \mu (x,y)$.

But that is a totally different question.