Frontiers in Computing and Intelligent Systems ISSN: 2832-6024 | Vol. 3, No. 3, 2023 118 Improvement of the Method of Comparing Coefficients Based on Constant Coefficients Non‐Homogeneous Linear Differential Equations Li Ge *, Maojun Zhou School of Statistics and Applied Mathematics, Anhui University of Finance and Economics, Bengbu, Anhui, 233030, China Abstract: Consider three different types of non-homogeneous term ( )f x for constant coefficient non-homogeneous linear differential equation, set the corresponding special solution, then the part of the function containing the coefficients to be determined in the special solution is studied, the equation that the function satisfies is obtained. By using the comparative coefficient method to find the special solution, and three conclusions are given. This method improves the original method of comparing coefficient, the calculation of the coefficients to be determined in the special solution is considerably simplified. Keywords: Constant Coefficient Non-homogeneous Linear Differential Equation; Special Solution; Comparison Coefficient Method. 1. Introduction For the solution of the special solution of the non- homogeneous linear differential equation with constant coefficients: ( ) ( 1) 1( ) ( )n n nL y y a y a y f x     There are usually comparative coefficient methods [1], Laplace transform methods [1] or differential operator method [2], Kai-liang Lin and Jing Wang [3] reveal the essence of the differential operator method for non- homogeneous linear differential equations with constant coefficients based on two characteristics of non- homogeneous term ( )f x , combined with the differential operator method. Lin-Long Zhao [4] explore integrable condition for the composition of non- homogeneous terms, by transforming the linear differential equations with constant coefficients into a system of linear differential equations, the special solution is obtained by the method of integration. And for the above comparative coefficient method and Laplace transform method, the non-homogeneous term is usually subject to the following two characteristics, that is 1 0 1 1( ) ( )m m x m mf x b x b x b x b e      or ( ) [ ( )cos ( )sin ] xf x A x x B x x e   In this case, the coefficient of comparison method is used to set the form of the special solution according to the two characteristics of the special solution, and then the coefficient of comparison method is used to determine the coefficients to be determined in the special solution, so as to find the special solution. It is characterized by the fact that the special solution of a non-homogeneous linear differential equation can be obtained by algebraic methods without integration. However, if the special solution is set without any treatment and directly substituted into the original equation, the calculation is also quite troublesome. The purpose of this paper is to find the equation satisfied by the function based on the comparative coefficients, and then use the comparative coefficients method to solve for the undetermined coefficients in it, and find the special solution of the equation. In this paper, we examine the second order linear differential equation with constant coefficients as an example, and have similar conclusions for linear differential equations with constant coefficients of higher order. 2. Preliminary Knowledge Let the second order constant coefficient non- homogeneous linear differential equation ( )y py qy f x    (1) Corresponding homogeneous linear equation 0y py qy    (2) For the general solutions of the second order linear differential equation (1) and (2), we have the following conclusions: Lemma1 [5]: Let *y is a special solution of the non- homogeneous linear differential equation (1), Y is the general solution of the homogeneous differential equation (2) corresponding to (1),then *y Y y  is the general solution of the second-order non- homogeneous linear differential equation (1). Lemma2 [5]: Let the right-hand side of the non- homogeneous equation (1) is the sum of several functions, such as 1 2( ) ( )y py qy f x f x     * 1y and * 2y are special solutions of the differential equation, respectively 1( )y py qy f x    2 ( )y py qy f x    then * * 1 2y y is the special solution of the differential equation (1). Lemma3 [1]: If the second-order non- homogeneous linear differential equation ( ) ( )y py qy u x iv x     ,has complex-valued solution ( ) ( )x i x  ,then ( ), ( )x x  are the solutions of the equations, respectively 119 ( )y py qy u x    ( )y py qy v x    Proof: If the complex valued function ( ) ( )x i x  is a solution of differential equation ( ) ( )y py qy u x iv x     then ( ( ) ( ) ( ( ) ( )) ( ( ) ( )) ( ) ( )x i x p x i x q x i x u x iv x             After simplification, it is necessary to [ ( ) ( ) ( )] [ ( ) ( ) ( )] ( ) ( )x p x q x i x p x q x u x iv x               thus ( ) ( ) ( ) ( )x p x q x u x      ( ) ( ) ( ) ( )x p x q x v x      Lemma4 [5]: If in differential equation (1), ( ) ( )x mf x e P x (  is a real number, ( )mP x is a polynomial of degree m ), then (1) has the following form of special solution * ( )k x my x e Q x 0, isn't a feature root 1, is a single feature root 2, is a double feature root k         (3) where ( )mQ x is a m degree polynomial with undetermined coefficients. Lemma5 [5]: If in differential equation (1), ( ) ( cos cos )xf x e A x B x    ( , , ,A B  are all real numbers), then (1) has the following form of special solution * ( cos cos )k xy x e a x b x    0, isn't a feature root 1, is a single feature root i k i         (4) Where ,a b are undetermined constants. Lemma6 [1]: If in differential equation (1), ( ) [ ( ) cos ( )cos ]xf x e A x x B x x    ( ,  are real numbers, ( ), ( )A x B x are real coefficient polynomias, one of them frequency is m , while the other frequency does not exceedm ),then (1) has the following form of special solution * [ ( ) cos ( )sin ]k xy x e P x x Q x x    0, isn't a feature root 1, is a single feature root i k i         (5) where ( ), ( )P x Q x are the real coefficient polynomials with undetermined coefficients of degree max{ , }l m n . When the non-homogeneous term ( )f x of differential equation (1) conforms to the characteristics of Lemma 4- Lemma 6, We can set the expression for the specific solution *y ,substitute it into the original equation and find the undetermined constant. But we need to consider, first, the expressions * *( ) , ( )y y  of the solution *y are given, then substitute * * *( ) , ( ) ,y y y  into the original equation, However, at that time 0k  , regardless of equation (3), (4), or (5), their calculations are very complex, so we need to find a simpler way to determine the undetermined constant in the specific solution *y . Next, based on the special solutions set in Lemma 4- Lemma 6, conduct local research on it, and then determine the undetermined coefficients in the special solution. 3. Main Conclusion Theorem1: For differential equation (1), when ( ) ( )x mf x e P x ,there is a special solution * ( )x k my e x Q x . Let ( ) ( )k mR x x Q x , then ( )R x satisfies the following differential equation 2( ) (2 ) ( ) ( ) ( ) ( )mR x p R x p q R x P x         especially, when  is a single feature root, then ( ) (2 ) ( ) ( )mR x p R x P x    ; when  is a double feature root, then ( ) ( )mR x P x  . Proof: Since (1) have a special solution * ( )xy e R x ,then ( ( )) ( ( )) ( ) ( )x x x x me R x p e R x qe R x e P x       further 2[ ( ) 2 ( ) ( )] [ ( ) ( )] ( ) ( )x x x x me R x R x R x pe R x R x qe R x e P x             simplify it further, and we can obtain 2( ) (2 ) ( ) ( ) ( ) ( )mR x p R x p q R x P x         when  is a single feature root, then 2 0,2 0p q p       . Therefore ( ) (2 ) ( ) ( )mR x p R x P x    ; when  is a double feature root, then 2 0,2 0p q p       ,therefore ( ) ( )mR x P x  . Regardless of which of the above three situations occurs, we can use the coefficient comparison method to find the undetermined constant in ( )R x and obtain a specific solution. Theorem2: For differential equation (1), when ( ) ( cos sin )xf x e A x B x    , there is a special solution * ( cos sin )k xy x e a x b x    . (i) Let ( ) 2 ka ib R x x   , then ( )R x satisfies the following differential equation 2( ) [2( ) ] ( ) [( ) ( ) ] ( ) 2 A iB R x i p R x i p i q R x                especially, when i  is a feature single root, then ( ) [2( ) ] ( ) 2 A iB R x i p R x       ; (ii) Let ( ) 2 ka ib R x x   , then ( )R x satisfies the following differential equation 2( ) [2( ) ] ( ) [( ) ( ) ] ( ) 2 A iB R x i p R x i p i q R x                especially, when i  is a feature single root, then ( ) [2( ) ] ( ) 2 A iB R x i p R x       . Proof: By Euler's formula 120 ( ) ( )( ) ( cos sin ) 2 2 x i x i xA iB A iB f x e A x B x e e             in order to find special solutions to differential equation (6), ( ) ( ) 2 2 i x i xA iB A iB y py qy e e          (6) first, consider special solutions of the following two non- homogeneous linear differential equations. ( ) 2 i xA iB y py qy e      (7) ( ) 2 i xA iB y py qy e      (8) We first notice that ( ) ( ) 2 2 i x i xA iB A iB e e       ,if * 1y is the solution of differential equation (7),then * 1y must be the solution of differential equation (8),according to Lemma 2,then * * 1 1y y is the solution of differential equation (6). Therefore, in the actual solution process, we only need to find the specific solution of one of (7) or (8), and determine the undetermined coefficient in the specific solution to obtain the specific solution of the original equation (6). According to the characteristics of the non-homogeneous term in (6), the following special solution can be assumed * ( ) ( ) 2 2 k i x k i xa ib a ib y x e x e        where ,a b are undetermined constants. The following are the specific solutions for differential equations (7) and (8): (i)let ( ) 2 ka ib R x x   ( ,a b are undetermined), and ( )( ) i xR x e   satisfies differential equation (7), since ( ) ( ) ( ) ( )( ( )) ( ( )) ( ) 2 i x i x i x i xA iB e R x p e R x qe R x e              simplify it further, and we can obtain 2( ) [2( ) ] ( ) [( ) ( ) ] ( ) 2 A iB R x i p R x i p i q R x                especially, when i  is a single feature root, 2( ) ( ) 0,i p i q        then ( ) [2( ) ] ( ) 2 A iB R x i p R x       The values of a and b can be obtained by the coefficient method, the specific solution of equation (7) can be obtained, and then the specific solution of equation (6) can be obtained. (ii)let ( ) 2 ka ib R x x   ( ,a b are undetermined), and ( )( ) i xR x e   satisfies differential equations (8), since ( ) ( ) ( ) ( )( ( )) ( ( )) ( ) 2 i x i x i x i xA iB e R x p e R x qe R x e              by simplifying it further, and we can obtain 2( ) [2( ) ] ( ) [( ) ( ) ] ( ) 2 A iB R x i p R x i p i q R x                especially, when i  is a single feature root, 2( ) ( ) 0,i p i q        then ( ) [2( ) ] ( ) 2 A iB R x i p R x       The values of ,a b can be obtained by the coefficient method, the specific solution of equation (7) can be obtained, and then the specific solution of equation (6) can be obtained. Theorem3: For differential equation (1), when ( ) [ ( )cos ( )sin ]xf x e A x x B x x    (Where ( )A x is m degree real coefficient polynomial, ( )B x is n degree real coefficient polynomial), there is a special solution * [ ( )cos ( )sin ]k xy x e P x x Q x x    (where ( ), ( )P x Q x are real coefficient polynomials with undetermined coefficients of degree max{ , }l m n ) (i) Let ( ) ( ) ( ) 2 kP x iQ x R x x   , then ( )R x satisfies the following differential equation 2 ( ) ( ) ( ) [2( ) ] ( ) [( ) ( ) ] ( ) 2 A x iB x R x i p R x i p i q R x                especially, when i  is a feature single root, then ( ) ( ) ( ) [2( ) ] ( ) 2 A x iB x R x i p R x       ; (ii) Let ( ) ( ) ( ) 2 kP x iQ x R x x   , then ( )R x satisfies the following differential equation 2 ( ) ( ) ( ) [2( ) ] ( ) [( ) ( ) ] ( ) 2 A x iB x R x i p R x i p i q R x                especially, when i  is a single feature root, then ( ) ( ) ( ) [2( ) ] ( ) 2 A x iB x R x i p R x       The process of proving this conclusion is similar to Theorem 2. 4. Example Example 1 Calculate the general solution of differential equation 2 3 3 xy y y xe    Answer: The characteristic equation is 2 2 3 0r r   , its roots are 1 23, 1r r   . Therefore, the general solution of the corresponding homogeneous linear differential equation is 3 1 2 x xY C e C e  .Next, we need find a special solution of non-homogeneous linear differential equation, due to ( ) 3 , 1xf x xe    is a single root of the characteristic equation, thus, the special solution is as follows: * ( ) xy x a bx e  ,where ,a b are undetermined, let 2( )R x ax bx  ,according to Theorem 1, ( )R x satisfies the differential equation ( ) 4 ( ) 3R x R x x   ,by simplifing it, and we can obtain 2 4( 2 ) 3b a bx x   , thus 2 4 0, 8 3b a b    , 3 3 , 16 8 a b    are solved, then * 23 3 16 8 x xy xe x e    , the general solution of the original equation is 121 3 2 1 2 3 3 16 8 x x x xy C e C e xe x e      ( 1 2,C C are any constants). Example 2 Calculate the general solution of differential equation 2 24 4 1xy y y x e      Answer: The characteristic equation is 2 4 4 0r r   ,its root is 2r  (double), Therefore, the general solution of the corresponding homogeneous linear differential equation is 2 2 1 2 ,x xY C e C xe  Next, we need find a special solution of non-homogeneous linear differential equation, due to 2 2( ) 1xf x x e   ,according to Lemma2, First, we need to solve the special solutions of the following two equations separately 24 4 1y y y x     24 4 xy y y e    according to Lemma4,the specific solution of the former is as follows * 2 1y a bx cx   ,the specific solution of the latter is as follows * 2 2 2 xy dx e ,where , , ,a b c d are undetermined constants, * 1y satisfies the differential equation * * * 2 1 1 1( ) 4( ) 4 1y y y x     by simplifing it, and we can obtain 2 24 (4 8 ) (4 4 2 ) 1cx b c x a b c x       ,thus 4 1,4 8 0,4 4 2 0c b c a b c      , 3 1 1 , , 8 2 4 a b c   are solved, then * 2 1 1 1 3 4 2 8 y x x   . Let 2( )R x dx ,according to Theorem 1, ( )R x satisfies the differential equation ( ) 1R x  ,and we can obtain 2 1d  , 1 2 d  is solved, then * 2 2 2 1 2 xy x e , the general solution of the original equation is 2 2 2 2 2 1 2 1 1 3 1 4 2 8 2 x x xy C e C xe x x x e      ( 1 2,C C are any constants) Example 3 Calculate the general solution of differential equation 2 2 cosxy y y xe x    Answer: The characteristic equation is 2 2 2 0r r   ,its root is 1r i  . Therefore, the general solution of the corresponding homogeneous linear differential equation is. Next, we need find a special solution of non-homogeneous linear differential equation, due to ( ) cosxf x xe x ,according to Theorem 3, The differential equation has the following form of special solutions * [( ) cos ( )sin ]xy xe a bx x c dx x    where , , ,a b c d are undetermined constants, we can gain (1 ) (1 )( ) 2 2 i x i xx x f x e e   by Euler's formula, according to Theorem 3, let ( ) ( ) ( ) 2 a bx i c dx R x x     , then ( )R x satisfies the differential equation ( ) [2(1 ) 2] ( ) 2 x R x i R x     by simplifing it, and we can obtain ( ) ( ) 2 2 2 x b c a d i bxi dx      thus 1 0, 0,2 0,2 2 b c a d b d      ,and 1 , 0 4 a d b c    are solved, then * 1 (cos sin ) 4 xy xe x x x  the general solution of the original equation is 1 2 1 cos sin (cos sin ) 4 x x xy C e x C e x xe x x x    ( 1 2,C C are any constants). 5. Conclusion On Second Order non-homogeneous linear differential equation with Constant Coefficients ( ) ( )L y f x ,this article focuses on three special forms of non-homogeneous term ( )f x , improve the comparison coefficient method, and obtain relevant conclusions. This greatly simplifies the process of solving the undetermined coefficients in the special solution, and this improvement can be extended to high-order constant coefficient non-homogeneous linear differential equation, which has some enlightenment for the learning of ordinary differential equation. Acknowledgments This study was supported by Fund Project: Anhui University of Finance and Economics Teaching and Research Project (acjyyb2021049), Anhui University of Finance and Economics combines online and offline first-class courses (acylkc2022013), Anhui Province Teaching and Research Project(2022jyxm016). References [1] G.X.Wang. Ordinary Differential Equation(Higher Education Press, China 2006),p.136-155 .(In Chinese). [2] Z.L.Xu. Interpretation of Problem Solving Methods in College Mathematics(Anhui Education Press, China 1999), p.585-588. (In Chinese). [3] K.L.Lin,J.Wang. Algebraic Methods for Solving linear differential equation with Constant Coefficient [J],Journal of Inner Mongolia Normal University (Natural Science Chinese Edition), Vol. 48 (2019) No.6, p. 576-581. 2019(6):576-581. [4] L.L.Zhao. New Understanding on the Solution of Constant Coefficient linear differential equation[J],Journal of Southwest University for Nationalities (Natural Science Edition), Vol. 45 (2019) No.2, p.200-205. [5] H. Q. Yang. Economic Mathematics-Calculus(Posts and Telecommunications Press, China 2020), p.238-239 .(In Chinese) [M], Beijing: Posts and Telecommunications Press, 2020: 238-239.