Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to Mathematica tutorial for the second course APMA0330
Return to Mathematica tutorial for the first course APMA0340
Return to the main page for the course APMA0330
Return to the main page for the course APMA0340
Return to Part VI of the course APMA0330
The main advantage of the Laplace transform method compared to other methods is its simplicity of handling constant coefficient differential equations with intermittent input functions.
This section demonstrates application of the Laplace transform to such differential equations.
We demonstrate advantages of the Laplace transform in solving differential equations with discontinuous inputs. Although the variation of parameters method still works in this case, its practical implementation becomes cumbersome. In contrast, you will see that the Laplace transform handles intermittent input functions almost naturally. A user is recommended to go through examples.
Intermittent Functions
In electrical and mechanical applications, it is common to consider systems that are subject to discontinuous or piecewise continuous forcing functions. For instance, a circuit might be subjected to an applied DC voltage that is held constant at 12 volts for some time and then shut off (i.e., reduced to zero for all subsequent time). Or, one might come home and start using a vacuum cleaner that consumes an alternating voltage source for a certain period of time and then shuts it off, or starts using another electrical device like a coffee maker. Almost all engineering problems lead to piecewise continuous forcing functions, as ON/OFF or stop/start is a major design consideration. Music synthesizers and modeling violins and pianos are clear examples of this stop, start, and change nature in manipulating sound waves.
Abruptly changing input functions are simply seen everywhere in our world. The vast field of impact theory has applications including the optimization of processing materials, impact testing, and visualizing the dynamics of granular media. Impact theory has vast applications in the automotive, military, and medical industries, including studies of the biomechanics of the human body, particularly the hip and knee joints. Other medical applications include studies of neural oscillations (brainwaves) in the spatial distribution and cellular-synaptic generation of hippocampal sharp waves. In traditional aerodynamics, the propagation of shock waves in any media is invariably associated with instantaneous increases in pressure and temperature behind the shock wave. Aircraft landing, road traffic accidents, and the analysis of car outputs on bumping roads also necessarily rely on studying these functions.
A function f(t), defined on a semi-infinite interval [0, ∞), is called piecewise continuous or intermittent if this interval can be broken into a finite number of subintervals
so that the function f(t) is continuous on each of them and has finite limit values at the endpoints. A piecewise continuous function can be defined as
where each function fk(t), k = 1, 2, … , m, is continuous on the interval (𝑎k, bk) and has finite limit values at 𝑎k and
bk. Since we are going to apply the Laplace transformation to these intermittent functions, we require that the function fm(t) grows no faster than the exponential function at infinity in order to define its Laplace transform:
We usually do not specify the values of the piecewise continuous functions at the points of discontinuity (if any) because they do not effect the value of Laplace's integral \eqref{EqInput.1}. However, the inverse Laplace transformation always defines the value of the function at the point of discontinuity to be the mean value of its left and right limit values. Therefore, all used intermittent functions are assumed to posses this mean value property at the points of discontinuity.
The Laplace transformation exists for many functions of a positive real variable (usually associated with time) including discontinuous functions.
Of course, the Laplace transform does not exist for arbitrary functions, but only for those that belong to special classes. Previously, we identified that the Laplace transform exists for functions with finite jumps and that grow no faster than an exponential function at infinity. The algorithm for finding a Laplace transform of an intermittent function consists
of two steps:
Rewrite the given piecewise continuous function through shifted Heaviside functions.
Use the shift rule \( {\cal L} \left[ H(t-a)\, f(t-a) \right] = e^{a\lambda}\, {\cal L} \left[ f(t) \right] , \quad a > 0. \)
Differential Equations with Discontinuous Forcing Functions
Our main objective is to solve linear differential equations with
intermittent forcing functions
where f(t) is a piecewise continuous function \eqref{EqInput.3}. Application of the Laplace transformation for solving differential equations of the form \eqref{EqInput.6} was shown in the previous section, and the procedure remains the same, independently of whether the forcing function f(t) is continuous or intermittent. Since the forcing function may contain one or more discontinuities, the solution of the corresponding initial value problem does not possess the required number of continuous derivatives. This means that we must adjust our definition of solution to this case.
Theorem 1:
Suppose that 𝑎 ≠ 0, b, and c are constants, and f(t) is a piecewise continuous function on [0, ∞), with finite jump discontinuities at t1, t2, …, tn, where
\[
0 < t_1 < t_2 < \cdots < t_n .
\]
Let y0 and y1 be arbitrary real numbers. Then there is a unique function y(t) defined on [0, ∞) with the following properties:
y(0) = y0 and y'(0) = dy/dt(0) = y1;
function y(t) and its derivative dy/dt are continuous on [0, ∞);
second derivative d²y/dt² is defined on every open interval of [0, ∞) that does not contain any of the points t1, t2, …, tn, and
\[
a\,y'' + b\,y' + c\, y = f(t)
\]
on every such subinterval;
second derivative d²y/dt² has limits from the left and right at t1, t2, …, tn.
We illustrate the Laplace transform technique in the numerous examples. To demonstrate the influence of the forcing function, some examples contain several versions of the initial value problem.
Example 1:
Let us consider a RC-circuit.
We recall that the voltagev across a capacitor is related to the electric chargeq by v = Sq, where S = 1/C is the elastance, the inverse of capacitance. The terms elastance and elastivity were coined by Oliver Heaviside in 1886. Since the current is i = dq/dt, an integration gives
\[
v = \frac{1}{C}\,q = Sq = S \int_0^t i(t)\,{\text d}t + S q(0) .
\]
In most cases, the initial charge is zero.
Resistance is the capacity of materials to impede the flow of current or, more specifically, the flow of electric charge. The circuit element used to model this behavior is the resistor. Most materials exhibit a measurable resistance to current. The amount of resistance depends on the material. Metals such as copper and aluminum have small values of resistance, making them good choices for wiring used to conduct electric current. In fact, when represented in a circuit diagram, copper or aluminum wiring isn't usually modeled as a resistor: the resistance of the wire is so small compared to the resistance of other elements in the circuit that we can neglect the wiring resistance to simplify the diagram.
For purposes of current analysis, we must reference the current in the resistor to the terminal voltage. We can do so in two ways: either in the direction of the voltage drop across the resistor or in the direction of the voltage rise across the resistor. If we choose the former, the relationship between the voltage and current is
\[
v = i\,R.
\]
A resistor–capacitor circuit (RC circuit) is an electric circuit composed of resistors and capacitors. It may be driven by a voltage or current source and these will produce different responses. When a voltage source is applied to an RC circuit, the capacitor, C charges up through the resistance, R. In a RC circuit, a capacitor is connected in series with a resistor of resistance R and a source of voltage v(t), the voltage equation is
If we denote by y(t) the charge in the circuit, then this function satisfies (with appropriate scaling factors of capacitance and resistor) the first order inhomogeneous equation
Plot of the solution (in blue), and the input function f(t) in black.
Mathematica code
 
We plot the derivative of the solution (in purple). As it is seen from the graph, the derivative has a finite jump of discontinuity, but the solution is a continuous function.
where the input function steadily ramps up, then keeps constant and finally suddenly is removed:
\[
f(t) = \begin{cases}
0, & \ \mbox{ when } \ 0 < t < 1,
\\
t-1, & \ \mbox{ when } \ 1 < t < 2,
\\
1 , & \ \mbox{ when } \ 2 < t < 3,
\\
4-t , & \ \mbox{ when } \ 3 < t < 4,
\\
0, & \ \mbox{ for }\ t> 4 .
\end{cases}
\tag{1.5}
\]
Here y(t) denotes the current in the circuit. In order to apply the Laplace transformation to the given initial value problem (1.4), we rewrite the input function(1.5) in appropriate form that is ready to apply the shift rule:
Example 2:
Consider a large reservoir containing 2000 liters (L for short) of water that has two holes. One hole has a valve and it is used for incoming mixer and the liquid is leaving through another hole. At time t = 0, the valve is open, delivering 5 L/min of a brine solution containing 0.4 kg of salt per liter. At
t = 30 min, the valve is switched into another position, delivering 5 L/min of brine at a concentration 0.2 kg/L. Initially, 20 kg of salt are dissolved in 2000 L of water in the tank. The exit valve, which empties the reservoir at 5 L/min, maintains the contents of the tank at constant volume. Assuming the solution is kept well stirred, determine the amount of salt in the reservoir at all times t > 0.
Let x(t) be the amount of salt (in kilograms) in the reservoir at time t. Then the ratio x(t)/2000 is the concentration in kilograms per liter. The salt content is depleted at the rate (5 L/min) × (x(t)/2000 kg/L) = x(t)/500 kg/min through the exit valve. Simultaneously, it is enriched through another valve at the rate f(t) given by
To solve the initial value problem (2.1) using the techniques of Part II, we would have to break up the time interval [0, ∞) into two subintervals [0, 30) and (30, ∞). On these subintervals, the nonhomogeneous term
f(t) is constant, and the separation of variables is called to determine the solution at each subinterval. One arbitrary constant could be determined from the initial condition on the interval [0, 30). Its solution then would be used to identify another arbitrary constant for the solution on subinterval (30, ∞).
Of course, this example is used to illustrate a new approach using Laplace transformation. The latter offers several advantages over the previous techniques.
We multiply both sides of Eq.(2.1) by e−λt and integrate with respect to t from 0 to ∞. This leads to the algebraic equation for xL, the Laplace transform of x(t):
Although we can find the explicit expression for function p(t) with the aid of the residue theorem, we prefer to delegate this job to Mathematica:
InverseLaplaceTransform[1/(s + 1/500)/s, s, t]
500 - 500 E^(-t/500)
■
Example 3:
A mass attached to a string is released with the initial velocity below the equilibrium position for the mass-spring system and begins to vibrate. After π seconds the mass is struck by a hammer exerting an impulse on the mass. The system is governed by the symbolic initial value problem
Here y(t) denotes the displacement from the equilibrium position at time t = 0. Applying the Laplace transform, we convert the given IVP (2.1) into the algebraic equation:
However, explicit evaluation of the convolution in the formula above is not easy. Hence, we use the straightforward approach based on the inverse Laplace transform
Plot of the solution (in blue), and f(t) in black.
Mathematica code
 
Finally, we plot the first derivative of the solution in blue (it is continuous) along with the second derivative in purple (it is discontinuous at t = 3).
Since the characteristic polynomial has two simple real roots
\( \lambda^2 + \lambda -2 = (\lambda -1)(\lambda +2) , \) we find the inverse Laplace transform of the second term:
Plot of the solution (in blue), and f(t) in black.
Mathematica code
As you see from the graph, the input function f(t) makes almost no influence on the solution because the initial conditions dominate. If we take the initial conditions to be homogeneous, then the solution to the IVP
Plot of the second derivative of the solution (8.2) in blue, and f(t) in black.
Mathematica code
■
Example 7:
When a resistor, an inductor,
and a capacitor
are connected in series with a voltage supply, the circuit
obtained is called a series RLC circuit.
The differential equation governing the charge q(t) on the capacitor in the RLC circuit is
Plot of the solution (9.2) in blue, and H(t−2) in black.
Mathematica code
■
Return to Mathematica page
Return to the main page (APMA0330)
Return to the Part 1 (Plotting)
Return to the Part 2 (First Order ODEs)
Return to the Part 3 (Numerical Methods)
Return to the Part 4 (Second and Higher Order ODEs)
Return to the Part 5 (Series and Recurrences)
Return to the Part 6 (Laplace Transform)
Return to the Part 7 (Boundary Value Problems)