In solving the one dimensional Euler equation in fluid dynamics, we have two functions. What should I do If I want to solve it without considering that one of them is constant?
$$\frac{\partial u}{\partial t}+u\frac{\partial u}{\partial x}+\frac{\partial p}{\partial x}=0$$
How to obtain $u$ based on $p$? I don't know how to approximate $p$ based on orthogonal basis function to solve the equation.
The method of characteristic for this problem is as follows: $$\frac{dt}{1}=\frac{dx}{u}=\frac{du}{−\partial u/\partial x},$$ $$\int udt= \int dx,\ \ \int udu= \int − \frac{\partial u}{\partial x}dx.$$ Is it possible to approximate $p$ based on orthogonal basis function? If yes, How to choose basis function. I want to obtain a mathematical formula for $u$ based on $p$ function that has a boundary condition on$ x=0$.