# Thread: Non-homogeneous PDE with Non-homogeneous BC's - Eigenfunction Expansion

1. ## Non-homogeneous PDE with Non-homogeneous BC's - Eigenfunction Expansion

I have an exam tomorrow, and I came across one question that I don't really know how to start and I was really hoping someone could help me out with it.

Use the method of eigenfunction expansion to obtain a solution to

$u_t = u_{xx} + q(x,t)$

with initial condition:

$u(x,0) = f(x)$

BC's: $u(\pi,t) = u_\pi, u(0,t) = u_0$

where $u_\pi, u_0$ are given constants.

So I need to start with a trial solution based on the homogeneous part of the problem i.e.

$u_t = u_{xx}$ which if the boundary conditions were something like $u(\pi,t) = 0, u(0,t) = 0$ I would start with a solution

$\displaystyle u(x,t) = \sum_1^{\infty} c_n(t) \sin (n \pi)$

but I don't know how to determine a trial solution if the BC's are non-homogeneous.

2. You'll need to transform the problem such that the new problem has these kind of BC's. One usually tries

$u = v + ax + b$

and find $a$ and $b$ such that $v(0,t) = 0, v(\pi,t) = 0$.