Unable to solve this ODE I want to solve this ODE. I am a beginner in this feels and this seems really tough for  a students who has just studies for 3 weeks yet. please help me solve this equation: 
$$\dfrac{dx}{dt} = 10- 10\dfrac{x}{500-5t}$$
Here $x$ is a function of $t$ i.e $x(t)$ and we have to solve for $x(t)$. Initial condition is given that at $t=0$ by $x(t) = 0$.
Thanks
 A: Standard method: 
1) Get it into the form $\dfrac{dx}{dt}+P(t)x=Q(t)$
At this point, you want to multiply the left hand side by a function $R(t)$ so that it is of the form $\dfrac{d}{dt}\left[xR(t)\right]=R(t)\dfrac{dx}{dt}+xR'(t)$ (by the product rule).  From this, we see that we need $P(t)R'(t)=R(t)$.  
This is a differential equation which you should be able to solve.  For reference, the solution for general $P(t)$ is $R(t)=e^{\int^t P(\tau)d\tau}$.  Then the equation becomes easy to solve: 
$$
\dfrac{d}{dt}\left[xR(t)\right]=Q(t)R(t)
$$
Anti-differentiating both sides leads you to the answer.
A: This is simply a 1st order linear ODE, as it is in the form,
$\frac{dx}{dt} + P(t)x = Q(t) $
i.e. 
$\frac{dx}{dt} + \frac{10}{500-5t}x = 10$
In order to solve this, use an integrating factor, $I(t)$ :
$ I(t) = exp(\int P(t)  dt) $
This is,
$I(t) = exp(\int \frac{10}{500-5t} dt) = exp (-2(ln(500-5t) + C) = exp(ln(\frac{1}{(500-5t)^2}) + ln(C')) = \frac{A}{25(100-t)^2} $ 
(where $A, C,$ and $C'$ are constants of integration).
Multiplying the ODE through by integrating factor $\frac{25.I(t)}{A}$, we get,
$\frac{x'(t)}{(100-t)^2} + \frac{2x}{(100-t)^3} = \frac{10}{(100-t)^2} $
$\implies \frac{d}{dt} [x(100-t)^{-2}] = \frac{10}{(100-t)^2} $
$\implies \int \frac{d}{dt}[x(100-t)^{-2}] dt = \int \frac{10}{(100-t)^2}dt $
$ \implies x(100-t)^{-2} = 10(100-t)^{-1} + B $ , where $B$ is a constant of integration
$ \implies x(t) = 10(100-t) + B(100-t)^2 = (100-t)[10+B(100-t)]$
Hence, $x(t)$ is the quadratic described above. Notice that the ODE has a singularity at $t=100$ so $x(t)$ is defined for $\forall t \in \mathbb{R}\setminus{\left\{100\right\}}$.
