# A Finite Element Method for a first order PDE?

I want to develop a finite element method to solve for $$u(x,t)$$ the PDE: $$u_t+c u_x= \frac{-c}{x}u$$ where $$c$$ is a constant.

• so I am trying the following ( as Rothe's method? ) :

Letting $$k= t_n- t_{n-1}$$ ( we begin by time discretization? ) we can write $$\frac{u_i^n-u_i^{n-1}}{k}+ c\left(\frac{u_i^n-u_{i-1}^{n}}{\Delta x}\right)=\frac{-c}{x}u_i^n$$ Which gives the time stepping formula $$\left(1+ \frac{kc}{x}+ \frac{kc}{\Delta x}\right)u_i^n= u_i^{n-1}+ \frac{kc}{\Delta x}u_{i-1}^{n}$$ I can't avoid to notice that this is a direct finite difference scheme, which can be implemented without using finite elements.

• How should I try the weak formulation of the PDE? I need help with that $$\int_\Omega u_t\phi(x) dx +c \int_\Omega u_x\phi(x) dx= \int_\Omega \frac{-c}{x}u\phi(x) dx$$ $$\int_\Omega u_t\phi(x) dx +cu\phi(x)- c\int_\Omega u\phi'(x) dx= \int_\Omega \frac{-c}{x}u\phi(x) dx$$ How to handle the time derivative of $$u$$ ?
• Is $x=0$ part of your domain? What happens there? Jun 21, 2022 at 0:46
• The domain for $x$ should be $[0,\infty)$ but now I think we can just take $[1,\infty)$ to avoid $0$ Jun 21, 2022 at 15:53
• What is the difference between this and your previous question? Jun 21, 2022 at 20:42