Question
Question: Solve \[\left( {1 + x} \right)\dfrac{{dy}}{{dx}} - xy = 1 - x\]...
Solve (1+x)dxdy−xy=1−x
Solution
We can solve a differential equation by finding the integrating factor (I.F.). We will convert the given equation into an equation into standard differential equation. Then we will find the integrating factor for this equation and then find the solution accordingly.
Formulas used: We will use the following formulas:
1. Integration of difference of 2 functions is given by∫(a−b)dx=∫adx+∫bdx.
2. Integration of reciprocal of x is given by ∫x1dx=log∣x∣+C.
3. Rule of multiplication of exponents with the same base is given by ax−y=ax⋅a−y.
4. Rule for a negative power is given by a−y=ay1.
5. elogx=x
6. The formula for integration by parts is given by ∫uvdx=u∫v−∫(u′∫v)dx.
7. Difference of 2 square numbers is given by a2−b2=(a−b)(a+b).
Complete step by step solution:
The given equation is of the form
dxdy+py=f(x)………………(1)
The integrating factor of such an equation is e∫pdxand the solution of the equation is given by y(I.F)=∫f(x)(I.F)dx…………….(2).
We will divide both sides of the given equation by 1+x. Therefore, we get
⇒(1+x)(1+x)dxdy−(1+x)xy=(1+x)1−x
⇒dxdy−1+xxy=1+x1−x………………….(3)
On comparing the above equation with equation (1), we can see that
⇒p=−1+xx
We will now find the integral of p. So,
⇒∫pdx=−∫1+xxdx
We will add and subtract 1 to the numerator:
⇒∫pdx=−∫1+x1+x−1dx ⇒∫pdx=−∫(1+x1+x−1+x1)dx
Simplifying the expression, we get
⇒∫pdx=−∫1+x1+xdx+∫1+x1dx ⇒∫pdx=−∫1dx+∫1+x1dx
Now integrating each term, we get
⇒∫pdx=−x+log(1+x)+C
Now, we will compute e∫pdx.
⇒e∫pdx=elog(1+x)−x ⇒e∫pdx=elog(1+x)⋅e−x ⇒e∫pdx=(1+x)loge×ex1 ⇒e∫pdx=ex1+x
We will find the solution of the differential equation. We will substitute ex1+x for I.F. and 1+x1−x for f(x) in equation (2):
⇒yex1+x=∫1+x1−x⋅ex1+xdx ⇒ye−x(1+x)=∫e−x(1+x)dx
Simplifying the expression, we get
⇒ye−x(1+x)=∫e−xdx+∫e−xxdx
Integrating the above expression using the formula, we get
⇒ye−x(1+x)=−e−x+(xe−x+e−x)+C ⇒y=e−x(1+x)xe−x+e−x(1+x)C
Simplifying the expression, we get
⇒y=1+xx+C′
So the required answer is y=1+xx+C′.
Note:
We can verify whether our solution is correct or not by substituting the value of y that we have obtained in the original equation. If y satisfies the equation, then we can be sure that we have solved the question correctly.
We will substitute 1+xx for y in the left-hand side of the original equation. Therefore, we get
L.H.S=(1+x)dxd(1+xx)−x(1+xx)
Computing dxd(1+xx), we get
⇒dxd(1+xx)=(1+x)2dxd(x)⋅(1+x)−dxd(1+x)⋅x ⇒dxd(1+xx)=(1+x)21+x−x ⇒dxd(1+xx)=(1+x)21
We will substitute (1+x)21 for dxd(1+xx) in equation (1+x)dxd(1+xx)−x(1+xx). Therefore, we get
⇒(1+x)dxd(1+xx)−x(1+xx)=(1+x)(1+x)21−x(1+xx) ⇒(1+x)dxd(1+xx)−x(1+xx)=1+x1−1+xx2
Subtracting the terms, we get
⇒(1+x)dxd(1+xx)−x(1+xx)=1+x1−x2 ⇒(1+x)dxd(1+xx)−x(1+xx)=(1+x)(1−x)(1+x) ⇒1−x=R.H.S
As the left-hand side and the right-hand side are equal, our solution is correct.