0
$\begingroup$

I've been trying to derive a Fourier-Galerkin approximation of

\begin{equation} \frac{\partial u}{\partial t} + \sin(x) \frac{\partial u}{\partial x} = 0 \end{equation}

But I'm not sure that my steps are correct. My steps are as follows.

First, derive a Fourier-Galerkin approximation of

\begin{equation} \frac{\partial u}{\partial t} + \sin(x) \frac{\partial u}{\partial x} = 0 \end{equation}

Next, express $u$ in terms of a Fourier expansion

\begin{equation} u \approx u_n = \sum_{|n| \leq N/2} a_n(t) e^{inx} \end{equation}

Then the partial derivatives can be approximated as

\begin{equation} \frac{\partial u_n}{\partial t} = \sum_{|n| \leq N/2} \frac{d a_n(t)}{dt} e^{inx}, \quad \frac{\partial u_n}{\partial x} = \sum_{|n| \leq N/2} in a_n(t) e^{inx} \end{equation}

and so

\begin{equation} \frac{\partial u_n}{\partial t} + \sin(x) \frac{\partial u_n}{\partial x} = \sum_{|n| \leq N/2} \frac{d a_n(t)}{dt} e^{inx} + \sin(x) \sum_{|n| \leq N/2} in a_n(t) e^{inx} \end{equation}

The residual is

\begin{equation} r_n = \sum_{|n| \leq N/2} \left(\sin(x) \cdot in a_n(t) + \frac{d a_n(t)}{dt} \right) e^{inx} \end{equation}

and projecting the residual onto $B_N = \text{span}\{e^{inx}\}$ yields

\begin{equation} (r_n, \phi) = \int \sum_{|n| \leq N/2} \left( \sin(x) \cdot in a_n(t) + \frac{d a_n(t)}{dt} \right) e^{inx} e^{-inx} = 0 \end{equation}

It follows then that

\begin{equation} \int \sum_{|n| \leq N/2} \sin(x) \cdot in a_n(t) + \frac{d a_n(t)}{dt} = 0 \end{equation}

from which we obtain a system of ODEs to determine the coefficients $a_n$

\begin{align} \sin(x) \cdot in a_n(t) + \frac{d a_n(t)}{dt} &= 0 \\ \implies \frac{d a_n(t)}{dt} &= -\sin(x) \cdot in a_n(t) \quad \forall |n| \leq N/2 \end{align}

Are my steps correct?

Moreover let's say I want to impose the boundary condition $u(0, t) = u(\pi, t)$, if my understanding of the method is correct I have to change my space $B_n$ accordingly to these boundary conditions. In this case, the periodic function that satisfies these boundary conditions is $\sin(x)$ and therefore $B_n = \text{span}\{\sin(nx)\}$. Am I correct?

$\endgroup$
5
  • $\begingroup$ Thanks to the method of characteristics , solving $\frac{\partial u}{\partial t} + sin(x) \frac{\partial u}{\partial x} = 0$ gives the general solution : $$u(x,t)=F\left(e^{-t}\tan(x/2)\right)$$ where $F$ is an arbitrary function. The condition $u(0,t)=u(\pi,t)$ requires $F(0)=F(\infty)$. They are an infinity many functions satisfying this condition. Thus the specified condition is not sufficient to determine a unique solution. So far I doubt that the problem be well posed. $\endgroup$
    – JJacquelin
    Aug 11, 2020 at 8:29
  • $\begingroup$ @JJacquelin it would be well-posed if I add the condition u(x, 0) = g(x), wouldn't it? $\endgroup$
    – Rage
    Aug 14, 2020 at 7:12
  • $\begingroup$ With the condition is $u(x,0)=g(x)$ instead of $u(0,t)=u(\pi,t)$ the solution is : $$u(x,t)=g\big(2\tan^{-1}(e^{-t}\tan(x/2))\big)$$ $\endgroup$
    – JJacquelin
    Aug 14, 2020 at 7:27
  • $\begingroup$ @JJacquelin with both the conditions $u(x,0) = g(x)$ and u(0, t) = u(\pi, t)$ not by replacing them. However, I'm looking for a Galerkin-Fourier formulation, not an analytical solution so I'm not really following why you are showing me these $\endgroup$
    – Rage
    Aug 14, 2020 at 7:38
  • $\begingroup$ Togheter the conditions $u(x,0)=g(x)$ and $u(0,t)=u(\pi,t)$ supposes $g(0)=g(\pi)$. If not there is no solution. If yes they are an infinity many solutions since an infinity many such functions $g$ exist. The well-posedness or not depends on the function $g$. This changes nothing to my preceeding comment. Nevertheless what ever one is looking for knowing the exact solution (analytical) generaly helps a lot. Of course all this is comment nothing else. If knowing the exact solution is of no help for you, just ignore the comment. $\endgroup$
    – JJacquelin
    Aug 14, 2020 at 9:04

0

You must log in to answer this question.