Integrating linearly I came across this question and just want to make sure my understanding is correct. 
I need to find the general solution of:
$$
\frac{dx}{dt} = a(1 - x)
$$
In this case, I'm finding the how $x$ changes with respect to $t$ so I'm integrating with respect to $t$. Does that mean the answer is $at - xat + C$? 
Thanks :) 
 A: You can't say that, simply because the function $x$ has a dependence in $t$ ! 
A: If you are given, for $x=x(t)$
$$\frac{dx}{dt} = a(1-x)$$
Then, one can re-arrange (by abuse of notation), giving
\begin{align}
\frac{dx}{1-x} &= a\, dt \\
\implies \int \left(\frac{1}{1-x}\right)dx &= a \int dt
\end{align}
The right hand side is straightforward for you, the left requires some knowledge of standard integrals.
Does this help?
A: You must write
$$\frac{dx}{1-x}=a dt$$
A: If you write it as $dx = a(1-x)dt$ then it would be correct to integrate $x$ with respect to $t$. The trouble is, to perform the integration correctly, you would need to know what the dependence of $x$ on $t$ is, which is what you're trying to find out in the first place. To see what the problem with $\int xdt =xt+C$ is, consider any function, e.g. $x=t$. If we  substitute $t$ in for $x$ before integrating, we get $\int tdt =\frac {t^2}2+C$. But if we use $\int xdt =xt+C$ and substitute $t$ in for $x$ afterwards, we get $\int xdt =t^2+C$, which is off by a factor of 2. Or if $x = \sin(t)$, then we would have $\int \sin(t)dt=t\sin(t)+C$ instead of  $\int \sin(t)dt = \cos(t)+C$. If we had that  $\int f(t)dt =tf(t)+C$, that would make the whole concept of an integral rather trivial; the integral of any function would just be that function times the independent variable. The identity $\int xdt=xt+C$ works only if $x$ doesn't depend on $t$. Remember, an integral can be interpreted as the area under a curve. If $x$ is a constant, then we just have a rectangle with width $t$ and height $x$, so the area is $xt$. But if $x$ is varying with $t$, then we can't just take the value of $x$ at the end of the interval; clearly the area is going to depend on what $x$ is doing in between.
Note that if you get familiar with basic differential forms, you should get to a point where you recognize that when the derivative is proportional to the function value, you have an exponential function. In this case, the differential equation is modified by a constant term. So if you take the test solution $x = c_1e^{c_2t}+c_3$, solve for the derivative in terms of $c_1$, $c_2$, and $c_3$, and then plug that into the differential equation, then you can solve for $c_1$, $c_2$, and $c_3$. Note that one degree of freedom will remain, since this is a first-order equation and no initial condition is given. 
