What is the general solution of the differential equation #dy/dx=y+x-1 #?
1 Answer
# y= Ce^x - x #
Explanation:
We can use an integrating factor when we have a First Order Linear non-homogeneous Ordinary Differential Equation of the form;
# dy/dx + P(x)y=Q(x) #
We have:
# dy/dx=y+x-1#
# :. dy/dx-y = x-1 # ..... [1]
This is a First Order Ordinary Differential Equation in Standard Form. So we compute and integrating factor,
# I = e^(int P(x) dx) #
# \ \ = exp(int \ -1 \ dx) #
# \ \ = exp( -x ) #
# \ \ = e^( -x ) #
And if we multiply the DE [1] by this Integrating Factor,
# dy/dxe^( -x )-ye^( -x ) = xe^( -x )-e^( -x ) #
# :. d/dx{ye^( -x )} = xe^( -x )-e^( -x ) #
This has transformed our initial ODE into a Separable ODE, so we can now "separate the variables" to get::
# ye^( -x ) = int \ xe^( -x )-e^( -x ) \ dx #
We can integrate, and we get:
# ye^( -x ) = -xe^-x + C #
Leading to the explicit General Solution:
# y= Ce^x - x #