Solving the differential equations for self-induction In my physics class we learned the equations for self-induction. Our teacher also showed us the differential equations and gave us the solutions. Because we didn't have differential equations in our Maths class he only told us that, if we were interested in how to solve these equation, we should look up separation of variables.
Because I am interested I looked it up and I am now able to solve the equation for switching the circuit on. But the equation for switching off is inhomogeneous and I can't seem to find the solution:
$$\frac{dI}{dt}+\frac RL * I = \frac{U_0}{L}, I(0s)=0A$$
He told us that the solution is:
$$I(t)=\frac {U_0}R *(1-e^{-\frac RL*t})$$
But I don't know how this works. I would really appreciate help showing the complete way to solve this.
EDIT: $\frac{U_0}R$ instead of $\frac{U_0}L$
 A: 
He told us that the solution is:
  $$I(t)=\frac {U_0}L *(1-e^{-\frac RL*t})$$

I think that you have a transcription error as the units of this equation are incorrect and it should be.  
$$I(t)=\frac {U_0}{R} *(1-e^{-\frac RL*t})$$

There are many techniques for solving differential equation and a way which is longer but might be easier goes like this.
Differentiate your equation $\frac{dI}{dt}+\frac RL * I = \frac{U_0}{L}$ with respect to $t$ to obtain $\frac{d^2I}{dt^2}+\frac RL * \frac{dI}{dt} = 0$ which gets rid of the constant on the right hand side.  
Let $X=\frac {dI}{dt}$ and so the equation that you have to solve is  $\frac{dX}{dt}+\frac RL * X = 0$ and you know that when $t=0$ then $X = \frac{U_0}{L}$
Separation of variables gives 
$\displaystyle \int^X_{\frac {U_0}{R}} \frac {dX}{X} = \frac RL \int ^t_0 dt  \Rightarrow X = \frac{dI}{dt} = \frac{U_0}{L} e^{-\frac RL t}$
Separate variable again $\displaystyle \int _0^I dI = \frac {U_0}{L} \int _0^t e^{-\frac RL t} \,dt$  
will gives the desired result.
A: The first step is $\frac{dI}{dt}=\frac{U_0}{L}-\frac{R}{L}I$, so we have $\frac{dI}{1-\frac{R}{U_0}I}=\frac{U_0}{L}dt$.
I hope you can continue now, is just integrate 
A: This can be solved by separating the variables. However, I find a quicker way is to multiply the whole equation by $e^{\frac{R}{L}t}$ to give
$$e^{\frac{R}{L}t} \ \frac{dI}{dt} + \frac{R}{L}Ie^{\frac{R}{L}t}=\frac{U_0}{L}e^{\frac{R}{L}t}$$
You may spot that using the chain rule the left side is the differential of $Ie^{\frac{R}{L}t}$ so
$$\frac{d}{dt}\bigl(Ie^{\frac{R}{L}t}\bigr)=\frac{U_0}{L}e^{\frac{R}{L}t}$$
Therefore,
$$Ie^{\frac{R}{L}t}=\int{\frac{U_0}{L}e^{\frac{R}{L}t}}dt$$
$$Ie^{\frac{R}{L}t}=\frac{U_0}{R}e^{\frac{R}{L}t}+k$$
Given that $I(0)=0$ then $k=-\frac{U_0}{R}$ so
$$Ie^{\frac{R}{L}t}=\frac{U_0}{R}e^{\frac{R}{L}t}-\frac{U_0}{R}$$
$$I=\frac{U_0}{R}(1-e^{-\frac{R}{L}t})$$
Apologies if I have made any mistakes as I don't know the physics involved, only the maths. If you want me to go through the method where we separate the variables just leave a comment. If you want to look up this method I have used look up "integrating factors" (I don't know if this method has a proper name)
