Solving Simple Diffusion-Convection Problem

77 Views Asked by At

I am having trouble solving the simple Diffusion-Convection problem, $$u_t = u_{xx}-u_x$$ with Boundary Conditions, $$u(0,t)=u(1,t)=0$$ and Initial Conditions, $$u(x,0) = e^{\frac{x}{2}}$$ I started off by splitting $u(x,t)$ such that $$u(x,t) = w(x,t)e^{\frac{x}{2}-\frac{t}{4}}$$. The term, $\frac{x}{2}-\frac{t}{4}$ was carefully chosen so that the problem reduces to $$w_t = w_{xx}$$. I also transformed the boundary conditions and the Initial Conditions, such that $u(0,t)=w(0,t)e^{\frac{0}{2}-\frac{t}{4}} = 0$ and thus $w(0,t) = 0$ and $u(1,t)=w(1,t)e^{\frac{1}{2}-\frac{t}{4}} = 0$ and likewise $w(1,t) = 0$. Finally the Initial Conditions are dealt with, $u(x,0) = e^{\frac{x}{2}} = w(x,0)e^{\frac{x}{2}-\frac{0}{4}}=w(x,0)e^{\frac{x}{2}}$ and thus $w(x,0) =1$. Okay so from here I try to solve the IBVP with the given conditions, $w_t = w_{xx}$, BC's: $w(0,t)=w(1,t)=0$, and IC $w(x,0)=1$. Here I begin with by saying that this new function is separable, such that$w(x,t) = X(x)T(t)$ and applying the typical method of separation of variables, I end up with,$T(t) = e^{{-\lambda}^2 t}$ and $X(x)= Asin(\lambda x)+Bcos(\lambda x)$. Finally I apply the boundary conditions and get $w(0,t)=e^{-\lambda ^2 t}[Asin(0)+Bcos(0)] = 0 = A(0)+B(1) =B = 0$ and $w(1,t) = 0 = Ae^{-\lambda ^2 t}sin(\lambda) = sin(\lambda) = 0$ and thus $\lambda=n\pi$. I assume that I have infinitely many solutions due to the infinite number of values satisfying $\lambda$. Finally I apply the Initial Conditions, $w(x,0)=1=\sum a_ne^{-(n\pi)(0)}sin(n\pi x)=\sum a_nsin(n\pi x)$. I apply the orthogonality of sines for each eigenvalue and integrate from 0 to 1 and thus $$\int_0^1 sin(m\pi x)dx = \int_0^1 a_m sin^2(m\pi x)dx$$. Thus I end up with, $\frac{-cos(m\pi x)}{m\pi} |_0^1 = \frac{a_m[m\pi -cos(m\pi)sin(m\pi)]}{m\pi}$. From there I reason that I can only use odd values of $m$, which leads to the amplitude being $a_m = \frac{4}{m\pi}$. From here I obtain a solution for $w(x,t)= \frac{4}{\pi}\sum \frac{1}{2n-1}e^{-[(2n-1)\pi]^2t}sin[(2n-1)\pi x]$. Finally, I combine the entire terms and get $u(x,t)= (e^{\frac{x}{2}-\frac{t}{4}})({\frac{4}{\pi}\sum \frac{1}{2n-1}e^{-[(2n-1)\pi]^2t}sin[(2n-1)\pi x]})$. The answer in the textbook is quite different, where $n$ disappears from the exponential which is, $$\frac{4}{\pi}e^{\frac{-1}{2}(x-\frac{t}{2})} \sum \frac{1}{(2n-1)} sin[(2n-1)\pi x]$$. Any tips on where I went wrong?