# Series Solution of PDE Non-Homogeneous BCS

• Aug 2nd 2010, 10:55 AM
lvleph
Series Solution of PDE Non-Homogeneous BCS
I thought I had these problems down, but I found one for which I am having trouble.

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

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

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

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

But this doesn't seem to help me solve for $\omega$. Normally I would solve for one constant and then solve for \omega, plug this into $v(x,t)$ then use the IC to solve for the last constant.
• Aug 2nd 2010, 11:16 AM
Ackbeet
Can you show me how you got that the DE for $v$ was

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

$v_{t}=v_{xx}-v-2\sin(x).$
• Aug 2nd 2010, 11:44 AM
lvleph
That is right. So, how do I proceed from there?
• Aug 2nd 2010, 11:55 AM
lvleph
So, I would still have the same issue since I am suppose to solve the homogeneous problem and then solve the particular solution.
• Aug 2nd 2010, 12:46 PM
Ackbeet
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.
• Aug 2nd 2010, 12:58 PM
lvleph
Sure it is separable.

$v(t,x) = -\sin(x)$
Is a solution to the PDE. So let $X(x) = \sin x \text{ and } T(t) = -1$.
$\Rightarrow \left(-\sin x\right)_t = \left(-\sin x\right)_{xx} - 2\sin x$
and it satisfies the initial condition and the boundary conditions.
• Aug 2nd 2010, 03:31 PM
Ackbeet
So, what do you get when you plug in your "separable" ansatz?
• Aug 2nd 2010, 03:44 PM
lvleph
Well, as far as I understand I would still want to first solve the homogeneous part, so I have
$\dfrac{X''(x)}{X(x)} = \dfrac{T'(t)}{T(t)} = -\lambda$
Now I would solve the DEQ
$X''(x) = -\lambda X(x)$.
From here I have cases
Case I: $\lambda > 0$
Let $\omega = \sqrt{\lambda}$
$X(x) = A_1 \cos \omega x + A_2 \sin \omega x$
$X'(x) = -A_1\omega \sin \omega x + A_2 \omega \cos \omega x$
$X'(0) = A_2 \omega = 0 \Rightarrow A_2 = 0$
$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.
• Aug 2nd 2010, 05:42 PM
Jester
What I might suggest is to use

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

to transform to the usual heat equation and then deal with the BC's
• Aug 2nd 2010, 05:47 PM
lvleph
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.
• Aug 3rd 2010, 02:14 AM
Ackbeet
You're welcome for whatever help I could give you. Did you finish the problem?
• Aug 28th 2010, 02:42 PM
lvleph
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.
$\v_t - v_{xx} + v = f(x)$ $0 < x < 1$ $t>0$
$u_x(0,t) = u_x(\pi,t) = 0$
$u(x,0) = g(x)$
First we solve the DEQ
$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, $\phi_n(x)$ we take the innerproduct
$\left = \left$.
Here we must remember that $v_n(t) = \left$. Thus we have
$\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$
$\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$
$\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$
$\left(v_n\right)' = \int_0^1\! v \left(-\lambda \cdot \phi_n\right)\, \dx - v_n + f_n$
$\left(v_n\right)' = \left(-\lambda - 1\right)v_n + f_n$
$\left(v_n\right)' + \left(\lambda + 1\right)v_n= f_n$
$\frac{d}{dt}\left[e^{\left(\lambda + 1\right)t}v_n\right] = e^{\left(\lambda + 1\right)t}f_n$
$\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$
$e^{\left(\lambda + 1\right)t}v_n(t) - v_n(0) = \int_0^t\! e^{\left(\lambda + 1\right)s}f_n\, ds$
$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 $v_n$.