Perturbing ordinary differential equations to generate resonant and repeated root solutions
PPERTURBING ORDINARY DIFFERENTIAL EQUATIONS TOGENERATE RESONANT AND REPEATED ROOT SOLUTIONS ∗ BERNARDO GOUVEIA † AND
HOWARD A. STONE ‡ Abstract.
In the study of ordinary differential equations (ODEs) of the form ˆ L [ y ( x )] = f ( x ),where ˆ L is a linear differential operator, two related phenomena can arise: resonance, where f ( x ) ∝ u ( x ) and ˆ L [ u ( x )] = 0, and repeated roots, where f ( x ) = 0 and ˆ L = ˆ D n for n ≥
2. We illustrate amethod to generate exact solutions to these problems by taking a known homogeneous solution u ( x ),introducing a parameter (cid:15) such that u ( x ) → u ( x ; (cid:15) ), and Taylor expanding u ( x ; (cid:15) ) about (cid:15) = 0. Thecoefficients of this expansion ∂ k u∂(cid:15) k (cid:12)(cid:12) (cid:15) =0 yield the desired resonant or repeated root solutions to theODE. This approach, whenever it can be applied, is more insightful and less tedious than standardmethods such as reduction of order or variation of parameters. While the ideas can be introducedat the undergraduate level, we could not find any elementary or advanced text that illustrates theseideas with appropriate generality. Key words. ordinary differential equations, ODEs, resonance, repeated roots
AMS subject classifications.
1. Introduction.
Introductory courses on ODEs often focus on illustrating me-thods of solution for problems in the natural sciences and engineering. One commontopic is resonance, which for the typical case of a mechanical or electrical oscillatorcorresponds to forcing the system at its natural frequency. The unwanted oscillationsthat occurred when the Millennium Bridge, which crosses over the Thames River inLondon, was opened to foot traffic in June 2000 serves a modern realization [14].Mathematically, this response occurs because the governing ODE is forced with oneof its homogeneous solutions.Of course, modern computer algebra systems such as
Mathematica and
Maple provide immediate, often analytical, solutions to these problems. However, becausestandard algorithms are utilized, it is not uncommon that the results are cumber-some and not insightful. For the special case of resonance, we show here using ideasgrounded in perturbation theory and analytic continuation that the resonant solutioncan be obtained simply by constructing an appropriate Taylor series. This methodyields simpler, more transparent functional forms for the resonant solution that havean obvious relationship to the homogeneous solution. We will also see that the sameideas are applicable when constructing linearly independent solutions of equationswith “repeated roots”.To illustrate the method, we first provide some general background on linearODEs to orient the reader on the scope of the problems we seek to solve. We thenproceed to go through a series of examples that explicitly demonstrate how the methodis used. To conclude, we provide a general derivation that summarizes the methodand reveals its underlying structure. Because this approach seems particularly flexible,practically requires only knowledge of Taylor series, and in non-elementary problemsproduces much simpler solutions than mathematical software packages, we believe it ∗ Submitted to the editors January 31, 2021.
Funding:
B.G. is supported by the Paul and Daisy Soros Fellowship and the NSF GraduateResearch Fellowship Program. † Department of Chemical and Biological Engineering, Princeton University, Princeton, NJ 08544,USA. ‡ Department of Mechanical and Aerospace Engineering, Princeton University, Princeton, NJ08544, USA. ([email protected]). 1 a r X i v : . [ m a t h . C A ] F e b BERNARDO GOUVEIA AND HOWARD A. STONE will be of interest. These ideas can be taught in a course at the undergraduate level,although we are not aware of any book on ODEs at any level that illustrates theapproach nor emphasizes its generality.
2. Background.
In the study of n th -order linear ODEs of the form(2.1) ˆ L [ y ( x )] = f ( x ) , where ˆ L = a ( x ) + n (cid:88) j =1 a j ( x ) d j d x j , solutions may be represented as y ( x ) = (cid:80) nj =1 c j u j ( x ) + u p ( x ). Here, u j ( x ) are the n linearly independent homogeneous solutions such that ˆ L [ u j ( x )] = 0 and u p ( x ) isa particular solution such that ˆ L [ u p ( x )] = f ( x ). The constants { c j } are determinedby auxiliary data. Two common special cases arise when seeking the solution set { u j ( x ) , u p ( x ) } : resonance and repeated roots.The first, resonance, occurs when f ( x ) ∝ u j ( x ), i.e., when the forcing functionincludes any term proportional to one of the homogeneous solutions. Therefore, posit-ing a particular solution of the form u p ( x ) ∝ f ( x ), an intuitive ansatz for a linearsystem, will automatically fail since ˆ L [ f ( x )] = 0.The second is the case of repeated roots, which concerns the homogeneous problem f ( x ) = 0 whenever the linear operator can be factored as ˆ L = (cid:81) m 3. Examples. In this section we give seven concrete examples, in order of in-creasing complexity. We suggest reading them in order, as the ideas naturally buildoff each other. The first example of resonance in a constant coefficient 2 nd -order ODEis discussed in many introductory texts using reduction of order [4, 12, 10, 8]. Consider the constantcoefficient ODE(3.1) d y d x + y = sin x. The homogeneous solutions are u ( x ) = sin x and u ( x ) = cos x . We observe that theforcing function f ( x ) = sin x is linearly dependent on u ( x ), in fact it is u ( x ), andso we have resonance. Therefore, naively guessing u p ( x ) = A sin x , where A is a to bedetermined coefficient, will fail as it would render the left-hand side of equation (3.1)equal to zero. The strategy is to then introduce a parameter (cid:15) to equation (3.1) suchthat(3.2) d y d x + y = sin ((1 + (cid:15) ) x ) , where we are interested in the limit (cid:15) → 0. Now, substituting u p ( x ) = A sin ((1 + (cid:15) ) x )provides a particular solution so long as A = − (1+ (cid:15) ) . Hence, the general solution is(3.3) y ( x ) = c sin x + c cos x − sin ( x + (cid:15)x )2 (cid:15) + (cid:15) . Constructing a Taylor expansion around (cid:15) = 0, and neglecting terms of O (cid:0) (cid:15) (cid:1) orhigher, gives(3.4) y ( x ) = (cid:18) c − (cid:15) (cid:19) sin x + c cos x − x cos x . Because we have complete freedom in choosing c , we can make the transformation c = ˜ c − / (cid:15) , which removes the divergence as (cid:15) → 0. Thus, we have obtained thegeneral solution(3.5) y ( x ) = ˜ c sin x + c cos x − x cos x . If x represents time, the x cos x behavior is the signature of the ever growing oscilla-tions of a conservative oscillator at resonance. BERNARDO GOUVEIA AND HOWARD A. STONE Let us take stock of the solution approach. The first step is to introduce aparameter (cid:15) that allows us to guess a particular solution u p ( x ; (cid:15) ) ∝ f ( x ; (cid:15) ), where thelimit (cid:15) → u p ( x ; (cid:15) ) to linear order in (cid:15) allows grouping the singular partwith a homogeneous solution. Relabeling a free constant removes the singularity andgives the desired (cid:15) = 0 solution. Consider the equi-dimensional ODE in the form(3.6) x d y d x + (1 − b ) x d y d x + b y = 0 , where b is a given constant. Carefully staring at this equation, we observe that thelinear operator can be factored and the ODE can be rewritten as(3.7) (cid:18) x dd x − b (cid:19) y = 0 , and thus this equation has a repeated root. We construct the homogeneous solutions { u ( x ) , u ( x ) } by solving the sub-problems (cid:0) x dd x − b (cid:1) u = 0 and (cid:0) x dd x − b (cid:1) u = u .By inspection we observe that both u ( x ) and u ( x ) are indeed solutions to equation(3.7). Integration gives u ( x ) = x b and we are left to solve(3.8) (cid:18) x dd x − b (cid:19) u = x b . We are now in the same position as example 3.1, since the homogeneous solutionof equation (3.8) is exactly the forcing term x b , and so we have resonance. Thus,we learn that resonance and repeated roots are effectively the same feature. Writing b → b + (cid:15) gives(3.9) (cid:18) x dd x − b (cid:19) u = x b + (cid:15) . The equation and solution of interest correspond to the limit (cid:15) → 0. Substituting u ( x ) = Ax b + (cid:15) as the particular solution is successful if A = 1 /(cid:15) , and therefore thesolution to equation (3.7) can be written(3.10) y ( x ) = c x b + c x b x (cid:15) (cid:15) . Constructing the Taylor expansion for 0 < (cid:15) (cid:28) 1, we have x (cid:15) = 1 + (cid:15) log x + O (cid:0) (cid:15) (cid:1) ,therefore(3.11) y ( x ) = (cid:16) c + c (cid:15) (cid:17) x b + c x b log x. Relabeling the constant c = ˜ c − c /(cid:15) removes the divergence and gives the desiredsolution(3.12) y ( x ) = ˜ c x b + c x b log x. Of course, in this particular example, equation (3.8) could have been solved moredirectly via an integrating factor. However, that approach only works for first-orderODEs, whereas our method easily generalizes to higher-order ODEs, as illustrated inexample 3.4. DES: RESONANCE AND REPEATED ROOTS So far, we have only looked at ODEs thatmay be reduced to algebraic characteristic equations, the solutions to which yieldelementary functions. Furthermore, we have yet to consider a well-posed initial (IVP)or boundary (BVP) value problem. To increase the complexity and demonstrate thegenerality of our method, consider the forced Airy BVP1 x d y d x − y = Ai( x )(3.13a) y (0) = 1(3.13b) y ( x → ∞ ) → , (3.13c)where Ai( x ) is the Airy function of the first kind. Similar equations come up whenstudying the Schr¨odinger equation for a particle in a linear potential [9]. The ho-mogeneous solutions are the two linearly independent Airy functions of the first andsecond kind, respectively, u ( x ) = Ai( x ) and u ( x ) = Bi( x ), and thus equation (3.13a)corresponds to resonance since the forcing function is proportional to a homogeneoussolution.Following the same steps as in the first two examples, we introduce a parameter (cid:15) so that(3.14) 1 x d y d x − y = Ai ((1 + (cid:15) ) x ) , where we will let (cid:15) → 0. Proposing a particular solution u p ( x ) = C Ai ((1 + (cid:15) ) x ) issuccessful if C = (cid:15) ) − , where we have used x d d x [Ai( cx )] = c Ai( cx ). Therefore,the solution to (3.14) is(3.15) y ( x ) = c Ai( x ) + c Bi( x ) + Ai ((1 + (cid:15) ) x )(1 + (cid:15) ) − . Constructing the Taylor expansion Ai( x + (cid:15)x ) = Ai( x ) + (cid:15)x Ai (cid:48) ( x ) + O (cid:0) (cid:15) (cid:1) , where dd x = (cid:48) , and retaining terms only up to first order in (cid:15) gives(3.16) y ( x ) = (cid:18) c + 13 (cid:15) (cid:19) Ai( x ) + c Bi( x ) + x Ai (cid:48) ( x )3 . We can now apply the boundary data. The condition (3.13c) forces c = 0 sinceBi( x → ∞ ) → ∞ . The condition (3.13b) results in 1 = (cid:0) c + (cid:15) (cid:1) Ai(0) = ⇒ c + (cid:15) = π / Γ(1 / , where we have used Ai(0) = Γ(1 / π / (see Appendix 5.1 for a derivation). Thuswe see that the divergence at (cid:15) = 0 goes away naturally when we consider a well-posedBVP , and the final solution is(3.17) y ( x ) = 2 π / Γ(1 / 3) Ai( x ) + x Ai (cid:48) ( x )3 . For problems involving special functions, it is often useful to utilize Mathematica as a first check on solvability. Entering the appropriate commands results in sol = DSolve[(1/x)*y’’[x] - y[x] == AiryAi[x], y[x], x]y[x] → π AiryAi[x]AiryAiPrime[x]AiryBi[x] - 2 π xAiryAiPrime[x] AiryBi[x] - π AiryAi[x] AiryBiPrime[x] + 2 π xAiryAi[x]AiryAiPrime[x]AiryBiPrime[x]) + AiryAi[x]c[1] + AiryBi[x]c[2] , We thank Dionisios Margetis for emphasizing this point to us. BERNARDO GOUVEIA AND HOWARD A. STONE which is rather disastrous compared to our solution! Because the structure of Math-ematica ’s solution involves products of Ai( x ) and Bi( x ), it is clear that reduction oforder is the algorithm underpinning this solution. Yet, we are guaranteed that theparticular solution is unique up to added multiples of the homogeneous solutions (theFredholm alternative). Indeed, when we apply Mathematica ’s brute-force simplifica-tion algorithm to this solution we find sol2 = FullSimplify[sol]y[x] → , which is precisely our general solution (3.16) with a relabeling of a constant.Using our method, one can now appreciate how to obtain the simplified solutiondirectly from the ODE. There is no need to generate the complicated solution viareduction of order and use esoteric properties of Airy functions to simplify it further. Our methodeasily generalizes to higher-order ODEs. Consider the fourth-order equation(3.20) (cid:18) d d x − x dd x − k (cid:19) y = 0 , which arises in the study of hydrodynamic stability [7]. Here k is a given constant.Equation (3.20) has a repeated root, so we construct the homogeneous solutionsby solving the sub-problems (cid:16) d d x − x dd x − k (cid:17) u = 0 and (cid:16) d d x − x dd x − k (cid:17) u = u . Substituting u ( x ) = xζ ( x ) into the first sub-problem furnishes x ζ d x + x d ζ d x − (cid:0) k x (cid:1) ζ = 0, for which the solutions are the modified Bessel functions ζ ( x ) = c I ( kx ) + c K ( kx ). Therefore, u ( x ) = c xI ( kx ) + c xK ( kx ) and the secondsub-problem becomes(3.21) (cid:18) d d x − x dd x − k (cid:19) u = c xI ( kx ) + c xK ( kx ) . Equation (3.21) displays resonance, as the forcing functions are the homogeneoussolutions of the differential operator. Therefore, we introduce (cid:15) so that(3.22) (cid:18) d d x − x dd x − k (cid:19) u = c xI (( k + (cid:15) ) x ) + c xK (( k + (cid:15) ) x )and guess the particular solution u p ( x ) = AxI (( k + (cid:15) ) x ) + BxK (( k + (cid:15) ) x ). Substi-tuting this guess works only if we choose A = c ( k + (cid:15) ) − k and B = c ( k + (cid:15) ) − k . Therefore,the solution to equation (3.20) is(3.23) y ( x ) = c xI ( kx ) + c xK ( kx ) + c xI (( k + (cid:15) ) x )( k + (cid:15) ) − k + c xK (( k + (cid:15) ) x )( k + (cid:15) ) − k , where we have renamed some integration constants. We now construct the Taylorexpansions I ( kx + (cid:15)x ) = I ( kx ) + (cid:15) ( I ( kx ) /k + xI ( kx )) + O (cid:0) (cid:15) (cid:1) (3.24a) and K ( kx + (cid:15)x ) = K ( kx ) + (cid:15) ( K ( kx ) /k − xK ( kx )) + O (cid:0) (cid:15) (cid:1) , (3.24b) DES: RESONANCE AND REPEATED ROOTS I (cid:48) ( z ) = I ( z ) /z + I ( z ) and K (cid:48) ( z ) = K ( z ) /z − K ( z ). Combining (3.23-3.24) and keeping only terms to linear order in (cid:15) gives, after some rearrangement, y ( x ) = (cid:16) c + c k(cid:15) + c k (cid:17) xI ( kx ) + (cid:16) c + c k(cid:15) + c k (cid:17) xK ( kx )(3.25a) + c k x I ( kx ) − c k x K ( kx ) . Relabeling all constants to remove the (cid:15) → y ( x ) = ˜ c xI ( kx ) + ˜ c xK ( kx ) + ˜ c x I ( kx ) + ˜ c x K ( kx ) . Calling Mathematica again for comparison, we find inner = D[y[x], { x, 2 } ] - (1/x)*D[y[x], x] - k *y[x]sol = DSolve[D[inner, { x, 2 } ] - (1/x)*D[inner, x] - k *inner == 0, y[x], x]y[x] → x BesselJ[2, ikx]c[1] + x BesselY[2, -ikx]c[2]+ i/8(k π x BesselJ[0, ikx]BesselJ[2, ikx]BesselY[1, -ikx]+ k π x BesselJ[0, ikx]BesselJ[1, ikx]BesselY[2, -ikx])c[3]+ i/8(k π x BesselJ[2, ikx]BesselY[0, -ikx]BesselY[1, -ikx]+ k π x BesselJ[1, ikx]BesselY[0, -ikx]BesselY[2, -ikx])c[4] , which is not pleasant. Applying the brute force simplification algorithm gives sol2 = FullSimplify[sol]y[x] → -x /4(4BesselI[2, kx]c[1] - 4BesselY[2, -ikx]c[2]+ BesselI[0, kx]c[3] + BesselY[0, -ikx]c[4]) , Using the relationship Y p ( iz ) ∝ K p ( z ) between Bessel and modified Bessel functions aswell as the recurrence relations I ( z ) = 3 I ( z ) /z + I ( z ) and K ( z ) = 3 K ( z ) /z + K ( z )converts Mathematica ’s simplified solution into our solution (3.26). So far, we have solved problemsthat Mathematica could manage, albeit more clumsily. Let us now tackle a problemthat Mathematica fails to solve directly, namely(3.29) (cid:18) d d x + 1 x dd x + 1 (cid:19) y = 0 . Sixth-order equations do have applications, for example when studying the interac-tions between fluids and elastic media [6]. In this case, we construct the homogeneoussolutions by solving the sub-problems (cid:16) d d x + x dd x + 1 (cid:17) u = 0 and (cid:16) d d x + x dd x +1 (cid:17) u = u . To solve the first sub-problem for u ( x ), we break things down further asbefore and solve the problems (cid:16) d d x + x dd x + 1 (cid:17) v = 0 and (cid:16) d d x + x dd x + 1 (cid:17) v = v so that u ( x ) = span { v ( x ) , v ( x ) } .The solutions for v ( x ) are the Bessel functions v ( x ) = c J ( x ) + c Y ( x ). An-ticipating resonance in the equation for v ( x ), we introduce (cid:15) and write(3.30) (cid:18) d d x + 1 x dd x + 1 (cid:19) v = c J ((1 + (cid:15) ) x ) + c Y ((1 + (cid:15) ) x ) . BERNARDO GOUVEIA AND HOWARD A. STONE Positing the particular solution v p = AJ ((1 + (cid:15) ) x ) + BY ((1 + (cid:15) ) x ) works only if wechoose A = c − (1+ (cid:15) ) and B = c − (1+ (cid:15) ) . Therefore, at this point the solution for u ( x )is(3.31) u ( x ) = c J ( x ) + c Y ( x ) + c J ((1 + (cid:15) ) x )1 − (1 + (cid:15) ) + c Y ((1 + (cid:15) ) x )1 − (1 + (cid:15) ) , where we have relabelled some constants. Taylor expanding J ( x + (cid:15)x ) = J ( x ) − (cid:15)xJ ( x ) + O (cid:0) (cid:15) (cid:1) and Y ( x + (cid:15)x ) = Y ( x ) − (cid:15)xY ( x ) + O (cid:0) (cid:15) (cid:1) , substituting them intoequation (3.31), and keeping terms only up to first order in (cid:15) gives(3.32) u ( x ) = (cid:16) c − c (cid:15) (cid:17) J ( x ) + (cid:16) c − c (cid:15) (cid:17) Y ( x ) + c xJ ( x ) + c xY ( x ) . Relabelling constants as usual gives the final solution for u (3.33) u ( x ) = ˜ c J ( x ) + ˜ c Y ( x ) + ˜ c xJ ( x ) + ˜ c xY ( x ) . We can now proceed to solve the sub-problem for u ( x ). We have(3.34) (cid:18) d d x + 1 x dd x + 1 (cid:19) u = ˜ c J ( x ) + ˜ c Y ( x ) + ˜ c xJ ( x ) + ˜ c xY ( x ) . As usual, we proceed by inserting the parameter (cid:15) such that (cid:18) d d x + 1 x dd x + 1 (cid:19) u = ˜ c J ((1 + (cid:15) ) x ) + ˜ c Y ((1 + (cid:15) ) x )(3.35a) +˜ c xJ ((1 + (cid:15) ) x ) + ˜ c xY ((1 + (cid:15) ) x )and propose a particular solution u p = AJ ((1 + (cid:15) ) x ) + BY ((1 + (cid:15) ) x ) + CxJ ((1 + (cid:15) ) x ) + DxY ((1 + (cid:15) ) x ). Substituting this anzats, we find after some simplification andrearrangement that A = ˜ c − (cid:15) ) C − (1 + (cid:15) ) (3.36a) B = ˜ c − (cid:15) ) D − (1 + (cid:15) ) (3.36b) C = ˜ c − (1 + (cid:15) ) (3.36c) D = ˜ c − (1 + (cid:15) ) . (3.36d)The full solution to the original problem (3.29) is y = span { u , u } . Combining ourresults from equations (3.33) and (3.36) gives y ( x ) = ˜ c J ( x ) + ˜ c Y ( x ) + ˜ c xJ ( x ) + ˜ c xY ( x )(3.37a) + AJ ((1 + (cid:15) ) x ) + BY ((1 + (cid:15) ) x ) + c xJ ((1 + (cid:15) ) x )1 − (1 + (cid:15) ) + c xY ((1 + (cid:15) ) x )1 − (1 + (cid:15) ) . The simplest way to proceed is to set (cid:15) = 0 in the terms involving A and B , becausewe have freedom to make the transformations ˜ c = ˆ c − A and ˜ c = ˆ c − B to removedivergence issues. Thus we have(3.38) y ( x ) = ˆ c J ( x ) + ˆ c Y ( x ) + ˜ c xJ ( x ) + ˜ c xY ( x ) − c xJ ((1 + (cid:15) ) x )2 (cid:15) + (cid:15) − c xY ((1 + (cid:15) ) x )2 (cid:15) + (cid:15) . DES: RESONANCE AND REPEATED ROOTS J ( x + (cid:15)x ) = J ( x ) + (cid:15) ( J ( x ) − xJ ( x )) + O (cid:0) (cid:15) (cid:1) (3.39a) and Y ( x + (cid:15)x ) = Y ( x ) + (cid:15) ( Y ( x ) − xY ( x )) + O (cid:0) (cid:15) (cid:1) , (3.39b)where we have used the formulas J (cid:48) ( z ) = J ( z ) /z − J ( z ) and Y (cid:48) ( z ) = Y ( z ) /z − Y ( z ).Substituting these expansions in equation (3.38) while retaining terms only up tolinear order in (cid:15) furnishes y ( x ) = ˆ c J ( x ) + ˆ c Y ( x ) + (cid:16) ˜ c − c (cid:15) − c (cid:17) xJ ( x ) + (cid:16) ˜ c − c (cid:15) − c (cid:17) xY ( x )(3.40a) + c x J ( x ) + c x Y ( x ) . Relabelling constants to clean up the solution and remove divergences finally gives allsix linearly independent solutions to equation (3.29):(3.41) y ( x ) = ˆ c J ( x ) + ˆ c Y ( x ) + ˆ c xJ ( x ) + ˆ c xY ( x ) + ˜ c x J ( x ) + ˜ c x Y ( x ) . While we did all this work to show the explicit steps, the general structure ofour method should now be clear. Problems of the form ˆ D n [ y ( x )] = 0 can be brokendown into n − u ( x ) where ˆ D [ u ( x )] = 0 by constructing the Taylor expansion(3.42) u ( x ; (cid:15) ) = u ( x ) + ∂u∂(cid:15) (cid:12)(cid:12)(cid:12)(cid:12) (cid:15) =0 (cid:15) + ∂ u∂(cid:15) (cid:12)(cid:12)(cid:12)(cid:12) (cid:15) =0 (cid:15) · · · + ∂ n − u∂(cid:15) n − (cid:12)(cid:12)(cid:12)(cid:12) (cid:15) =0 (cid:15) n − ( n − . Therefore the function ∂ k u∂(cid:15) k (cid:12)(cid:12) (cid:15) =0 gives the k th repeated root of ˆ D n [ y ( x )] = 0. Inthis example, u ( x ; (cid:15) ) = J ((1 + (cid:15) ) x ) + Y ((1 + (cid:15) ) x ), and applying the formula (3.42)furnishes the delightful formula(3.43) u ( k ) ( x ) = b x k J k ( x ) + b x k Y k ( x )for the k th repeated root of Bessel’s equation. We now turn to an example wherethe manner in which we introduce the parameter (cid:15) is quite different. We consider thefollowing Legendre BVP at resonancedd x (cid:20)(cid:0) − x (cid:1) d y d x (cid:21) + n ( n + 1) y = P n ( x )(3.44a) y (1) = 1(3.44b) y ( x ) = finite on x ∈ ( − , , (3.44c)where P n ( x ) is the Legendre polynomial of the first kind of order n for n ∈ Z . In thiscase, the homogeneous solutions are u ( x ) = P n ( x ) and u ( x ) = Q n ( x ), which are theLegendre functions of the first and second kind, respectively.Clearly, we have resonance, but if we try our usual strategy of perturbing theforcing function as P n ((1 + (cid:15) ) x ) and utilize the ansatz u p ( x ) = AP n ((1 + (cid:15) ) x ), it willfail because of the structure of the (1 − x ) term in equation (3.44a). Instead, forequations of this type it is more useful to perturb the order of the forcing function,in this case the order of the Legendre polynomial n . We have(3.45) dd x (cid:20)(cid:0) − x (cid:1) d y d x (cid:21) + n ( n + 1) y = P n + (cid:15) ( x ) , BERNARDO GOUVEIA AND HOWARD A. STONE where we interpret P n + (cid:15) ( x ) as a homogeneous solution to equation (3.44a) for n → n + (cid:15) ∈ R , which can be represented by a hypergeometric function [5, eq. 15.9.7],although we will not make use of this directly. Positing the ansatz u p ( x ) = AP n + (cid:15) ( x )works and we find A = n ( n +1) − ( n + (cid:15) )( n + (cid:15) +1) , and so the general solution is(3.46) y ( x ) = c P n ( x ) + c Q n ( x ) − P n + (cid:15) ( x )(2 n + 1) (cid:15) + (cid:15) . We now Taylor expand the particular solution in the usual way, except now we areexpanding in the order of the Legendre polynomial. Keeping terms only up to O( (cid:15) )we obtain(3.47) − u p ( x ) = P n ( x )(2 n + 1) (cid:15) + 12 n + 1 ∂P n ( x ) ∂n . We now have to evaluate the derivative ∂P n ( x ) ∂n , which we do by thinking of n as acontinuous variable, then evaluating the result only at integer n . There are manyways to do this, for example in terms of the aforementioned hypergeometric function,or by using an integral representation valid for arbitrary n [15, eq. 4.1]. There isactually a simpler way of computing ∂P n ( x ) ∂n , which was discovered by Jolliffe [11]. Hismethod leads to the remarkable formula(3.48) ∂P n ( x ) ∂n := P n, ( x ) = 12 n − n ! d n d x n (cid:20) ( x − n log (cid:18) x + 12 (cid:19)(cid:21) − P n ( x ) log (cid:18) x + 12 (cid:19) , which is interesting in that it is almost the standard Rodrigues formula P n ( x ) = n n ! d n d x n ( x − n apart from logarithmic corrections. Equipped with equation (3.48),the general solution becomes(3.49) y ( x ) = (cid:18) c − n + 1) (cid:15) (cid:19) P n ( x ) + c Q n ( x ) − P n, ( x )2 n + 1 . Equation (3.49) has the same structure as the solution derived by Backhouse [2, eqs.13-14] in his study of the resonant Legendre equation, where he too remarked on theappearance of logarithmic terms.We can now apply the boundary data. Condition (3.44c) forces c = 0 whilecondition (3.44b) gives 1 = (cid:16) c − n +1) (cid:15) (cid:17) P n (1) − P n, (1)2 n +1 . Using the fact that P n (1) =1, one can see that P n, (1) = 0 due to the logarithm terms, hence c = 1 + n +1) (cid:15) and the solution to the BVP (3.44) is(3.50) y ( x ) = P n ( x ) − P n, ( x )2 n + 1 , where P n, ( x ) is given by equation (3.48). As our final example we nowconsider repeated roots of Hermite’s equation(3.51) (cid:18) d d x − x dd x + 2 n (cid:19) y = 0for n ∈ Z . As usual, we seek to solve the sub-problems (cid:16) d d x − x dd x + 2 n (cid:17) u = 0 and (cid:16) d d x − x dd x + 2 n (cid:17) u = u . The solutions to the first sub-problem are the Hermite DES: RESONANCE AND REPEATED ROOTS u ( x ) = c H n ( x ) + c G n ( x ), where H n ( x ) is the Hermite polynomial oforder n and G n ( x ) = H n ( x ) (cid:82) x d x (cid:48) e x (cid:48) /H n ( x (cid:48) ) . Therefore, the second sub-problemwe need to solve is(3.52) (cid:18) d d x − x dd x + 2 n (cid:19) u = c H n ( x ) + c G n ( x ) , which is a resonance problem. As in the previous example, we perturb the order ofthe Hermite functions and construct the perturbed problem(3.53) (cid:18) d d x − x dd x + 2 n (cid:19) u = c H n + (cid:15) ( x ) + c G n + (cid:15) ( x ) , where we interpret H n + (cid:15) ( x ) and G n + (cid:15) ( x ) as a homogeneous solutions to equation(3.51) for n + (cid:15) ∈ R . As usual, we propose the form u p ( x ) = AH n + (cid:15) ( x )+ BG n + (cid:15) ( x ) andsubstitute into equation (3.53). We find this works as long as we choose A = − c / (cid:15) and B = − c / (cid:15) . Hence the general solution so far is(3.54) y ( x ) = c H n ( x ) + c G n ( x ) + c H n + (cid:15) ( x ) (cid:15) + c G n + (cid:15) ( x ) (cid:15) , where we have relabeled some integration constants. To finish, we construct the Taylorexpansions H n + (cid:15) ( x ) = H n ( x ) + ∂H n ( x ) ∂n (cid:15) + O( (cid:15) ) and G n + (cid:15) ( x ) = G n ( x ) + ∂G n ( x ) ∂n (cid:15) +O( (cid:15) ), where the task now becomes computing ∂H n ( x ) ∂n , from which ∂G n ( x ) ∂n follows byinvoking the chain rule. Unfortunately this derivative appears less often in practicethan the Legendre case, so there are no simple formulas commonly used. Thus wegive an answer in terms of the confluent hypergeometric function F [1],(3.55) ∂H n ( x ) ∂n := H n, ( x ) = x dd ξ (cid:20) F (cid:18) ξ, , x (cid:19)(cid:21) (cid:12)(cid:12)(cid:12)(cid:12) ξ = − n . Using this definition and the chain rule we also find(3.56) ∂G n ( x ) ∂n := G n, ( x ) = H n, ( x ) (cid:90) x d x (cid:48) e x (cid:48) H n ( x (cid:48) ) − H n ( x ) (cid:90) x d x (cid:48) e x (cid:48) H n, ( x (cid:48) ) H n ( x (cid:48) ) . With everything known, we substitute these functions into their respective Taylorexpansions, group terms of order (cid:15) − with the homogeneous solutions, relabel inte-gration constants, and set (cid:15) = 0. The final result is(3.57) y ( x ) = ˜ c H n ( x ) + ˜ c G n ( x ) + c H n, ( x ) + c G n, ( x ) . 4. General structure and final remarks. In this paper we highlighted howto construct resonant or repeated root solutions to ODEs via analytic continuationof an already known homogeneous solution in an introduced parameter (cid:15) . For thepractitioner who comes across these problems in their work, we hope these exampleshave offered a concrete guide on how to find such solutions. To conclude, we now givea more general derivation that encompasses all our examples.We are interested in finding a particular solution u p ( x ) of the resonant ODEˆ L [ u p ( x )] = u ( x ), where ˆ L [ u ( x )] = 0. Suppose that ˆ L can be written as ˆ L = ˆ M − λ , There is no “Hermite function of the 2 nd kind” commonly cited in the literature, so we give anintegral representation here that can be derived using reduction of order (see Appendix 5.2). BERNARDO GOUVEIA AND HOWARD A. STONE where λ is either a parameter in the original problem, or it can be introduced to theproblem and set to unity at the end. The homogeneous solution will therefore dependon this parameter, and we denote this dependence by u = u ( x ; λ ). Therefore we seekto solve(4.1) (cid:16) ˆ M − λ (cid:17) [ u p ( x )] = u ( x ; λ ) . We now perturb this problem by introducing a small parameter (cid:15) (4.2) (cid:16) ˆ M − λ (cid:17) [ u p ( x )] = u ( x ; λ + (cid:15) )and propose that the particular solution has the form u p ( x ) = Au ( x ; λ + (cid:15) ). Sinceˆ M [ u ( x ; λ + (cid:15) )] = ( λ + (cid:15) ) u ( x ; λ + (cid:15) ), this ansatz satisfies equation (4.2) if we choose A = 1 /(cid:15) , hence u p ( x ) = u ( x ; λ + (cid:15) ) /(cid:15) . We now Taylor expand u p ( x ) around (cid:15) = 0 toobtain (4.3) u p ( x ) = u ( x ) (cid:15) + ∂u∂λ + O ( (cid:15) ) . The u ( x ) /(cid:15) term is proportional to the homogeneous solution u ( x ), so we are freeto remove it by lumping it with the integration constant associated with u ( x ). Thisremoves the 1 /(cid:15) divergence and allows us to set (cid:15) = 0, resulting in(4.4) u p ( x ) = ∂u∂λ . With this general derivation, we see that the resonant solution to an ODE is always given by the derivative with respect to the eigenvalue λ of the governing differentialoperator ˆ L . We note that equation (4.4) has also been derived by Makarov et al. [13].See Table 4.1 for a guide on how to apply this equation for the differential operatorsdiscussed in our examples.From example 3.5, we showed that the repeated root problem ˆ D k [ y ( x )] = 0 isequivalent to k − k th repeated root solution is given by(4.5) u ( k ) ( x ) = ∂ k u∂λ k where ˆ D [ u ( x )] = 0.While all the problems presented here may be solved using reduction of order,the benefit of using the method presented here should be apparent. There is minimalalgebra and no integration of a reduced-order ODE is required. It is only necessaryto compute a Taylor series. In this way, the connection between the homogeneoussolutions and resonant or repeated root solutions becomes clear. We hope that thisnote motivates instructors to present this approach along side reduction of order intheir differential equation courses. These problems do arise in practice, and we believethis method is helpful in exercising thought processes useful in applied mathematics,as well as producing the most elegant solution. Note that ∂u∂λ = ∂u∂(cid:15) (cid:12)(cid:12) (cid:15) =0 identically, so this is consistent with our previous notation up untilnow.DES: RESONANCE AND REPEATED ROOTS Table 4.1 Construction of the resonant particular solution u p ( x ) from its associated homogeneous solution u ( x ) using equation ( . ). The calculation is done using the chain rule ∂u∂λ = d µ d λ ∂u∂µ . To generatehigher order repeated root solutions, simply take higher derivatives with respect to λ as per equation( . ). ˆ L λ HomogeneousSolution u ( x ) Resonant Solution u p ( x ) d d x + µ − µ sin µx , cos µx − x cos µx µ , x sin µx µ x dd x − µ µ x µ x µ log x x d d x − µ µ Ai( µx ), Bi( µx ) x Ai (cid:48) ( µx )3 µ , x Bi (cid:48) ( µx )3 µ d d x + x dd x + µ − µ J ( µx ), Y ( µx ) xJ ( µx )2 µ , xY ( µx )2 µ dd x (cid:2) (1 − x ) dd x (cid:3) + µ ( µ +1) − µ ( µ +1) P µ ( x ), Q µ ( x ) − P µ, ( x )2 µ +1 , − Q µ, ( x )2 µ +1d d x − x dd x + 2 µ − µ H µ ( x ), G µ ( x ) − H µ, ( x )2 , − G µ, ( x )2 5. Appendix.5.1. Calculation of Ai(0) . We start with the well-known integral representationAi( x ) = π (cid:82) ∞ d t cos (cid:16) t + xt (cid:17) . Our method of approach in evaluating Ai(0) will bestandard contour integration, so instead we consider the complex integral(5.1) I ( α ) := (cid:90) ∞ d w e iαw = 1 α / (cid:90) ∞ d z e iz (cid:124) (cid:123)(cid:122) (cid:125) := I . One can see that Re [ I (1 / π Ai(0), and so our task becomes evaluating I . Because e iz is entire, (cid:72) C d z e iz = 0 by Cauchy’s theorem. We choose the contour C as showin Fig. 5.1, where we will take R → ∞ . Writing out the integrals we have(5.2) lim R →∞ (cid:90) R d x e ix (cid:124) (cid:123)(cid:122) (cid:125) I + (cid:90) π/ Re iθ i d θ e iR e i θ (cid:124) (cid:123)(cid:122) (cid:125) J + (cid:90) R e iπ/ d r e − r (cid:124) (cid:123)(cid:122) (cid:125) K = 0 , where I is the integral we wish to compute.4 BERNARDO GOUVEIA AND HOWARD A. STONE xy C : z = x C : z = Re iθ C : z = r e i π / Fig. 5.1 . Contour used for evaluation of I = (cid:72) C d z e iz . C is chosen as the direction ofsteepest descent for the integrand. We can prove that J vanishes in the R → ∞ limit by the following argument: | J | = (cid:90) π/ (cid:12)(cid:12) Re iθ i d θ e iR e i θ (cid:12)(cid:12) (5.3a) ≤ R (cid:90) π/ (cid:12)(cid:12) d θ e − R sin 3 θ (cid:12)(cid:12) (5.3b) ≤ R (cid:90) π/ d θ e − R θ/π (5.3c) = π R (cid:16) − e − R (cid:17) → R → ∞ . (5.3d)In the first step, we get rid of all pure unimodular phases. In the next step, we usethe bound sin 3 θ > θ/π on θ ∈ [0 , π/ I = − K , which we can evaluate in terms of the Gammafunction as follows: I = − K (5.4a) = e iπ/ (cid:90) ∞ d r e − r (5.4b) = e iπ/ (cid:90) ∞ d u u − / e − u (5.4c) = e iπ/ / . (5.4d)Here we have just made the change of variables u = r and utilized the definition ofthe Gamma function.Hence we have π Ai(0) = Re[ I (1 / / Re[ I ] = / cos( π/ / = / Γ(1 / .Simplifying a bit gives the final result Ai(0) = Γ(1 / π / . nd kind G n ( x ) . Let v ( x ) = H n ( x ) f ( x ) be the 2 nd linearly independent homogeneous solution to Her- DES: RESONANCE AND REPEATED ROOTS v (cid:48)(cid:48) − xv (cid:48) + 2 nv = 0, where f ( x ) is to be determined. Substitutingthis ansatz into Hermite’s equation and simplifying a bit results in(5.5) H n f (cid:48)(cid:48) + 2 H (cid:48) n f (cid:48) − xf (cid:48) H n + ( H (cid:48)(cid:48) n − xH (cid:48) n + 2 nH n ) (cid:124) (cid:123)(cid:122) (cid:125) =0 f = 0which is a first order ODE for f (cid:48) . We can divide equation (5.5) through by f (cid:48) H n andthen rearrange it into the form(5.6) dd x log f (cid:48) H n = 2 x, which can be integrated to give f (cid:48) ( x ) = e x /H n ( x ) (neglecting the integration con-stant). Another integration produces f ( x ) = (cid:82) x d x (cid:48) e x (cid:48) /H n ( x (cid:48) ), and thus our desiredresult is(5.7) v ( x ) = H n ( x ) (cid:90) x d x (cid:48) e x (cid:48) H n ( x (cid:48) ) . Acknowledgements. B.G. is supported by the Paul and Daisy Soros Fellowshipand the NSF Graduate Research Fellowship Program. H.A.S. recalls learning thisapproach for constant coefficient ODEs forced at resonance when first teaching anundergraduate course 30 years ago while following notes from John Hutchinson. Wethank Peter Howell, Dionisios Margetis, Ali Nadim, Elie Raphael, and Tom Witelskifor their helpful comments and suggestions. REFERENCES[1] Hermite Differential Equation. From MathWorld–A Wolfram Web Resource., https://mathworld.wolfram.com/HermiteDifferentialEquation.html. Weisstein, Eric W.[2] N. Backhouse , Resonant equations and special functions , Journal of computational and ap-plied mathematics, 133 (2001), pp. 163–169.[3] C. M. Bender and S. A. Orszag , Advanced Mathematical Methods for Scientists and Engi-neers I: Asymptotic Methods and Perturbation Theory , Springer Science & Business Media,2013.[4] W. E. Boyce, R. C. DiPrima, and D. B. Meade , Elementary Differential Equations , JohnWiley & Sons, 2017.[5] NIST Digital Library of Mathematical Functions . http://dlmf.nist.gov/, Release 1.0.28 of 2020-09-15, http://dlmf.nist.gov/. F. W. J. Olver, A. B. Olde Daalhuis, D. W. Lozier, B. I.Schneider, R. F. Boisvert, C. W. Clark, B. R. Miller, B. V. Saunders, H. S. Cohl, andM. A. McClain, eds.[6] C. Duprat, J. M. Aristoff, and H. A. Stone , Dynamics of elastocapillary rise , Journal ofFluid Mechanics, 679 (2011), pp. 641–654.[7] S. L. Goren , The instability of an annular thread of fluid , Journal of Fluid Mechanics, 12(1962), pp. 309–319.[8] M. D. Greenberg , Advanced Engineering Mathematics , Prentice-Hall, 1988.[9] D. J. Griffiths and D. F. Schroeter , Introduction to Quantum Mechanics , CambridgeUniversity Press, 2018.[10] A. Jeffrey , Advanced Engineering Mathematics , Academic Press, 1st ed., 2001.[11] A. Jolliffe , A form for dd n p n ( µ ) , where p n ( µ ) is the Legendre polynomial of degree n , Mess.Math, 49 (1919), pp. 125–127.[12] E. Kreyszig , Advanced Engineering Mathematics , John Wiley & Sons, 9th edition, interna-tional edition ed., 2005.[13] V. L. Makarov and T. Arazmyradov , The construction of particular solutions of resonancedifferential equations , Differentsial’nye Uravneniya, 14 (1978), pp. 1255–1261.[14] S. H. Strogatz, D. M. Abrams, A. McRobie, B. Eckhardt, and E. Ott , Crowd synchronyon the millennium bridge , Nature, 438 (2005), pp. 43–44. BERNARDO GOUVEIA AND HOWARD A. STONE[15] R. Szmytkowski , On the derivative of the Legendre function of the first kind with respect toits degree , Journal of Physics A: Mathematical and General, 39 (2006), p. 15147.[16]