Mathematica Construct Contour Plot in Mathematica for Quasi-Linear 1-D Wave Eq

AI Thread Summary
To construct a contour plot in Mathematica for the quasi-linear 1-D wave equation, users need to define the equation and the piecewise constant initial conditions accurately. The initial conditions specify different values of ρ based on the position x relative to x0. The contour plot should visually represent the evolution of ρ over time and space, reflecting the characteristics of the wave equation. Proper syntax and functions in Mathematica are crucial for achieving the desired plot. The discussion emphasizes the importance of correctly implementing the initial conditions for accurate contour representation.
Dustinsfl
Messages
2,217
Reaction score
5
How can I construct a contour plot in Mathematica for
Consider the quasi-linear 1-D wave equation
$$
\frac{\partial\rho}{\partial t} + 2\rho\frac{\partial\rho}{\partial x} = 0
$$
with the piecewise constant initial conditions
When $x_0 = \pm 1$

$$
\rho(x,0) = \begin{cases}
4, & x < -x_0\\
3, & -x_0 < x < x_0\\
1, & x > x_0\\
\end{cases}
$$
 
Physics news on Phys.org
dwsmith said:
How can I construct a contour plot in Mathematica for
Consider the quasi-linear 1-D wave equation
$$
\frac{\partial\rho}{\partial t} + 2\rho\frac{\partial\rho}{\partial x} = 0
$$
with the piecewise constant initial conditions
When $x_0 = \pm 1$

$$
\rho(x,0) = \begin{cases}
4, & x < -x_0\\
3, & -x_0 < x < x_0\\
1, & x > x_0\\
\end{cases}
$$

Would this be the correct contour plot?
View attachment 339
 

Similar threads

Replies
1
Views
2K
Replies
3
Views
2K
Replies
7
Views
4K
Replies
4
Views
3K
Replies
1
Views
3K
Replies
6
Views
7K
Replies
2
Views
987
Back
Top