∵dy/dx=y+cosx
==>dy-ydx=cosxdx
==>dy/e^x-ydx/e^x=cosxdx/e^x (等式两端同除e^x)
==>d(y/e^x)=d((sinx-cosx)/(2e^x))
==>y/e^x=d((sinx-cosx)/(2e^x)+C (C是常数)
==>y=(sinx-cosx)/2+Ce^x
∴原方程的通解是y=(sinx-cosx)/2+Ce^x.
∵dy/dx=y+cosx
==>dy-ydx=cosxdx
==>dy/e^x-ydx/e^x=cosxdx/e^x (等式两端同除e^x)
==>d(y/e^x)=d((sinx-cosx)/(2e^x))
==>y/e^x=d((sinx-cosx)/(2e^x)+C (C是常数)
==>y=(sinx-cosx)/2+Ce^x
∴原方程的通解是y=(sinx-cosx)/2+Ce^x.