Solve an Initial Value Problem for a Linear Hyperbolic System
Specify an inhomogeneous linear hyperbolic system with constant coefficients.
In[1]:=
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]:=
ic = {u[x, 0] == Cos[x]^2, v[x, 0] == Sin[x]};
Solve the system using DSolveValue.
In[3]:=
sol = DSolveValue[{eqns, ic}, {u[x, t], v[x, t]}, {x, t}] //
FullSimplify
Out[3]=
Visualize the solution.
In[4]:=
Plot3D[sol // Evaluate, {x, 0, 4}, {t, 0, 3}, PlotRange -> {-70, 120}]
Out[4]=