(常数变易法)
先解齐次方程y'+y/x=0的通解,
∵y'+y/x=0 ==>dy/y=-dx/x
==>ln│y│=-ln│x│+ln│C│ (C是积分常数)
==>y=C/x
∴齐次方程的通解是y=C/x.
于是,设原方程的通解为y=C(x)/x (C(x)是关于x的函数)
代入原方程得C'(x)/x=sinx ==>C'(x)=xsinx
∴C(x)=∫xsinxdx
=-xcosx+∫cosxdx (应用分部积分法)
=-xcosx+sinx+C (C是积分常数)
∴y=(-xcosx+sinx+C)/x
=-cosx+sinx/x+C/x
∵当x=π时,y=1
代入得 1=1+C/π ==>C=0
∴y=-cosx+sinx/x
故微分方程满足初始条件的特解是y=-cosx+sinx/x.