3

We are looking at the equation $$ \partial_t u+a(x) \partial_x u=g(x, t), \quad x \in[-2,2] $$ with $$ a(x)= \begin{cases}1.5 & |x| \leq 0.5 \\ 1 & \text { otherwise }\end{cases} $$ We are asked to derive $g(x,t)$ such that $u(x, t)=\sin (\pi(x-a(x) t))$ is the exact solution to the PDE. The context is DGFEM.

The word "exact" is confusing to me, the above solution satisfies the PDE weakly with $g(x,t)=0$ as one can simply split the integral into the different constant advection speeds and then get 0 inside each integral.

However, using something like method of charactericts with g(x,t)=0 you clearly get different solution as the wave travels faster in the middle it does not simply "jump" to a part further down the sine wave. As such we also obtain a different solution when using DGFEM to solve the PDE numerically.

There might just be something wrong with the exercise, but if there is I would at least like to know why. If everything was smooth, one could simply insert the solution to get the right hand side and thus any solution could work. I am also curious about uniqueness of weak solutions, as there clearly exists multiple here. Thank you!

  • 1
    If I'm not mistaken, the methods you mention produce continuous/differentiable solutions only; here, the PDE is discontinuous at $x = \pm1/2$ and the solution has to be considered as a distribution (e.g. $u_x$ will show a Dirac delta term in the present case). In consequence, you have to use methods which can handled such 'ill-definedness', as Fourier transform for instance. – Abezhiko Mar 10 '23 at 16:30

1 Answers1

1

The specific topic you are searching for is Methods of Manufactured solutions.

In order get $$ u(x, t)=\sin (\pi(x-a(x) t)), $$ for a given PDE $$ \partial_t u+a(x) \partial_x u=g(x, t), \quad x \in[-2,2], $$ with unknown source $$ g(x,t), $$ you simply have to plug-in the exact solution $$ \partial_t \left[ \sin (\pi(x-a(x) t)) \right]+a(x) \partial_x \left[ \sin (\pi(x-a(x) t)) \right] = g(x, t). $$ After calculating the analytical derivatives and resorting you get $$ g(x, t) = -\pi a(x) \cos(\pi (x - t a(x)) +a(x) \pi (1 - t a'(x)) cos(\pi (x - t a(x))). $$ The important part here is to take $$ a'(x)= \dots, $$ into account. I will left that for you as an exercise.

Edit:

Link: Heaviside step function

  • Thank you! I have been down that path but a'(x) can only be defined in terms of distributions with (a'(x)=$\pm \frac12$ at $x=\pm \frac12$. Thus are the chain rules you used valid when a(x) is not differentiable in the classical sense? I have tried implemting exactly the above but it does not lead to the original solution when solved numerically. – Victor Hansen Mar 10 '23 at 19:15
  • It is valid for all point except $x=0.5$ using classical functions. See the link for the Heavyside step function and its derivative. Hint: You have to integrate a Dirac delta function. – ConvexHull Mar 10 '23 at 19:37