Consider the ODE for a driven harmonic oscillator with no dissipation:
x¨+ω2x=f(t),x(0)=x0,x˙(0)=v0,(1.1)
where we pick f to be completely generic.
One approach we may attempt in order to solve this equation is to use Fourier transforms. By writing x(t) as
x(t)=∫−∞∞2πdkeiktx(k)
we see that time derivatives will just bring out factors of ik from the exponent. We write the analogous expression for f as an integral of f(k), and obtain
∫−∞∞2πdkeikt(−k2+ω2)x(k)=∫−∞∞2πdkeiktf(k).
From the orthogonality of the Fourier basis, this will hold only if
(−k2+ω2)x(k)=f(k)⟹x(k)=ω2−k2f(k).
Unfortunately for us, this expression has singularities at k=±ω. The inverse transform, given by
is therefore ill-defined. This is the first issue with this approach.
The second issue comes from the intermediate calculation of the Fourier transform of f, namely
f~(k)=∫−∞∞dteiktf(t),
for which we need information about f(t) for all times, including future times relative to our evaluation point. This seems to violate our physical intuition that the response at time t should only depend on the forcing for times t′≤t, which means our approach does not seem to preserve causality.
In what follows, I will present three ways to deal with these issues and solve this system. We will then see how different approaches tackle the issues of causality and divergence, and how all converge to the same answer.
Notice that the general solution to the inhomogeneous system (1.1) is the general solution of the homogenous equation, plus a specific solution xp to the inhomogeneous one:
x(t)=Asinωt+Bcosωt+xp(t).(1.2)
We will mostly focus on finding xp(t).
The basic approach: variation of parameters
As a linear differential equation with constant coefficients, we can tackle this equation with standard methods, and particularly with the method of variation of parameters.
Recall the method for a second-order equation: given two linearly independent solutions u1(t) and u2(t), we seek a solution to the inhomogeneous equation of the form
xp(t)=A(t)u1(t)+B(t)u2(t)
where A(t) and B(t) are currently undetermined. Since we have two unknowns, we can add a constraint between them to close the system; a convenient one is
A˙(t)u1(t)+B˙(t)u2(t)=0∀t
since it also simplifies a lot the algebraic manipulations. As the Wikipedia page derives, one can then find explicitly the functions A and B as any indeterminate integrals
is the so-called Wronskian determinant. The lower limit of the integrals can be chosen at will - their choice is basically that of two arbitrary constants. These will contribute to the solution a factor of const1u1(t)+const2u2(t) which can be absorbed into the constants in (1.2). For now, let us set it to be a number t0, to be determined.
Given an inhomogeneous differential equation, schematically written
Lu=f
(where L=L(t) is a differential operator and u is the solution we seek), we define the Green’s functionG=G(t,t′) for the operator L as the distribution satisfying the same equation, but with the right-hand side formally replacing f with a delta function:
LG(t,t′)=δ(t,t′)
If the system displays time-translation invariance, then G is just a function of the time difference t−t′ and so
It follows that our problem, (1.1), can be solved by direct integration if we can find G satisfying
G¨(t)+ω2G(t)=δ(t).(3.2)
Now, Green’s functions are usually not unique; if u0 is a solution to the homogeneous equation, then G+u0 is a valid Green’s function. We may, therefore, seek a causal Green’s function that satisfies G(t−t′)=0 only if t>t′, and zero otherwise, since in this case (3.1) becomes
u(t)=∫−∞tG(t−t′)f(t′)dt′
only depending on information available before time t.
Note: in physics, one often calls such G the retarded Green’s function. One could also do the opposite, and seek G that is zero for all times later than the present (and advanced Green’s function).
We thus find our first “boundary condition” on G: G(t−t′)=0 for all t′>t, or equivalently
G(t)=0 for all t<0.(3.3)
Secondly, we can directly integrate (3.2) between [−ϵ,ϵ], for small ϵ>0, yielding
G˙(ϵ)−G˙(−ϵ)+ω2∫−ϵϵG(t)dt=1.
If we assume G to be continuous, then in the limit ϵ→0+ the integral vanishes. (3.3) further implies G˙(−ϵ)→0, and hence we find the second boundary condition:
G˙(0+)=1.(3.4)
Notice how the delta function introduces a discontinuity in the first derivative at t=0.
We now rephrase problem (3.2) as
G¨(t)+ω2G(t)=δ(t) for G continuous, with G(t)=0,t<0 and G˙(0+)=1.
The strategy to find G is to realize that, for t>0, the delta function vanishes and we have to solve the equation for a free harmonic oscillator:
G¨(t)+ω2G(t)=0,t>0⟹G(t)=Acosωt+Bsinωt.
Now, we impose the conditions. Continuity at t=0 requires
From the variation of parameters formulas, we can actually obtain the Green’s function as well. Recall that we had two independent solutions of the homogenous equation, u1(t) and u2(t), and we tried to write a specific solution to the inhomogeneous equation as
Comparing this to (3.1), we can read off the Green’s function as
G(t,t′)=W(t′)u1(t′)u2(t)−u1(t)u2(t′)
In our case, with W=ω and u1(t)=cosωt, u2(t)=sinωt, this yields
G(t,t′)=ω1(sinωtcosωt′−sinωt′cosωt)=ωsinω(t−t′)
which is the correct expression.
Note that this expression is defined for all t,t′, but the retarded Green’s function requires G(t,t′)=0 for t<t′. In the variation of parameters derivation, causality is enforced not by G itself but by the upper limit of integration ∫t, which restricts t′≤t. To make the connection with (3.5) explicit, one should write
G(t,t′)=ωsinω(t−t′)1t≥t′.
Approach 2: Laplace transform
The Laplace transform is a general tool for analyzing dynamical systems. Its usefulness for us stems mostly from how it is automatically causal.
For a function f, its Laplace transform is
f(s)≡L{f}(s)=∫0−∞f(t)e−stdt(4.1)
for s∈C. Integration by parts gives the usual rule for the derivative transform:
L{f˙}(s)=sf(s)−f(0−)
and applying this rule once more gives
L{f¨}(s)=s2f(s)−sf˙(0−)−f(0−)
The fact that the lower limit of integration is 0− means that the support of the standard delta function δ(t) is contained in the domain of integration, and so one finds
L{δ}(s)=∫0−∞δ(t)e−stdt=1.
We are thus able to take the transform of (3.2), i.e. G¨(t)+ω2G(t)=δ(t), as
s2G(s)−sG˙(0−)−G(0−)+ω2G(s)=1.
Now, we have seen that G(0−)=G˙(0−)=0, so these terms vanish from the left-hand side. We find
G(s)=s2+ω21.(4.2)
For the inverse, we cheat and use a lookup table for common Laplace transforms. Wikipedia says that
s2+ω2ω is the transform of sinωt1t≥0,
so we immediately find
G(t)=ωsinωt1t≥0
exactly like in (3.5).
Approach 3: back to the Fourier transform
This is by far the hardest and most error-prone approach for this equation, but its discussion is nonetheless interesting.
As we mentioned in the introduction, by taking the Fourier transform of the original equation, we have obtained the Fourier-space equation
(−k2+ω2)x(k)=f(k)
which is ill-defined at k=±ω. We tackle this now.
For consistency, since we discussed Green’s functions in the two previous sections, we will do the same here; then, instead of x and f we consider G and δ, the latter whose Fourier transform is
δ(k)=∫−∞∞dte−iktδ(t)=1.
Therefore, in Fourier space, the Green’s function is
G(k)=ω2−k21
(which of course still has the same singularities) and the inverse transform is thus
Anyone who has studied complex analysis will recognize this integral as a potential candidate for contour integration. We would like to promote k into a complex number z and consider a closed contour, parameterized by a radius R>0, such that the original integral becomes the limiting case of the integral over the real line segment [−R,R] of the contour, and with the integral over the remaining contour vanishes as R→∞. Then, the residue theorem allows us to obtain a finite integral.
The issue is then, of course, that the contour currently goes straight over the poles±ω. We need some sort of adjustment, either at the circuit level (making it turn around the poles) or at the pole level (shifting their position).
Let us consider a slightly different problem: consider our differential equation but with an added dissipation term:
x¨+ϵx˙+ω2x=f(t).
We expect (hope) that we can solve the equation for ϵ=0 and then take the limit ϵ→0+.
Now, by replacing f(t) with δ(t) and taking the transform, we arrive at the following expression for the Green’s function:
G(k)=ω2−k2+iϵk1.
The Green’s function in time domain is then given by the transform
G(t)=∫−∞∞2πdkω2−k2+iϵkeikt.
We want to tackle this integral via contour integration, formally replacing the real k with a complex number z . The poles are now the complex solutions of ω2−z2+iϵz=0, or
z±=±ω+2iϵ+O(ϵ2).
We see that both roots now live in the upper half-plane, at a distance ϵ/2 of the real axis.
Where should we close the contour? If we split z into its real and imaginary parts as z=α+iβ, the exponential is
eizt=eiαte−βt.
There are two cases to consider:
If t≥0, then the exponent e−βt will not diverge if β is restricted to be positive, or equivalently, if z lives in the upper half-plane. In other words, we should close the circuit on the upper half-plane for t≥0, and since the poles are contained in this region, the integral will be non-zero (see figure below)
If t<0, then we need β<0 too, and the integral should be done in the lower half-plane. In this case, no poles are contained within the integration contour, and the integral is zero.
We have thus found that
G(t)=0if t<0,
i.e. causality is immediately satisfied as long as there is even a slight dissipation factor ϵ.
We can now proceed to calculate the integral via the residue theorem. Let CR denote the half-circle in the picture above, with radius R, and abbreviate