Wolfram Language

Partial Differential Equations

Solve an Initial Value Problem for a Linear Hyperbolic System

Specify an inhomogeneous linear hyperbolic system with constant coefficients.

Copy to clipboard.
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.

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

Solve the system using DSolveValue.

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

Visualize the solution.

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

Related Examples

Find out if you already have access to Wolfram tech through your organization
×