Hyperbolic Equations

George E. Hrabovsky

MAST

Introduction

In this lesson we examine how to solve hyperbolic equations in Mathematica. We begin with the wave equation. We study the D’Alembert solution. Then we discuss initial value problems. Then we talk about inhomogeneous wave equations. We then turn to boundary conditions and unbounded regions. We then explore how to solve the equation with Fourier and Laplace transforms. Then we turn to the telegraph equation as a generalization of the wave equation. We will then expand our discussion to problems in two- and three-spatial dimensions.

The Wave Equation

Say that we have a string of length that is fixed at both ends. Assume that there are vibrations that occur in a plane so that displacement of the vibrations is transverse to the string. If we define the amplitude of the vibration is a function of position and time, u(x,t) then the equation describing the vibrations given a wave speed for the material of the string c is

l11_1.png

(11.1)

The right-hand side is the net force due to the tension of the string. Because we have a second time derivative we  need two initial conditions.

l11_2.png

(11.2)

Assume that c=1 and =1, then our equation will be written.

l11_3.png

l11_4.png

We can establish our initial conditions.

l11_5.png

We can also write our boundary conditions.

l11_6.png

We now construct our solution.

l11_7.png

l11_8.png

We take the first five terms.

l11_9.png

l11_10.png

We can plot this .

l11_11.png

l11_12.gif

l11_13.png

l11_14.gif

This is a very strange plot. There might be artifacts. Let’s increase the number of terms.

l11_15.png

The new plot is then.

l11_16.png

l11_17.gif

Let’s examine a specific value of t.

l11_18.png

l11_19.gif

Let’s make an animation of this.

l11_20.png

D’Alembert’s Solution

Given the wave equation (11.1), it is possible to introduce two new variables,

l11_22.png

(11.3)

and

l11_23.png

(11.4)

We can then rewrite u(x,t) as f(μ,ν). We can then rewrite the wave equation,

l11_24.png

(11.5)

We can write this equation.

l11_25.png

Its solution is then given.

l11_26.png

l11_27.png

Reversing the transformation, we get a general solution to the wave equation,

l11_28.png

(11.6)

We can get this solution by using DSolve by first writing the general wave equation.

l11_29.png

l11_30.png

We can then get the solution.

l11_31.png

l11_32.png

So we have two characteristic functions. This is called the d’Alembert solution, after the French mathematician and physicist Jean le Rond d’Alembert (1717-1783).

IVPs

If we apply an exponential initial condition, we will see an interesting phenomena.

l11_33.png

We then construct our solution.

l11_34.png

l11_35.png t≥0
Indeterminate True

We can plot this.

l11_36.png

l11_37.gif

This displays the characteristics well.

We can also introduce an initial condition involving piecewise defined initial data.

l11_38.png

Now the solution looks like this.

l11_39.png

l11_40.png t≥0
Indeterminate True

The solution can be plotted.

l11_41.png

l11_42.gif

We can also examine a decaying exponential function as an initial condition.

l11_43.png

Here we write the solution.

l11_44.png

l11_45.png t≥0
Indeterminate True

Here is the plot of this solution.

l11_46.png

l11_47.gif

The Inhomogeneous Wave Equation

An inhomogeneous version of the wave equation is of the form,

l11_48.png

(11.7)

We write the equation.

l11_49.png

We can write an interesting initial condition.

l11_50.png

The solution is then.

l11_51.png

l11_52.png t≥0
Indeterminate True

We can make a table of plots for various values of f.

l11_53.png

-1. l11_54.gif
-0.8 l11_55.gif
-0.6 l11_56.gif
-0.4 l11_57.gif
-0.2 l11_58.gif
0. l11_59.gif
0.2 l11_60.gif
0.4 l11_61.gif
0.6 l11_62.gif
0.8 l11_63.gif
1. l11_64.gif
1.2 l11_65.gif
1.4 l11_66.gif
1.6 l11_67.gif
1.8 l11_68.gif
2. l11_69.gif

Boundary Conditions

Boundary conditions for this type of equation are similar to what we have covered so far. I will examine a source on a boundary, in other words an inhomogeneous boundary condition. We will use eqn1 from above.

The initial conditions are written.

l11_70.png

The boundary conditions are then written so that a source term appears.

l11_71.png

We then build our solution.

l11_72.png

l11_73.png K[1]∈Z&&K[1]≥1
Indeterminate True

We can get the first five terms of this series.

l11_74.png

l11_75.png

We can plot this.

l11_76.png

l11_77.gif

If we apply a quadratic source as an initial condition while fixing the endpoints, we use Dirichlet conditions. We write the initial conditions.

l11_78.png

The boundary conditions establish the fixed endpoints.

l11_79.png

We then build the solution.

l11_80.png

l11_81.png

We extract the first five terms.

l11_82.png

l11_83.png

The plot of this if then given.

l11_84.png

l11_85.gif

If we have a quartic source, we can use Neumann conditions.

l11_86.png

We then build the solution.

l11_87.png

l11_88.png

We extract the first five terms.

l11_89.png

l11_90.png

The plot of this if then given.

l11_91.png

l11_92.gif

Let’s say that we have one end that is strictly controlled and we apply a force to the other end. On one end we have a Neumann condition and a Dirichlet condition while the other end is allowed to be free of any initial condition.

l11_93.png

We then build the solution.

l11_94.png

l11_95.png K[1]∈Z&&K[1]≥1
Indeterminate True

We extract the first five terms.

l11_96.png

l11_97.png

The plot of this if then given.

l11_98.png

l11_99.gif

Unbounded Regions

As in the previous cases we can establish unbounded regions. For example, if we extend our string to be the whole line, we would use (11.1) and the following initial and boundary conditions,

l11_100.png

(11.8)

We can input these into Mathematica.

l11_101.png

The solution is then calculated.

l11_102.png

l11_103.png t≥0
Indeterminate True

We can plot this.

l11_104.png

l11_105.gif

We can see the detailed evolution of this wave.

l11_106.png

l11_107.gif

The Fourier Transform Method

We can rewrite eqn1 using Fourier Transforms

l11_108.png

l11_109.png

We can translate this into something we can read.

l11_110.png

l11_111.png

Let’s adopt the initial conditions for an infinite string and Fourier transform them.

l11_112.png

l11_113.png

Again we make this readable.

l11_114.png

l11_115.png

We now have a simple differential equation for the function U. We can solve this IVP.

l11_116.png

l11_117.png

We transform this back to get the solution.

l11_118.png

l11_119.png

This is the result we got above.

Laplace Transforms

We can attempt to solve our previous equation using Laplace transforms. We begin by transforming the equation.

l11_120.png

l11_121.png

We can perform a rewrite of this to make it more readable. We will also include the initial conditions here.

l11_122.png

l11_123.png

We attempt our solution.

l11_124.png

l11_125.png

We can attempt an inverse Laplace transform on this.

l11_126.png

l11_127.png

This is as far as Mathematica can go. Consulting tables of inverse Laplace transforms involving the error function didn’t help either. It is possible to use such tables to be able to write rules that transform Mathematica expressions. We could perform a numerical solution, but there is no point as it would reveal nothing in terms of the Laplace or inverse Laplace transform methods. A numerical solution works just as well for the original equation. This illustrates an important point, not every method is applicable or useful in solving every problem.

There are problems where this works. Let’s say we have a string of finite length, we can always scale this to a unit length. Say instead we have the Laplace transform.

l11_128.png

l11_129.png

We have the boundary conditions,

l11_130.png

(11.9)

We then write.

l11_131.png

l11_132.png

We make these transformations.

l11_133.png

l11_134.png

We now solve the ODE.

l11_135.png

l11_136.png

We transform this back

l11_137.png

l11_138.png

We can compare this to the DSolve result.

l11_139.png

l11_140.png

l11_141.png

l11_142.png

l11_143.png

We get the same answer.

The Telegraph Equation

If we allow a damping effect γ, a restoring force coefficient β, and an external forcing effect f(x,t), then we can generalized the wave equation,

l11_144.png

(11.10)

This is called the telegraph equation. Assuming c=1, β=1/2, γ=1/2, and f(x,t)=1, then we write this.

l11_145.png

We write our quadratic initial conditions for our unit length string.

l11_146.png

We fix the end points in the boundary conditions.

l11_147.png

We construct the solution.

l11_148.png

l11_149.png K[1]∈Z&&K[1]≥1
Indeterminate True

We extract the first five terms.

l11_150.png

l11_151.png

We can plot this.

l11_152.png

l11_153.gif

l11_154.png

l11_155.gif

Two Dimensions

As with the other classes of PDEs we have examined, we can extend this type to two spatial dimensions, too. For example, instead of a string, let’s say we have a rectangular membrane that is vibrating. Say this rectangle is a square such that 0<x<π and 0<y<π. In the absence of a damping force and where the boundaries are held fixed we can re write the wave equation,

l11_156.png

(11.11)

and we can write the initial conditions,

l11_157.png

(11.12)

where the boundary conditions are given as,

l11_158.png

(11.13)

If the wave speed is 1, we can then write the equation and its IVBVP.

l11_159.png

l11_160.png

l11_161.png

We can then build our solution.

l11_162.png

l11_163.png

We can find the first five terms.

l11_164.png

l11_165.png

We can then plot this for a specific time.

l11_166.png

l11_167.gif

We can animate this.

l11_168.png

Three Dimensions

Of course, we can also extend the ability to solve PDEs to three dimensions. Here we study the vibrations of a parallelepiped of 3 units on a side. Again there is no damping. The IVBVP resulting is characterized by these equations,

l11_170.png

(11.14)

l11_171.png

(11.15)

l11_172.png

(11.16)

l11_173.png

(11.17)

l11_174.png

(11.18)

l11_175.png

(11.19)

l11_176.png

(11.20)

l11_177.png

(11.21)

l11_178.png

(11.22)

We can write this system in Mathematica.

l11_179.png

l11_180.png

l11_181.png

We then build the solution.

l11_182.png

l11_183.png

We can find the first five terms.

l11_184.png

We can then plot this for a specific time.

l11_185.png

l11_186.gif

This plot took just over three hours to produce.

Created with the Wolfram Language