1.9Ritz-Galerkin法伽辽金法基本思想:伽辽金法是一种变分方法,亦称里兹(Ritz)平均法。基本思想是假设一含待定系数的近似解,代入控制方程后产生偏差(残值),为使偏差最小,用一权函数(变分)乘以该偏差,并使其在一周期内积分为零。从而得到确定待定系数的代数方程组,解此方程组求出待定系数,即得所求近似解。0)(xfx•自治系统•为待求的圆频率•看成静力平衡方程0)(xfx•表示惯性力x)(xf•表示转动力和约束反力•由虚位移原理:0)]([xxfx1Niiixtawt代入原方程,由于近似解一般不会刚好等于真解,所以会产生不等于零的残值11()0NNiiiiiiiRaawfaw&&近似解的变分1Niiixwta设解为使偏差最小,取这个残值与近似解的变分的乘积,在一周期内积分(也即使偏差在一个周期内平均分布)为零:00111()d0d0TiNNNTiiiiiiiiiRaxtawfawwat&&由于ia任意,则:011d0i=0,1,2...NNTiiiiiiiawfawwt&&ia解此代数方程组,求出N个待定系数,代回原方程即得近似解03cxbxx例1Duffing方程的周期3)(cxbxxf1111()coscosxatata•设,2,10)()])(()([011jdtttaftaTjniiiniii0)())]([)([011111Tdtttafta231110[coscos(cos)]cos0Tatbatcattdt231110[coscos(cos)]cos0Taptbatcattdt233110()coscos]cos0Tabtcattdt22234110()coscos0abcatdt23111314()4022422abca22134bca03cxbxx•例1Duffing方程的周期11331313()()coscos3coscos3xatatatataa3)(cxbxxf0)())]([)([011111Tdtttafta2,10)()])(()([011jdtttaftaTjniiiniii2,10)()])(()([011jdtttaftaTjniiiniii0)(]3coscos[3cos9cos[0)(]3coscos[3cos9cos[033131013131TTdttaafaadttaafaa2213130[cos9cos3[coscos3]cos0.Taptatfatattdt2213130[cos9cos3[coscos3]cos30Tatatfatattdt22323233113301()(43663)208Fdbaacacaaca223221111131301()(44336)208Fdbaacacaacaa23221111313443360baacacaacaa2323331133436630baacacaaca2322111313232331133333()0442133(9)0424bacacaacaabacacaaca•初始条件0)0(,1)0(xx120.997093,0.002907,1.03672aattptaptax11036.3cos002907.003672.1cos997093.03coscos312322111313232331133333()0442133(9)0424bacacaacaabacacaaca例2用伽辽金法求Duffing方程的周期解03xxxcoscosxata==3023202220cosdcoscoscosd31[(1)coscos3]cosd044TTTxxxtaaataaat设解(仅取一项权函数cos)代入Duffing方程,并令与权函数乘积在一周期内积分=022200222231cos21(1)dcos3cosd04243310144TTatataa3023202220cosdcoscoscosd31[(1)coscos3]cosd044TTTxxxtaaataaat131322133333332222131313133313221313coscos3coscos3cos9cos3(coscos)coscos33coscos33coscos33131(coscos3)(cos3cos9)444433(1cos2)cos322xatataaxaaxaaaaaaaaaaaaaa=+=+=--=+=+++=++++++&&322332113131313cos(1cos6)333133()cos()cos3424442aaaaaaaaa()+=++++++D设解:3030cosd0cos3d0TTxxxtxxxt23221111313023233311330333{[()]cos}cosd0424133{[9()]cos}cos3d0424TTaaaaaaataaaaaat-++++=-++++=òò2322111313232331133333(1)0442133(19)0424aaaaaaaaaaa2221133232331133333(1)0442133(19)0424aaaaaaaaa给定适当参数后,采用C++语言编程求解。