Solveeit Logo

Question

Question: Solve \[\left( {1 + x} \right)\dfrac{{dy}}{{dx}} - xy = 1 - x\]...

Solve (1+x)dydxxy=1x\left( {1 + x} \right)\dfrac{{dy}}{{dx}} - xy = 1 - x

Explanation

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(ab)dx=adx+bdx\int {\left( {a - b} \right)dx} = \int {adx} + \int {bdx} .
2. Integration of reciprocal of xx is given by 1xdx=logx+C\int {\dfrac{1}{x}dx} = \log \left| x \right| + C.
3. Rule of multiplication of exponents with the same base is given by axy=axay{a^{x - y}} = {a^x} \cdot {a^{ - y}}.
4. Rule for a negative power is given by ay=1ay{a^{ - y}} = \dfrac{1}{{{a^y}}}.
5. elogx=x{e^{\log x}} = x
6. The formula for integration by parts is given by uvdx=uv(uv)dx\int {uvdx} = u\int v - \int {\left( {u'\int v } \right)dx} .
7. Difference of 2 square numbers is given by a2b2=(ab)(a+b){a^2} - {b^2} = \left( {a - b} \right)\left( {a + b} \right).

Complete step by step solution:
The given equation is of the form
dydx+py=f(x)\dfrac{{dy}}{{dx}} + py = f\left( x \right)………………(1)\left( 1 \right)
The integrating factor of such an equation is epdx{e^{\int {pdx} }}and the solution of the equation is given by y(I.F)=f(x)(I.F)dxy\left( {{\rm{I}}{\rm{.F}}} \right) = \int {f\left( x \right)\left( {{\rm{I}}{\rm{.F}}} \right)dx} …………….(2)\left( 2 \right).
We will divide both sides of the given equation by 1+x1 + x. Therefore, we get
(1+x)(1+x)dydxxy(1+x)=1x(1+x)\Rightarrow \dfrac{{\left( {1 + x} \right)}}{{\left( {1 + x} \right)}}\dfrac{{dy}}{{dx}} - \dfrac{{xy}}{{\left( {1 + x} \right)}} = \dfrac{{1 - x}}{{\left( {1 + x} \right)}}
dydxxy1+x=1x1+x\Rightarrow \dfrac{{dy}}{{dx}} - \dfrac{{xy}}{{1 + x}} = \dfrac{{1 - x}}{{1 + x}}………………….(3)\left( 3 \right)
On comparing the above equation with equation (1), we can see that
p=x1+x\Rightarrow p = - \dfrac{x}{{1 + x}}
We will now find the integral of pp. So,
pdx=x1+xdx\Rightarrow \int {pdx} = - \int {\dfrac{x}{{1 + x}}dx}
We will add and subtract 1 to the numerator:
pdx=1+x11+xdx pdx=(1+x1+x11+x)dx\begin{array}{l} \Rightarrow \int {pdx} = - \int {\dfrac{{1 + x - 1}}{{1 + x}}dx} \\\ \Rightarrow \int {pdx} = - \int {\left( {\dfrac{{1 + x}}{{1 + x}} - \dfrac{1}{{1 + x}}} \right)dx} \end{array}
Simplifying the expression, we get
pdx=1+x1+xdx+11+xdx pdx=1dx+11+xdx\begin{array}{l} \Rightarrow \int {pdx} = - \int {\dfrac{{1 + x}}{{1 + x}}dx} + \int {\dfrac{1}{{1 + x}}dx} \\\ \Rightarrow \int {pdx} = - \int {1dx} + \int {\dfrac{1}{{1 + x}}dx} \end{array}
Now integrating each term, we get
pdx=x+log(1+x)+C\Rightarrow \int {pdx} = - x + \log \left( {1 + x} \right) + C
Now, we will compute epdx{e^{\int {pdx} }}.
epdx=elog(1+x)x epdx=elog(1+x)ex epdx=(1+x)loge×1ex epdx=1+xex\begin{array}{l} \Rightarrow {e^{\int {pdx} }} = {e^{\log \left( {1 + x} \right) - x}}\\\ \Rightarrow {e^{\int {pdx} }} = {e^{\log \left( {1 + x} \right)}} \cdot {e^{ - x}}\\\ \Rightarrow {e^{\int {pdx} }} = {\left( {1 + x} \right)^{\log e}} \times \dfrac{1}{{{e^x}}}\\\ \Rightarrow {e^{\int {pdx} }} = \dfrac{{1 + x}}{{{e^x}}}\end{array}
We will find the solution of the differential equation. We will substitute 1+xex\dfrac{{1 + x}}{{{e^x}}} for I.F. and 1x1+x\dfrac{{1 - x}}{{1 + x}} for f(x)f\left( x \right) in equation (2):
y1+xex=1x1+x1+xexdx yex(1+x)=ex(1+x)dx\begin{array}{l} \Rightarrow y\dfrac{{1 + x}}{{{e^x}}} = \int {\dfrac{{1 - x}}{{1 + x}} \cdot \dfrac{{1 + x}}{{{e^x}}}dx} \\\ \Rightarrow y{e^{ - x}}\left( {1 + x} \right) = \int {{e^{ - x}}\left( {1 + x} \right)dx} \end{array}
Simplifying the expression, we get
yex(1+x)=exdx+exxdx\Rightarrow y{e^{ - x}}\left( {1 + x} \right) = \int {{e^{ - x}}dx} + \int {{e^{ - x}}xdx}
Integrating the above expression using the formula, we get
yex(1+x)=ex+(xex+ex)+C y=xexex(1+x)+Cex(1+x)\begin{array}{l} \Rightarrow y{e^{ - x}}\left( {1 + x} \right) = - {e^{ - x}} + \left( {x{e^{ - x}} + {e^{ - x}}} \right) + C\\\ \Rightarrow y = \dfrac{{x{e^{ - x}}}}{{{e^{ - x}}\left( {1 + x} \right)}} + \dfrac{C}{{{e^{ - x}}\left( {1 + x} \right)}}\end{array}
Simplifying the expression, we get
y=x1+x+C\Rightarrow y = \dfrac{x}{{1 + x}} + C'

So the required answer is y=x1+x+Cy = \dfrac{x}{{1 + x}} + C'.

Note:
We can verify whether our solution is correct or not by substituting the value of yy that we have obtained in the original equation. If yy satisfies the equation, then we can be sure that we have solved the question correctly.
We will substitute x1+x\dfrac{x}{{1 + x}} for yy in the left-hand side of the original equation. Therefore, we get
L.H.S=(1+x)ddx(x1+x)x(x1+x){\rm{L}}{\rm{.H}}{\rm{.S}} = \left( {1 + x} \right)\dfrac{d}{{dx}}\left( {\dfrac{x}{{1 + x}}} \right) - x\left( {\dfrac{x}{{1 + x}}} \right)
Computing ddx(x1+x)\dfrac{d}{{dx}}\left( {\dfrac{x}{{1 + x}}} \right), we get
ddx(x1+x)=ddx(x)(1+x)ddx(1+x)x(1+x)2 ddx(x1+x)=1+xx(1+x)2 ddx(x1+x)=1(1+x)2\begin{array}{l} \Rightarrow \dfrac{d}{{dx}}\left( {\dfrac{x}{{1 + x}}} \right) = \dfrac{{\dfrac{d}{{dx}}\left( x \right) \cdot \left( {1 + x} \right) - \dfrac{d}{{dx}}\left( {1 + x} \right) \cdot x}}{{{{\left( {1 + x} \right)}^2}}}\\\ \Rightarrow \dfrac{d}{{dx}}\left( {\dfrac{x}{{1 + x}}} \right) = \dfrac{{1 + x - x}}{{{{\left( {1 + x} \right)}^2}}}\\\ \Rightarrow \dfrac{d}{{dx}}\left( {\dfrac{x}{{1 + x}}} \right) = \dfrac{1}{{{{\left( {1 + x} \right)}^2}}}\end{array}
We will substitute 1(1+x)2\dfrac{1}{{{{\left( {1 + x} \right)}^2}}} for ddx(x1+x)\dfrac{d}{{dx}}\left( {\dfrac{x}{{1 + x}}} \right) in equation (1+x)ddx(x1+x)x(x1+x)\left( {1 + x} \right)\dfrac{d}{{dx}}\left( {\dfrac{x}{{1 + x}}} \right) - x\left( {\dfrac{x}{{1 + x}}} \right). Therefore, we get
(1+x)ddx(x1+x)x(x1+x)=(1+x)1(1+x)2x(x1+x) (1+x)ddx(x1+x)x(x1+x)=11+xx21+x\begin{array}{l} \Rightarrow \left( {1 + x} \right)\dfrac{d}{{dx}}\left( {\dfrac{x}{{1 + x}}} \right) - x\left( {\dfrac{x}{{1 + x}}} \right) = \left( {1 + x} \right)\dfrac{1}{{{{\left( {1 + x} \right)}^2}}} - x\left( {\dfrac{x}{{1 + x}}} \right)\\\ \Rightarrow \left( {1 + x} \right)\dfrac{d}{{dx}}\left( {\dfrac{x}{{1 + x}}} \right) - x\left( {\dfrac{x}{{1 + x}}} \right) = \dfrac{1}{{1 + x}} - \dfrac{{{x^2}}}{{1 + x}}\end{array}
Subtracting the terms, we get
(1+x)ddx(x1+x)x(x1+x)=1x21+x (1+x)ddx(x1+x)x(x1+x)=(1x)(1+x)(1+x) 1x=R.H.S\begin{array}{l} \Rightarrow \left( {1 + x} \right)\dfrac{d}{{dx}}\left( {\dfrac{x}{{1 + x}}} \right) - x\left( {\dfrac{x}{{1 + x}}} \right) = \dfrac{{1 - {x^2}}}{{1 + x}}\\\ \Rightarrow \left( {1 + x} \right)\dfrac{d}{{dx}}\left( {\dfrac{x}{{1 + x}}} \right) - x\left( {\dfrac{x}{{1 + x}}} \right) = \dfrac{{\left( {1 - x} \right)\left( {1 + x} \right)}}{{\left( {1 + x} \right)}}\\\ \Rightarrow 1 - x = {\rm{R}}{\rm{.H}}{\rm{.S}}\end{array}
As the left-hand side and the right-hand side are equal, our solution is correct.