A seldom used formula for ODEs Background All too often a teacher of mathematics will encounter students who beg for a formula that they can apply blindly and quickly to a narrow set of problems. If those students take the time and effort to understand the process that leads to that formula, then they may gain the ability to transfer that understanding beyond that narrow set of problems. One example appears clearly in my teaching of ordinary differential equations to engineering students in their second year of university studies. When the method of variation of parameters is used to obtain the particular solution to a second order linear ordinary differential equation, some students bypass the derivation and note only the following formula. The particular solution of the ODE y p x y q x y r x is y2 r yP dx y1 y1 y2 y1 y2 where the complementary function is yC A y1 y1r dx y2 y1 y2 y1 y2 B y2 . Much is lost in a blind reliance on this formula. Among other disadvantages, it can be difficult to remember which of the two terms has the negative sign in the numerator of the integral. After I present the derivation of the method to my students, I rely upon formulas to a lesser degree. The recipe that I use to find the particular solution is: Find the complementary function yC A y1 B y2 . Evaluate the Wronskian W y1 y1 y2 y1 y2 y1 y2 . y2 Evaluate the related determinants W1 0 r y2 y 0 y2 r and W2 1 y1r . y2 y1 r W1 . W W Find the function v(x) from v 2 . W Simplify yP u y1 v y2 . Find the function u(x) from u In addition to keeping the signs straight on y2 r and y1r , students are more likely to recall the use of Cramer’s rule in the derivation of the method of variation of parameters (and, indeed, to recall Cramer’s rule at all!). Mathematical Gazette, vol. 92, pp. 344-348 Page 2 Example As an example of the method, it can be shown that the complementary function for the ordinary differential equation x 2 y 5 x y 8 y 3x or equivalently (for x ≠ 0), 5 8 3 y y 2 y x x x 4 2 is y Ax B x Now find the particular solution by the method of variation of parameters. y y2 x4 x2 W 1 2 x5 4 x5 2 x5 y1 y2 4 x3 2 x W1 0 r y2 3 y2 r x 2 3x y2 x y1 0 3 y1r x 4 3x3 y1 r x W 3 x 3 1 u 1 x 4 u 5 W 2 x 2 2 x3 W 3x3 3 3 v 2 x 2 v 5 W 2 x 2 2x 1 3 2 yP u y1 v y2 3 x 4 x 2x 2x Therefore the general solution of the ODE x 2 y y A x4 B x2 x W2 1 3 x x 2 2 5 x y 8 y 3x is A general formula However, once students have attained a comfort level with the solution of these ODEs, it can be instructive to derive a formula for the general solution of any second order linear ordinary differential equation with constant real coefficients, y p y q y r x I have not noticed such a formula in the textbooks that I have seen, which is just as well. Novice students of ordinary differential equations really should gain plenty of practice in the methods of solving such problems before even considering such a shortcut. The auxiliary (or characteristic) equation 2 p q 0 produces the three cases 1. real distinct roots a or b ; 2. real equal roots a, a ; or 3. complex conjugate pair of roots a b j . Mathematical Gazette, vol. 92, pp. 344-348 Page 3 1. Real, distinct roots: Complementary function: yC A y1 B y2 Aeax B ebx Particular solution: y W 1 y1 y2 eax y2 a eax ebx bx be b a eaxebx y2 W ebx r e a x r y2 r ebx r u 1 y2 W ba b a ea xebx W1 0 r W2 y1 0 W ea x r ebx r y1r ea x r v 2 y1 r W ba b a ea xebx yP u y1 v y2 ea x r e a x dx ebx r e bx dx ba Therefore the general solution (in the case b ≠ a) of the ODE y a b y ab y r x is y x Ae a x B ebx ebx r e bx dx e a x r e a x dx ba 2. Real, equal roots: Complementary function: yC A y1 B y2 Ae a x B x e a x Particular solution: y y2 ea x W 1 y1 y2 a ea x W1 0 r x ea x ax 2 a x e ax 1 e y2 W x eax r y2 r x eax r u 1 ax ax x eax r y2 W e e y1 0 W2 eax r ax W2 y1r e r v ax ax eax r y1 r W e e yP u y1 v y2 e a x x r e a x dx x e a x r e a x dx Therefore the general solution of the ODE y 2a y a2 y r x is Mathematical Gazette, vol. 92, pp. 344-348 y x A Bx x r eax dx Page 4 xre ax dx eax 3. Complex conjugate pair of roots: This can be expressed in the same form as type (1), with the constants a, b being a pair of complex conjugate numbers. However, it is more convenient to express the complementary function as a linear combination of a pair of real valued functions. Complementary function: yC A y1 B y2 Aea x cos bx B e a x sin bx Particular solution: y1 y2 ea x cos bx e a x sin bx W ax b ea x ea x a x y1 y2 e a cos bx b sin bx e a sin bx b cos bx W1 0 r u W2 W1 ea x sin bx r ea x sin bx r W b ea x ea x b y1 0 y1r ea x cos bx r y1 r v y2 y2 r eax sin bx r y2 W2 ea x cos bx r ea x cos bx r W b ea x ea x b yP u y1 v y2 ea x cos bx r e a x sin bx dx e a x sin bx r e a x cos bx dx b Therefore the general solution (in the case b ≠ 0) of the ODE y 2a y a 2 b 2 y r x is sin bx r e a x cos bx dx cos bx r e a x sin bx dx a x e y x A cos bx B sin bx b and it is a nice exercise to show that this solution tends to the equal roots case in the limit as b → 0. Return to the List of Publications