# Thread: Series Solution of PDE Non-Homogeneous BCS

1. ## Series Solution of PDE Non-Homogeneous BCS

I thought I had these problems down, but I found one for which I am having trouble.

$\displaystyle u_t = u_{xx} - u,\quad 0<x<\pi,\; t>0$
$\displaystyle u_x(0,t) = 1,\; u_x(\pi,t) = -1,\; t>0$
$\displaystyle u(x,0) = 0,\; 0<x<\pi$

My attempt:
Let $\displaystyle u(x,t) = v(x,t) + w(x,t)$ where $\displaystyle w(x,t)$ satisfies the BCs
$\displaystyle w_x(0,t) = 1,\; w_x(\pi,t) = -1,\; t>0$.
So, I picked $\displaystyle w(x,t) = \sin x$.
Now the new BCs and IC for $\displaystyle v(x,t)$ are
$\displaystyle u_t = u_{xx} - u,\quad 0<x<\pi,\; t>0$
$\displaystyle u_x(0,t) = 0,\; u_x(\pi,t) = 0,\; t>0$
$\displaystyle u(x,0) = -\sin x,\; 0<x<\pi$.

Now assume $\displaystyle v(x,t) = X(x)T(t)$ then
$\displaystyle \dfrac{T'(t)}{T(t)} = \dfrac{X''(x)}{X(x)} - 1 = -\lambda$
$\displaystyle X''(x) = \left(-\lambda + 1\right) X(x)$

Case I: $\displaystyle \lambda > 1$
Let $\displaystyle \omega = \sqrt{\lambda - 1}$
$\displaystyle X(x) = A_1 \cos \omega x + A_2 \sin \omega x$
$\displaystyle X'(x) = -A_1 \omega \sin \omega x + A_2 \omega \cos \omega x$

But this doesn't seem to help me solve for $\displaystyle \omega$. Normally I would solve for one constant and then solve for \omega, plug this into $\displaystyle v(x,t)$ then use the IC to solve for the last constant.

2. Can you show me how you got that the DE for $\displaystyle v$ was

$\displaystyle v_{t}=v_{xx}-v$? Because I'm getting

$\displaystyle v_{t}=v_{xx}-v-2\sin(x).$

3. That is right. So, how do I proceed from there?

4. So, I would still have the same issue since I am suppose to solve the homogeneous problem and then solve the particular solution.

5. If this is your new equation, I'm not so sure it's separable, is it? Perhaps you could try an eigenvector expansion or something.

6. Sure it is separable.

$\displaystyle v(t,x) = -\sin(x)$
Is a solution to the PDE. So let $\displaystyle X(x) = \sin x \text{ and } T(t) = -1$.
$\displaystyle \Rightarrow \left(-\sin x\right)_t = \left(-\sin x\right)_{xx} - 2\sin x$
and it satisfies the initial condition and the boundary conditions.

7. So, what do you get when you plug in your "separable" ansatz?

8. Well, as far as I understand I would still want to first solve the homogeneous part, so I have
$\displaystyle \dfrac{X''(x)}{X(x)} = \dfrac{T'(t)}{T(t)} = -\lambda$
Now I would solve the DEQ
$\displaystyle X''(x) = -\lambda X(x)$.
From here I have cases
Case I: $\displaystyle \lambda > 0$
Let $\displaystyle \omega = \sqrt{\lambda}$
$\displaystyle X(x) = A_1 \cos \omega x + A_2 \sin \omega x$
$\displaystyle X'(x) = -A_1\omega \sin \omega x + A_2 \omega \cos \omega x$
$\displaystyle X'(0) = A_2 \omega = 0 \Rightarrow A_2 = 0$
$\displaystyle X'(\pi) = -A_1\omega \sin \omega \pi = 0 \Rightarrow \omega = n, \text{for } n = 0,1,\dots$
I guess I made a mistake some where earlier. Thank you for your help.

9. What I might suggest is to use

$\displaystyle u = e^{-t} v(x,t)$

to transform to the usual heat equation and then deal with the BC's

10. I think I had to do it the way I was doing it. Not sure if they would care if I tried it your way though.

11. You're welcome for whatever help I could give you. Did you finish the problem?

12. Okay, so I figured this problem out a while back but I just didn't post back. However, for completeness I think I should post the procedure to solve this non-homogeneous PDE.
$\displaystyle \v_t - v_{xx} + v = f(x)$ $\displaystyle 0 < x < 1$ $\displaystyle t>0$
$\displaystyle u_x(0,t) = u_x(\pi,t) = 0$
$\displaystyle u(x,0) = g(x)$
First we solve the DEQ
$\displaystyle Lv = u_{xx} = -\lambda$
Once we have a solution to this DEQ, we need to normalize the eigenfunctions. Now that we have the normalized eigenfunctions, $\displaystyle \phi_n(x)$ we take the innerproduct
$\displaystyle \left<v_t,\phi_n(x)\right> = \left<v_{xx} - v + f(x),\phi_n(x)\right>$.
Here we must remember that $\displaystyle v_n(t) = \left<v,\phi_n(x)\right>$. Thus we have
$\displaystyle \int_0^1\! v_t \phi_n\, dt = \int_0^1\! u_{xx} \phi_n\, \dx - \int_0^1\! v \phi_n\, \dx + \int_0^1\! f \phi_n\, \dx$
$\displaystyle \frac{d}{dt} \int_0^1\! v \phi_n \, dt = \left.v_x \phi_n\right|_0^1 - \int_0^1\! v_x \left(\phi_n\right)_x\, \dx - v_n + f_n$
$\displaystyle \left(v_n\right)' = -\left.v \left(\phi_n\right)_x\right|_0^1 + \int_0^1\! v \left(\phi_n\right)_{xx}\, \dx - v_n + f_n$
$\displaystyle \left(v_n\right)' = \int_0^1\! v \left(-\lambda \cdot \phi_n\right)\, \dx - v_n + f_n$
$\displaystyle \left(v_n\right)' = \left(-\lambda - 1\right)v_n + f_n$
$\displaystyle \left(v_n\right)' + \left(\lambda + 1\right)v_n= f_n$
$\displaystyle \frac{d}{dt}\left[e^{\left(\lambda + 1\right)t}v_n\right] = e^{\left(\lambda + 1\right)t}f_n$
$\displaystyle \int_0^t\! \frac{d}{ds}\left[e^{\left(\lambda + 1\right)t}v_n\right]\, ds = \int_0^t\! e^{\left(\lambda + 1\right)s}f_n\, ds$
$\displaystyle e^{\left(\lambda + 1\right)t}v_n(t) - v_n(0) = \int_0^t\! e^{\left(\lambda + 1\right)s}f_n\, ds$
$\displaystyle v_n(t) = e^{-\left(\lambda + 1\right)t}v_n(0) + \int_0^t\! e^{\left(\lambda + 1\right)\left(s - t\right)}f_n\, ds$.
Then of course, we sum up all $\displaystyle v_n$.