Whats is the solution to the differential equation dy/dx + y = x?

2 Answers
Feb 27, 2018

#y = A e^-x + x - 1#

Explanation:

#"This is a linear first order diff. eq. There is a general technique"#
#"for solving this kind of equation. The situation here is simpler"#
#"though."#

#"First search the solution of the homogeneous equation (= the"#
#"same equation with right hand side equal to zero :"#

#{dy}/{dx} + y = 0#

#"This is a linear first order diff. eq. with constant coefficients."#
#"We can solve those with the substitution "y = A e^(rx) :#

#r A e^(rx) + A e^(rx) = 0#
#=> r + 1 = 0" (after dividing through "A e^(rx)")"#
#=> r = -1#
#=> y = A e^-x#

#"Then we search a particular solution of the entire equation."#
#"Here we have an easy situation as we have an easy polynomial"#
#"in the right hand side of the equation."#

#"We try a polynomial of the same degree (degree 1) as solution:"#

#y = x + b#
#=> 1 + x + b = x#
#=> b = -1#
#=> y = x - 1 " is the particular solution."#

#"The entire solution is the sum of the particular solution that we"#
#"have found and the solution to the homogeneous equation :"#

#=> y = A e^-x + x - 1#

Feb 28, 2018

#y=Ce^(-x)+x-1#

Explanation:

#dy/dx+y=x#

#y'+y=x#

#(y'+y)*e^x=xe^x#

#(ye^x)'=xe^x#

#ye^x=int xe^x*dx#

#ye^x=xe^x-int e^x*dx#

#ye^x=(x-1)*e^x+C#

#y=Ce^(-x)+x-1#