How does #e^(-x)(dy/dx)-e^(-x)y=e^(-x)cosx# simplify to #d/dx(ye^-x)=e^-xcosx#?

In a differential equation example in my book,
#e^(-x)dy/dx-e^-xy=e^(-x)cosx#
#d/dx(ye^-x)=e^-xcosx#

How do you get the second step from the first, I don't understand?

How does #e^(-x)(dy/dx)-e^(-x)y=e^(-x)cosx# simplify to #d/dx(ye^-x)=e^-xcosx#?

1 Answer
Feb 18, 2018

#"Given that, "e^-xdy/dx-e^-xy=e^-xcosx#.

Note that, by the Chain Rule, #d/dx(e^-x)=e^-x*d/dx(-x)#,

#:. d/dx(e^-x)=-e^-x#.

Using this, we replace the second term #e^-x# on the left member of

the eqn., and, get,

# e^-x*d/dx(y)+y*d/dx(e^-x)=e^-xcosx#.

Observe that, by the Product Rule, the left member is,

#d/dx(y*e^-x)#.

Hence, the eqn. becomes,

#d/dx(y*e^-x)=e^-x*cosx#.