Solve the initial Value Problem Solve the initial value problem:
$x'=\frac{-1}{1+t}x+2$, $x(0)=1$
What I have done so far:
$\frac{dx}{dt}= \frac{-1}{1+t}x$ 
$\frac{dx}{dt}-2= \frac{-1}{1+t}x$ 
$dx-2dt= \frac{-dt}{1+t}x$ 
$dx=\frac{-dt}{1+t}x +2dt$ 
 A: The idea behind an integrating factor is to multiply your equation through by another function: $$yx' + \frac{yx}{1+t} = 2y$$.
Now we want to choose the function $y$ so that the LH side can be considered the derivative of a product: $$\frac{\mathrm d(xy)}{\mathrm dt} = yx' + xy' = yx' + x\frac{y}{1+t}$$
So we need $y' = \frac{y}{1+t}$, which is a much easier equation to solve. Once we know what $y$ is, then we can integrate $\frac{\mathrm d(xy)}{\mathrm dt} = 2y$ to find what $xy$ is. Divide that by $y$ to find $x$.
A: Your equation is:
$$
\dfrac{dx}{dt}+\dfrac{x}{1+t}=2
$$
multipling by $(1+t)$ and noting that $\dfrac {d}{dt}(1+t)=1$ we find:
$$
(1+t)\dfrac{dx}{dt}+x\dfrac{d}{dt}(1+t)=2(1+t)
$$
and, by product rule:
$$
\dfrac{d[(1+t)x]}{dt}=2(1+t)
$$
that you can separate as:
$$
d[(1+t)x]=2(1+t)dt
$$
and easely integrate.
A: $$x'=\frac { -1 }{ 1+t } x+2\\ { x }^{ \prime  }+\frac { 1 }{ 1+t } x=0\\ \frac { dx }{ dt } =-\frac { x }{ 1+t } \\ \int { \frac { dx }{ x }  } =-\int { \frac { dt }{ 1+t }  } \\ \ln { \left| x \right|  } =-\ln { C\left| 1+t \right| =\ln { \frac { C }{ \left| 1+t \right|  }  }  } \\ x=\frac { C }{ 1+t } \\ { x }^{ \prime  }=\frac { { C }^{ \prime  }\left( t \right) \left( 1+t \right) -C\left( t \right)  }{ { \left( 1+t \right)  }^{ 2 } } \\ \frac { { C }^{ \prime  }\left( t \right) \left( 1+t \right) -C\left( t \right)  }{ { \left( 1+t \right)  }^{ 2 } } +\frac { 1 }{ 1+t } \frac { C }{ 1+t } =2\\ \frac { { C }^{ \prime  }\left( t \right)  }{ { 1+t } } =2\\ C\left( t \right) =2\int { \left( 1+t \right) dt } =2t+{ t }^{ 2 }+C_{ 1 }\\ x\left( t \right) =\frac { 2t+{ t }^{ 2 }+C_{ 1 } }{ 1+t } \\ x\left( 0 \right) =\frac { 2\cdot 0+{ 0 }^{ 2 }+C_{ 1 } }{ 1+0 } =1\Rightarrow { C }_{ 1 }=1\\ $$

$$x\left( t \right) =\frac { 2t+{ t }^{ 2 }+1 }{ 1+t } =\frac { { \left( 1+t \right)  }^{ 2 } }{ 1+t } =1+t\\ \\ \\ \\ $$

