Wolfram Language

Partial Differential Equations

Solve an Initial Value Problem for a Linear Hyperbolic System

Specify an inhomogeneous linear hyperbolic system with constant coefficients.

In[1]:=
Click for copyable input
eqns = {D[u[x, t], t] == D[v[x, t], x] + 1, D[v[x, t], t] == -D[u[x, t], x] - 1};

Prescribe initial conditions for the system.

In[2]:=
Click for copyable input
ic = {u[x, 0] == Cos[x]^2, v[x, 0] == Sin[x]};

Solve the system using DSolveValue.

In[3]:=
Click for copyable input
sol = DSolveValue[{eqns, ic}, {u[x, t], v[x, t]}, {x, t}] // FullSimplify
Out[3]=

Visualize the solution.

In[4]:=
Click for copyable input
Plot3D[sol // Evaluate, {x, 0, 4}, {t, 0, 3}, PlotRange -> {-70, 120}]
Out[4]=

Related Examples

de es fr ja ko pt-br ru zh