8

For $u:\mathbb{R}\times [0,1]$ with boundary conditions $u(0,x)=\cos (2\pi x)$ and $u(t,0)=u(t,1)$.

Solve $u_t=u_{xx}+u_x$.

I had this on an exam and tried to write $u$ as a product of two single variate functions and convert to an ode using the usual methods but things got messy and I couldn't finish. I also tried to write $u$ as a Fourier series in $x$ with coefficients $a_k(t)$ depending on $t$, but this also didn't seem to yield anything.

Is there a more clever way to approach this, possibly with Fourier series? I heard from a friend there may be a Fourier transform method since the equation was "homogeneous in momentum space."

Thanks!

Andrews
  • 3,953
operatorerror
  • 29,103

3 Answers3

3

The Fourier series method should work! (I would definitely go for Fourier series rather than Fourier transforms, since your solution is meant to be periodic in $x$.)

Having said that, your initial condition only involves $\cos(2\pi x)$, so I would be tempted to try an ansatz of the form, $$ u(t,x) = a(t) \cos(2\pi x) + b(t) \sin(2\pi x).$$ The PDE gives \begin{multline} \dot a(t) \cos (2\pi x) + \dot b(t)\sin(2\pi x)\\ = (-4\pi^2 a(t)+2\pi b(t))\cos(2\pi x) +(-2\pi a(t)-4\pi^2b(t))\sin(2\pi x).\end{multline} So we need to solve the ODEs $$ \frac{d}{dt}\left[ \begin{array}{c} a(t) \\ b(t) \end{array}\right] = \left[\begin{array}{cc} -4\pi^2 & 2\pi \\ - 2\pi & -4\pi^2 \end{array} \right]\left[ \begin{array}{c} a(t) \\ b(t) \end{array}\right]$$ and the initial conditions (coming from the initial conditions for the PDE) are $$ a(0) = 1, \ \ \ \ \ b(0) = 0.$$ We can solve this ODE by finding the eigenvalues and eigenvectors of the matrix. The result is $$ \left[ \begin{array}{c} a(t) \\ b(t) \end{array}\right] = \frac 1 2 \left[ \begin{array}{c} 1 \\ i \end{array}\right] \exp((-4\pi^2 + 2\pi i)t) + \frac 1 2 \left[ \begin{array}{c} 1 \\ -i \end{array}\right] \exp((-4\pi^2 - 2\pi i)t)$$ i.e. $$ a(t) = \exp(-4\pi^2 t) \cos(2\pi t), \ \ \ b(t) = -\exp(-4\pi^2 t) \sin(2\pi t).$$

Kenny Wong
  • 32,192
  • thank you for your response. How do I get more comfortable with ansatz solutions like this? Besides of course going back in time and taking a bunch of physics :P – operatorerror Apr 26 '17 at 14:17
  • This ansatz was really a Fourier series $u(t,x) = a_0 + \sum_k a_k(t) \cos(2\pi k x) + \sum_k b_k(t) \sin(2\pi k x)$. But because the equation is linear, and only involves derivatives, the individual Fourier components will always be "independent" from each other. Therefore, as your initial condition only involved $\cos (2\pi x)$, I decided only to keep the $k = 1$ part of the Fourier series. – Kenny Wong Apr 26 '17 at 14:20
  • What do you mean the individual Fourier coefficients will be independent of each other? Also, why shouldn't the sine term vanish? Since cosine and sine are orthogonal? – operatorerror Apr 27 '17 at 22:39
  • I mean that you will get separate ordinary differential equations for $a_1(t), b_1(t)$, for $a_2(t), b_2(t)$, for $a_3(t), b_3(t)$, and so on. These differential equations don't "talk to each other". Since the initial conditions for $k \geq 2$ are $a_2(0) = b_2(0) = 0$, and $a_3(0) = b_3(0) = 0$, and so on, you're bound to find that $a_2(t) = b_2(t) = 0$, and $a_3(t) = b_3(t) = 0$, and so on. Why not try substituting the full ansatz with the entire Fourier series? You'll see for yourself. :) I appreciate it takes a bit of experience to spot this! – Kenny Wong Apr 27 '17 at 22:43
  • fair enough! Thank you for your answer! – operatorerror Apr 27 '17 at 22:44
  • I don't think the orthogonality of cosines and sines is relevant at all here. The key point is that, if $u$ contains a cosine term, then $u_x$ contains a sine term - and if $u$ contains a sine term, then $u_x$ contains a cosine term. So the cosine and sine terms (for the same value of $k$) DO "talk to each other". – Kenny Wong Apr 27 '17 at 22:46
  • @KennyWong I employed orthogonality in my solution to apply the initial condition to conclude my $a_n$, $b_n$ vanished for $n \neq 1.$ Is it relevant in that capacity? – Diffycue May 01 '17 at 03:01
  • @Diffycue What you said is true. However, we don't need to use orthogonality to turn $u(0,x) = \cos(2\pi x)$ into a Fourier series. Just stare at it - it is already a Fourier series, with $a_1 = 1$, $b_1 = 0$ and $a_k = b_k = 0$ for $k \geq 2$! – Kenny Wong May 01 '17 at 13:09
2

Since $u$ is 1 periodic in $x$, we may write $$ u(x,t)=\sum_{k\in \mathbb{Z}}a_k(t)e^{2\pi i kx} $$ and our condition that $u$ be a solution yields $$ u_t(x,t)=u_{xx}+u_x\implies \sum_{k\in \mathbb{Z}}a_k'(t)e^{2\pi i kx}=\sum_{k\in \mathbb{Z}}(2\pi i k -4\pi ^2k^2)a_k(t)e^{2\pi i kx}\implies $$ yielding the ordinary differential equation $$ (2\pi i k -4\pi ^2k^2)a_k(t)=a_k'(t)\implies a_k(t)=C_ke^{(2\pi i k -4\pi ^2k^2)t} $$ and thus $$ u(x,t)=\sum_{k\in \mathbb{Z}}C_ke^{(2\pi i k -4\pi ^2k^2)t}e^{2\pi i kx} $$ With the condition that $u(0,x)=\cos (2\pi x)$, we have $$ \cos(2\pi x)=\sum_{k\in \mathbb{Z}}C_ke^{(2\pi i k -4\pi ^2k^2)t}e^{2\pi i kx} $$ Since $C_k=\int_0^1\cos(2\pi x)e^{-2\pi ki x}\mathrm dx$, we have vanishing of all but the $k=1$ terms, with $C_1=C_{-1}=1/2$ which yields the solution $$ u(x,t)=e^{-4\pi ^2t}\frac{1}{2}(e^{2\pi i (x+t)}+e^{-2\pi i (x+t)})=e^{-4\pi ^2t}\cos [2\pi (x+t)] $$

operatorerror
  • 29,103
2

On the exam I suspect we both took, I solved this the following way (I suspect this answer will be useful since we never learned to employ fourier series in our class the way the other answers presciently suggest):

Suppose we can separate variables; $u(x,t) = X(x)T(t).$ Then the equation reads

$$X(x)T'(t) = X''(x)T(t) + X'(x)T(t).$$

Divide by the solution (if you're uncomfortable with this, look up "separation of variables divide by zero" to find the relevant explanation on this website) to find

$$\frac{T'(t)}{T(t)} = \frac{X''(x) + X'(x)}{X(x)}.$$

Realize that each side of the equation above is constant; call this constant $\chi.$ Solve the equation

$$0 = X''(x) + X'(x) - \chi X(x)$$

by the means familiar to you from Math 27300. I.e., commit yourself to the ansatz $X(x) = \mathrm{Re}(A_n\mathrm{e}^{i \omega_n x})$ and write down the characteristic polynomial

$$-\omega_n^2 + \mathrm{i} \omega_n - \chi = 0$$

Then also impose the condition that

$$X(x) = X(x+1),$$

which mandates that $\omega_n = 2\pi n$ for $n \in \mathbf{N}.$

Solve for $\chi$ in the characteristic polynomial; then going back to our variable-separated differential equation for $T$ we can write

$$T'(t) = \chi T(t) = (-4\pi^2 n^2 + \mathrm{i} (2\pi n))T(t).$$

You have again the opportunity to make your Basic Theory of Ordinary Differential Equations instructor proud by employing the ansatz

$$T(t) = \mathrm{Re}\left[ B_n \, \mathrm{e}^{(-4\pi^2 n^2 + 2\pi \mathrm{i} n )t}\right]$$

but you would be justifiably chastised if you were not to notice that the solution to the original PDE will hence be obtained by the Ansatz

$$u(t,x) = \mathrm{Re}\left[ \sum_{n \in \mathbb{N}} \mathrm{e}^{(-4\pi^2 n^2 + 2\pi \mathrm{i} n )t} (a_n \cos(2 \pi x) + \mathrm{i}\, b_n \sin (2\pi x))\right]$$

since you realize that the second-order ODE for $X$ requires two undetermined constants per $\omega_n$ and you must take real parts at the end of the calculation for a linear combination of complex ansätze which each satisfy the original PDE.

Now simply apply the initial condition. It's easier if we notice

$$u(0,x)=\cos(2\pi x) = \mathrm{Re}[\mathrm{e}^{2\pi x}]$$

so we can use our knowledge of orthogonal functions to realize

$$a_n = b_n = 1 \, \, \mathrm{for} \, \, n = 1$$

and $0$ otherwise. Then

\begin{align*} u(t,x) &= \mathrm{Re}\left[\mathrm{e}^{(-4\pi^2 + 2\pi \mathrm{i})t}(\cos{2\pi x} + \mathrm{i}\sin{2 \pi x})\right] \\ &= \mathrm{e}^{-4\pi^2 t}[\cos(2\pi t)\cos(2 \pi x) - \sin(2 \pi t) \sin (2 \pi x)]. \end{align*}

Diffycue
  • 836