# Partial differential equation with conditions

1. Oct 26, 2012

### selzer9

I'm not sure how to solve this:

du/dt = 3 $\frac{d^{2}u}{dx^{2}}$

These are the conditions:
u(0,t)= -1
u(pi,t)= 1
u(x,0) = -cos 7x

Suggestion:
I should use steady state solution to get a homogeneous initial condition.

Starting with separtion of variables

u(x,t) = G(x)H(t)

And du/dt = GH' and d^2u/dx^2 = G"H

So GH'= c^2 G"H

and H'/(c^2)H = G"/G

Then H'/(c^2)H = k = G"/G

thus H' - (c^2)Hk = 0 and G" - Gk = 0.

Once here how do I make sure u(x,t) follows the conditions?

2. Oct 26, 2012

### LCKurtz

I wouldn't start it that way. You need to make the boundary conditions homogeneous before you separate the variables. I would start with the substitution$$u(x,t) = v(x,t) + \Psi(x)$$ Substituting that into your system gives$$v_t = 3v_{xx}+3\Psi''(x)$$ $$v(0,t) + \Psi(0)= -1$$ $$v(\pi, t) +\Psi(\pi) = 1$$ $$v(x,0) + \Psi(x) = -\cos x$$
Now if you let $3\Psi''(x) = 0,\, \Psi(0) = -1,\, \Psi(\pi)= 1$, you can solve for $\Psi(x)$ and you are left with the homogeneous system$$v_t = 3v_{xx}$$ $$v(0,t) = 0$$ $$v(\pi, t) = 0$$ $$v(x,0) = -\cos x-\Psi(x)$$Solve this system in the usual way with separation of variables. Once you know $v(x,t)$, your solution will be $u(x,t)=v(x,t)+\Psi(x)$.

Last edited: Oct 26, 2012