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$ 

$$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\\ \\ \\ \\ $$

