y′′+y′−2y=−6sin2x−18cos2x The general solution is y(x)=yc+ypyc=m2+m−2=0(m+2)(m−1)=0m1=−2,m2=1yc=c1em1x+c2em2x=c1e−2x+c2exyp=Acos2x+Bsin2xy1′p=−2Asin2x+2Bcos2xy1′′p=−4Acos2x−4Bsin2x substiute in the original equation −4Acos2x−4Bsin2x−2Asin2x+2Bcos2x−2Acos2x−2Bsin2x=−6sin2x−18cos2x−4A+2B−2A=−18→3A−B=9−4B−2A−2B=−6→A+3B=3Solve the two equations∴A=3,B=0∴yp=3cos2xy(x)=c1e−2x+c2ex+3cos2x∵y(0)=2→2=c1+c2+3→c1+c2=−1y′(x)=−2c1e−2x+c2ex−6sin2x∵y′(0)=2→2=−2c1+c2→−2c1+c2=2Solve the two equations∴c1=−1,c2=0y(x)=−e−2x+6ex+3cos2x=3cos2x−e−2x
Comments