# Ordinary differential equations and BVP

Solve BVP by separating variables and using eigenfunction expansion method

PDE:Ut-Uxx=e-2tsin(pi x/L) U=U(x,t),x(0,L)
BC1:U(0,t)=0
BC2:U(L,t)=0
IC:U(x,0)=sin(pi x/L)
U(x,t)=X(x)T(t),X''=(lambda) X ,lambda is the separation of parameter.

I have calculated the basis functions as Xn=root(2/L)sin((n pi x) /L) for n=1,2 and labdan=-((n pi)/L)2

Related Calculus and Beyond Homework Help News on Phys.org
pasmith
Homework Helper
Solve BVP by separating variables and using eigenfunction expansion method

PDE:Ut-Uxx=e-2tsin(pi x/L) U=U(x,t),x(0,L)
BC1:U(0,t)=0
BC2:U(L,t)=0
IC:U(x,0)=sin(pi x/L)
U(x,t)=X(x)T(t),X''=(lambda) X ,lambda is the separation of parameter.

I have calculated the basis functions as Xn=root(2/L)sin((n pi x) /L) for n=1,2 and labdan=-((n pi)/L)2

Your PDE is not homogeneous. You have:
$$u_{t} - u_{xx} = e^{-2t} \sin\frac{\pi x}L$$

Let's try looking for a separable solution $u(x,t) = X(x)T(t)$. Substituting that into the PDE, we get
$$T' X - T X'' = e^{-2t} \sin\frac{\pi x}L$$
Oh dear. Dividing by $XT$ isn't necessarily going to give us terms which are functions of a single variable and whose sum is a constant, so the standard method doesn't work (or rather, we are forced to make particular choices for X and T in order to do that, and those choices don't lead to a solution of the PDE).

But if we look at the initial and boundary conditions, we see that the initial condition is a constant multiple of $\sin \frac{\pi x}L$ and the boundary conditions require that $u$ vanish at points where $\sin \frac{\pi x}L$ vanishes. This suggests that we should try $X(x) = \sin \frac{\pi x}L$.

arildno
Homework Helper
Gold Member
Dearly Missed
Make a trial solution e^(-2t)*F(t)*G(x)

That will remove one part of your problem.

I am a little unsure if I have the correct approach but here goes

U(x,0) = X(x)T(0) = sin(pi*x/L) (the initial condition)

Let a=pi/L then X(x) = sin(ax)/T(0), Here, X(0)T(t) = X(L)T(0) = 0 (the boundary conditions)

Substituting this back in the original equation gives:

d/dt[T(t)]*sin(ax) + T(t)*sin(ax)*a^2 = exp(-2t)*sin(ax)*T(0)

Solving this gives:

T(t) = c0*exp(-a^2*t) + T(0)*exp(-2t)/(a^2-4)

U(x,t) = X(x)*T(t) = [ c1*sin(ax)*exp(-a^2*t) + sin(ax)*exp(-2t)/(a^2-4) ]

Is the answer correct? How to use eigen function expansion method ?