# Solving a wave equation with inhomogeneous boundary conditions

• Mar 26th 2009, 03:18 PM
Josh146
Solving a wave equation with inhomogeneous boundary conditions
Question: Solve the wave equation (1) on the region 0<x<2 subject to the boundary conditions (2) and the initial condition (3) by separation of variables.

(1) $\frac{\partial^2 u}{\partial t^2}=c^2\frac{\partial^2 u}{\partial x^2}$

(2) $\frac{\partial u}{\partial x}(0,t)=1$ ; $\frac{\partial u }{\partial x}(2,t)=1$

(3) $\frac{\partial u}{\partial t}(x,0)=0$

I've defined $\theta(x,t)=u(x,t)-u_{st}(x) = u(x,t)-x-h(t)$ where u_st is the steady state solution (the solution to $\frac{\partial^2 u}{\partial x^2} = 0$ subject to (2)). I've used this to create a new PDE with homogeneous boundary conditions.

The PDE is:

$\frac{\partial^2 \theta}{\partial t^2} + h''(t)=c^2 \frac{\partial^2 \theta}{\partial x^2}$.

By subbing in $\theta=f(t)g(x)$ I get:

$f''(t)g(x)+h''(t)=c^2 f(t) g''(x)$

I'm not sure how to separate this into two ODEs. Can someone help?
• May 3rd 2009, 01:44 PM
Rebesques
Errrr... That trick you tried does not apply here. For the method of separation of variables, set u(x,t)=X(x)T(t) to construct two ODEs, then add up all the solutions. It must be in your notes.
• May 3rd 2009, 02:11 PM
Josh146
Thanks but I already realised my mistake:

h is a constant, not a function of t.