Open-access Variation of parameters and Green functions: A pedagogical analysis for second-order differential equations

Abstract

The construction of Green functions from variation of parameters is classical and appears, explicitly or implicitly, in standard treatments of ordinary and partial differential equations. We present a pedagogical analysis of this well-known relationship for linear second-order ordinary differential equations. The purpose is not to propose a new construction, but to make its logical structure explicit. In particular, we distinguish the redundancy in the coefficient functions used in variation of parameters, the freedom to add a homogeneous solution to a particular solution, and the selection of a unique solution by well-posed initial or boundary conditions. For a regular two-point problem, the Green function is built from homogeneous solutions adapted to the left and right endpoints. Retarded and advanced kernels follow from the same variation-of-parameters formula when initial or terminal data are imposed. Continuity at the source point and the jump of the first derivative are derived both algebraically and distributionally. An elementary example compares two-point, retarded, and advanced Green functions.

Keywords:
Variation of parameters; Green function; boundary-value problem; initial-value problem

1. Introduction

Variation of parameters and Green functions are standard methods for solving nonhomogeneous linear differential equations. The first constructs a particular solution by allowing the coefficients of a homogeneous basis to vary. The second represents the solution as a superposition of responses to point sources. Their relationship is classical. Standard texts on ordinary differential equations, mathematical physics, and boundary-value problems derive Green functions precisely from variation of parameters or from the equivalent construction based on two homogeneous solutions [1, 2, 3, 4, 5, 6, 7, 8]. Accordingly, no mathematical novelty is claimed for the underlying connection examined here.

The specific pedagogical contribution of the present treatment is to place three constructions side by side and to identify precisely what changes from one to another. Once the integration limits in the variation-of-parameters formula are adapted to two separated endpoint conditions, the formula becomes the usual two-point Green function. Choosing both limits at the left or right endpoint instead produces the retarded or advanced kernel associated with initial or terminal data. This comparison also separates three notions that are easily confused: redundancy in the coefficient functions, nonuniqueness of a particular solution, and uniqueness of a fully specified problem.

For a second-order equation, the homogeneous solution space supplies the building blocks of the kernel, the integration limits determine whether it is two-sided, retarded, or advanced, and the endpoint conditions select an inverse of the differential operator. The continuity and derivative-jump conditions normally used to characterize a Green function are already encoded in the Wronskian appearing in variation of parameters.

The purpose of this article is therefore expository rather than foundational: to give a self-contained account suitable for courses on mathematical methods and to prevent these logically distinct issues from being conflated. A particular solution remains defined up to a homogeneous term. A unique solution is selected only by a complete set of well-posed initial or boundary conditions, and a two-point Green function exists as an ordinary inverse only when the associated homogeneous boundary-value problem has no nonzero solution. Section 2 reviews variation of parameters, Sec. 3 constructs the two-point kernel, Sec. 4 derives the one-sided kernels, and Sec. 5 explains the matching conditions distributionally. Section 6 compares the constructions in an elementary example.

2. Variation of Parameters

Consider the normalized equation

(1) L y ( x ) ≡ y ′ ′ ( x ) + P ( x ) y ′ ( x ) + Q ( x ) y ( x ) = R ( x ) , a ≤ x ≤ b ,

where P,Q∈C⁢[a,b] and R is integrable. Let y1 and y2 be a fixed pair of linearly independent solutions of L⁢y=0. Their Wronskian is

(2) W ⁢ ( x ) = y 1 ⁢ ( x ) ⁢ y 2 ′ ⁢ ( x ) − y 1 ′ ⁢ ( x ) ⁢ y 2 ⁢ ( x ) .

Abel’s identity gives

(3) W ⁢ ( x ) = W ⁢ ( x 0 ) ⁢ exp ⁡ [ − ∫ x 0 x P ⁢ ( s ) ⁢ d s ] ,

so W is nonzero throughout the interval if it is nonzero at one point.

Variation of parameters seeks

(4) y p ⁢ ( x ) = v 1 ⁢ ( x ) ⁢ y 1 ⁢ ( x ) + v 2 ⁢ ( x ) ⁢ y 2 ⁢ ( x ) .

This representation is invariant under

(5) v 1 → v 1 + λ y 2 , v 2 → v 2 − λ y 1 ,

where λ⁢(x) is arbitrary. This is a redundancy in the representation of the same yp, not the freedom to add a homogeneous solution.

Let

(6) S ⁢ ( x ) = v 1 ′ ⁢ ( x ) ⁢ y 1 ⁢ ( x ) + v 2 ′ ⁢ ( x ) ⁢ y 2 ⁢ ( x ) .

Under the transformation (5), this combination becomes

(7) S ˜ = ( v 1 ′ + λ ′ y 2 + λ y 2 ′ ) y 1 + ( v 2 ′ − λ ′ y 1 − λ y 1 ′ ) y 2 = S + λ ( y 1 y 2 ′ − y 1 ′ y 2 ) = S + λ W .

The terms proportional to λ′ cancel. Because W≠0, choosing λ=−S/W produces S~=0. Thus the conventional auxiliary condition

(8) v 1 ′ ⁢ y 1 + v 2 ′ ⁢ y 2 = 0

can always be imposed without changing yp.

To see how the second equation for v1′ and v2′ arises, differentiate Eq. (4) and use Eq. (8):

(9) y p ′ = v 1 ⁢ y 1 ′ + v 2 ⁢ y 2 ′ .

A second differentiation gives

(10) y p ′′ = v 1 ′ ⁢ y 1 ′ + v 2 ′ ⁢ y 2 ′ + v 1 ⁢ y 1 ′′ + v 2 ⁢ y 2 ′′ .

Substitution into L⁢yp=R yields

(11) L y p = v 1 ′ y 1 ′ + v 2 ′ y 2 ′ + v 1 ( y 1 ′ ′ + P y 1 ′ + Q y 1 ) + v 2 ( y 2 ′ ′ + P y 2 ′ + Q y 2 ) = v 1 ′ y 1 ′ + v 2 ′ y 2 ′ = R ,

because L⁢y1=L⁢y2=0. (Equations 8) and (11) form the linear system

(12) ( y 1 y 2 y 1 ′ y 2 ′ ) ⁢ ( v 1 ′ v 2 ′ ) = ( 0 R ) .

Its determinant is W. Cramer’s rule therefore gives

(13) v 1 ′ = − y 2 R W , v 2 ′ = y 1 R W .

Integrating from arbitrary reference points x1,x2∈[a,b] gives

(14) v 1 ⁢ ( x ) = v 1 ⁢ ( x 1 ) − ∫ x 1 x y 2 ⁢ ( ζ ) ⁢ R ⁢ ( ζ ) W ⁢ ( ζ ) ⁢ d ζ ,
(15) v 2 ⁢ ( x ) = v 2 ⁢ ( x 2 ) + ∫ x 2 x y 1 ⁢ ( ζ ) ⁢ R ⁢ ( ζ ) W ⁢ ( ζ ) ⁢ d ζ .

The terms v1⁢(x1)⁢y1+v2⁢(x2)⁢y2 are homogeneous and may be included in the complementary solution. A particular solution can consequently be chosen as

(16) y p ( x ) = − y 1 ( x ) ∫ x 1 x y 2 ( ζ ) R ( ζ ) W ( ζ ) d ζ + y 2 ( x ) ∫ x 2 x y 1 ( ζ ) R ( ζ ) W ( ζ ) d ζ .

Changing either lower limit changes Eq. (16) only by a linear combination of y1 and y2. Thus variation of parameters produces particular solutions differing by homogeneous terms. Initial or boundary conditions determine which member of this family is appropriate.

3. Two-point Boundary-value Green Function

Consider separated homogeneous conditions

(17) B a ⁢ [ y ] ≡ α 1 ⁢ y ⁢ ( a ) + α 2 ⁢ y ′ ⁢ ( a ) = 0 ,
(18) B b ⁢ [ y ] ≡ β 1 ⁢ y ⁢ ( b ) + β 2 ⁢ y ′ ⁢ ( b ) = 0 ,

where neither coefficient pair vanishes. These conditions include Dirichlet, Neumann, and Robin conditions. Choose nonzero homogeneous solutions u and v such that

(19) L u = L v = 0 , B a [ u ] = 0 , B b [ v ] = 0.

We assume that u and v are linearly independent. Equivalently, the homogeneous problem satisfying both endpoint conditions has only the trivial solution. This nonresonance condition is necessary for a unique ordinary inverse.

Taking y1=u, y2=v, x1=b, and x2=a in Eq. (16) gives

(20) y ⁢ ( x ) = u ⁢ ( x ) ⁢ ∫ x b v ⁢ ( ζ ) ⁢ R ⁢ ( ζ ) W ⁢ ( ζ ) ⁢ d ζ + v ⁢ ( x ) ⁢ ∫ a x u ⁢ ( ζ ) ⁢ R ⁢ ( ζ ) W ⁢ ( ζ ) ⁢ d ζ ,

where W=W⁢[u,v]. This is

(21) y ⁢ ( x ) = ∫ a b G B ⁢ ( x , ζ ) ⁢ R ⁢ ( ζ ) ⁢ d ζ ,

with

(22) G B ⁢ ( x , ζ ) = { u ⁢ ( x ) ⁢ v ⁢ ( ζ ) W ⁢ ( ζ ) , a ≤ x < ζ , u ⁢ ( ζ ) ⁢ v ⁢ ( x ) W ⁢ ( ζ ) , ζ < x ≤ b .

It is useful to verify Eq. (20) directly. Define

(23) I v ( x ) = ∫ x b v ( ζ ) R ( ζ ) W ( ζ ) d ζ , I u ( x ) = ∫ a x u ( ζ ) R ( ζ ) W ( ζ ) d ζ .

Then y=u⁢Iv+v⁢Iu. By the fundamental theorem of calculus,

(24) I v ′ = − v R W , I u ′ = u R W .

The terms containing u⁢v⁢R/W cancel in the first derivative, leaving

(25) y ′ = u ′ ⁢ I v + v ′ ⁢ I u .

Differentiating once more gives

(26) y ′ ′ = u ′ ′ I v + v ′ ′ I u − u ′ v R W + v ′ u R W = u ′ ′ I v + v ′ ′ I u + R ,

because u⁢v′−u′⁢v=W. Hence

(27) L ⁢ y = ( L ⁢ u ) ⁢ I v + ( L ⁢ v ) ⁢ I u + R = R .

At x=a, Iu⁢(a)=0, so

(28) B a ⁢ [ y ] = I v ⁢ ( a ) ⁢ B a ⁢ [ u ] = 0 .

At x=b, Iv⁢(b)=0, so

(29) B b ⁢ [ y ] = I u ⁢ ( b ) ⁢ B b ⁢ [ v ] = 0 .

Thus Eq. (20) satisfies both the differential equation and the prescribed endpoint conditions.

The matching conditions can also be derived explicitly. At x=ζ, the two branches in Eq. (22) obey

(30) G B ⁢ ( ζ + , ζ ) − G B ⁢ ( ζ − , ζ ) = 0 ,
(31) ∂ x G B ⁢ ( ζ + , ζ ) − ∂ x G B ⁢ ( ζ − , ζ ) = 1 ,

where the second identity follows directly from the definition of the Wronskian. Hence

(32) L x ⁢ G B ⁢ ( x , ζ ) = δ ⁢ ( x − ζ ) ,

and Eq. (20) is the unique solution of the inhomogeneous boundary-value problem.

For comparison with the usual coefficient construction, let an arbitrary homogeneous basis be denoted by y1,y2 and write

(33) G ≶ ( x , ζ ) = c 1 ≶ ( ζ ) y 1 ( x ) + c 2 ≶ ( ζ ) y 2 ( x ) .

Set Δ⁢cj=cj>−cj<. Continuity and the unit derivative jump give

(34) ( y 1 ⁢ ( ζ ) y 2 ⁢ ( ζ ) y 1 ′ ⁢ ( ζ ) y 2 ′ ⁢ ( ζ ) ) ⁢ ( Δ ⁢ c 1 Δ ⁢ c 2 ) = ( 0 1 ) .

Since the determinant is W⁢(ζ), Cramer’s rule yields

(35) Δ c 1 = − y 2 ( ζ ) W ( ζ ) , Δ c 2 = y 1 ( ζ ) W ( ζ ) .

Consequently,

(36) G > ⁢ ( x , ζ ) − G < ⁢ ( x , ζ ) = y 1 ⁢ ( ζ ) ⁢ y 2 ⁢ ( x ) − y 2 ⁢ ( ζ ) ⁢ y 1 ⁢ ( x ) W ⁢ ( ζ ) .

This is the same elementary kernel that appears in the retarded and advanced constructions below. The endpoint or support conditions determine the common homogeneous part and thereby select the required Green function.

At resonance, u and v are linearly dependent and W⁢[u,v]=0. The kernel (22) then does not exist. The inhomogeneous problem may have solutions only when its source satisfies an appropriate compatibility condition; if solutions exist, they are nonunique without an additional normalization.

4. Retarded and Advanced Kernels

A two-point Green function must be distinguished from a one-sided impulse response. For zero initial data at a,

(37) y ⁢ ( a ) = y ′ ⁢ ( a ) = 0 ,

taking x1=x2=a in Eq. (16) gives

(38) y ⁢ ( x ) = ∫ a b G R ⁢ ( x , ζ ) ⁢ R ⁢ ( ζ ) ⁢ d ζ ,

where

(39) G R ⁢ ( x , ζ ) = θ ⁢ ( x − ζ ) ⁢ y 1 ⁢ ( ζ ) ⁢ y 2 ⁢ ( x ) − y 2 ⁢ ( ζ ) ⁢ y 1 ⁢ ( x ) W ⁢ ( ζ ) .

The source at ζ influences the solution only for x>ζ. The vanishing branch for x<ζ is not a nonzero homogeneous solution satisfying both Dirichlet and Neumann conditions at a; such a homogeneous solution would vanish identically by uniqueness of the initial-value problem.

For nonzero initial data y⁢(a)=ya and y′⁢(a)=pa, one adds the unique homogeneous solution yh satisfying yh⁢(a)=ya and yh′⁢(a)=pa. Likewise, zero terminal data at b lead directly to

(40) G A ⁢ ( x , ζ ) = − θ ⁢ ( ζ − x ) ⁢ y 1 ⁢ ( ζ ) ⁢ y 2 ⁢ ( x ) − y 2 ⁢ ( ζ ) ⁢ y 1 ⁢ ( x ) W ⁢ ( ζ ) .

The minus sign ensures the unit jump in Eq. (31). The kernels GB, GR, and GA satisfy the same differential equation (32), but represent different inverses because they obey different endpoint or support conditions.

5. Distributional Origin of the Matching Conditions

For a piecewise smooth kernel, write

(41) [ G ] ζ = G ( ζ + , ζ ) − G ( ζ − , ζ ) , [ G x ] ζ = G x ( ζ + , ζ ) − G x ( ζ − , ζ ) .

Its singular distributional derivatives are

(42) ∂ x G = ( ∂ x G ) reg + [ G ] ζ ⁢ δ ⁢ ( x − ζ ) ,
(43) ∂ x 2 G = ( ∂ x 2 G ) reg + [ G x ] ζ ⁢ δ ⁢ ( x − ζ ) + [ G ] ζ ⁢ δ ′ ⁢ ( x − ζ ) .

Substitution into Eq. (32) first gives [G]ζ=0, because its right-hand side contains no δ′ term. The coefficient of δ then gives [Gx]ζ=1. Continuity and the derivative jump are therefore the conditions required for a piecewise homogeneous kernel to represent a unit point source.

For an unnormalized operator

(44) ℒ y = A ( x ) y ′ ′ + B ( x ) y ′ + C ( x ) y , A ( x ) ≠ 0 ,

the corresponding jump is

(45) [ G ] ζ = 0 , [ G x ] ζ = 1 A ( ζ ) .

The unit jump above follows because Eq. (1) was divided by its leading coefficient.

6. Example: y′′=R⁢(x)

For y′′=R⁢(x), choose y1=1, y2=x, and W=1. Then

(46) y p ⁢ ( x ) = − ∫ x 1 x ζ ⁢ R ⁢ ( ζ ) ⁢ d ζ + x ⁢ ∫ x 2 x R ⁢ ( ζ ) ⁢ d ζ .

Different choices of x1 and x2 change this expression only by C1+C2⁢x. For a constant source R⁢(x)=R0, the two integrals can be evaluated step by step:

(47) y p ( x ) = - R 0 ∫ x 1 x ζ d ζ + R 0 x ∫ x 2 x d ζ = - R 0 2 ( x 2 - x 1 2 ) + R 0 x ( x - x 2 ) = R 0 x 2 2 - R 0 x 2 x + R 0 x 1 2 2 .

Thus every choice gives

(48) y p ⁢ ( x ) = R 0 ⁢ x 2 2 + C 1 + C 2 ⁢ x ,

with C1=R0⁢x12/2 and C2=−R0⁢x2. The familiar choice R0⁢x2/2 is only a convenient representative and requires x1=x2=0 if it is to follow directly from these lower limits. If 0∉[a,b], there is no reason to insist on that representative: Eq. (47) is an equally valid particular solution for any x1,x2∈[a,b]. The difference is homogeneous and is absorbed into the complementary solution. Therefore neither a particular solution nor its lower limits are unique. A unique full solution arises only after the initial or boundary conditions are specified.

For Dirichlet conditions y⁢(a)=y⁢(b)=0, take u=x−a and v=x−b, for which W=b−a. Thus

(49) G D ⁢ ( x , ζ ) = { ( x − a ) ⁢ ( ζ − b ) b − a , x < ζ , ( ζ − a ) ⁢ ( x − b ) b − a , x > ζ .

For a constant source,

(50) y D ( x ) = R 0 2 ( x − a ) ( x − b ) .

By contrast,

(51) G R ( x , ζ ) = θ ( x − ζ ) ( x − ζ ) , G A ( x , ζ ) = θ ( ζ − x ) ( ζ − x ) ,

yield

(52) y R ( x ) = R 0 2 ( x − a ) 2 , y A ( x ) = R 0 2 ( x − b ) 2 .

The first satisfies zero Cauchy data at a, the second zero Cauchy data at b, and neither is the Dirichlet solution on [a,b]. Their differences are homogeneous functions, as required.

7. Conclusion

The analysis has made explicit a classical result: the Green-function representation of a second-order linear ordinary differential equation is already contained in the variation-of-parameters formula. Once the integration limits and homogeneous solutions are adapted to the prescribed conditions, the formula reorganizes into an integral kernel acting on the source. The value of this reformulation is pedagogical; it does not constitute a new method for constructing Green functions.

The construction clarifies that the auxiliary condition of variation of parameters fixes a redundancy in the coefficient functions but does not remove the freedom to add a homogeneous solution. Initial or boundary conditions select an inverse of the differential operator. A two-point Green function is built from left-and right-adapted homogeneous solutions and exists as an ordinary inverse only away from resonance. Retarded and advanced kernels instead correspond to initial and terminal data and vanish on one side of the source point.

Finally, continuity and the derivative jump follow both from the Wronskian construction and from the distributional equation Lx⁢G=δ⁢(x−ζ). Presenting these familiar results within a single variation-of-parameters framework clarifies the algebraic structure of the Green function and the role of the conditions defining the inverse operator.

Data Availability

Data sharing is not applicable to this article because no datasets were generated or analyzed in this study.

References

  • [1] P.M. Morse and H. Feshbach, Methods of Theoretical Physics (McGraw-Hill, New York, 1953), part I.
  • [2] R. Courant and D. Hilbert, Methods of Mathematical Physics (Wiley-Interscience, New York, 1953), v. 1.
  • [3] E.A. Coddington and N. Levinson, Theory of Ordinary Differential Equations (McGraw-Hill, New York, 1955).
  • [4] E. Butkov, Mathematical Physics (Addison-Wesley, Reading, 1968).
  • [5] K.F. Riley, M.P. Hobson and S.J. Bence, Mathematical Methods for Physics and Engineering (Cambridge University Press, Cambridge, 2006), 3 ed.
  • [6] E. Kreyszig, Advanced Engineering Mathematics (Wiley, Hoboken, 2011), 10 ed.
  • [7] I. Stakgold and M.J. Holst, Green’s Functions and Boundary Value Problems (Wiley, Hoboken, 2011), 3 ed.
  • [8] G.B. Arfken, H.J. Weber and F.E. Harris, Mathematical Methods for Physicists (Academic Press, Amsterdam, 2013), 7 ed.

*Correspondence email address:

antonio.castro@unesp.br

Editor-in-Chief:

Publication Dates

  • Publication in this collection
    16 Nov 2026
  • Date of issue
    2026

History

  • Received
    01 June 2026
  • Reviewed
    01 Sept 2026
  • Accepted
    05 Oct 2026
location_on
Sociedade Brasileira de Física - SBF Rua do Matão, travessa R, 187 - Edifício Sede - Cidade Universitária, São Paulo, SP, Brasil, CEP 05508-090, Tel: +55 (11) 3034-0429 - São Paulo - SP - Brazil
E-mail: rbef@sbfisica.org.br, marcellof@unb.br
rss_feed Acompanhe os números deste periódico no seu leitor de RSS
Ir para o topo