Simple ODE Analytical Solution Question: $\frac{dx}{dt} = ax + bu$ my question is in regards to the following formula: 
\begin{align}
\frac{dx}{dt}=ax+bu
\end{align}
where x(0)=0 & u=constant and a & b are scalar
The answer to this or at least what I was given as the answer is the following: 
\begin{align}
x=-\frac{bu}{a}(1-e^{at)}
\end{align}
Now I understand that I need to manipulate the formula and integrate both sides. Utilizing the integration table I perform the following: 
Since u=constant we can then say bu=b therefore:
\begin{align}
\frac {dx}{ax+b}= {dt}
\end{align}
\begin{align}
\int \frac {dx}{ax+b}= \int{dt}
\end{align}
\begin{align}
\frac{1}{a}ln|ax+b| = t + C
\end{align}
\begin{align}
e^{ln|ax+b|} = e^{(t + C)a}
\end{align}
\begin{align}
ax+b = e^{at+Ct}
\end{align}
\begin{align}
x = -\frac{b}{a} \frac{e^{at}e^{Ct}}{a}
\end{align}
I do not see where I am going wrong in the calcs above. I would appreciate any help in identifying where I went wrong. 
Thank you
 A: $$\begin{align}
x = -\frac{b}{a} \frac{e^{at}e^{Ct}}{a}
\end{align}$$
This line isn't correct, it should be: 
$$\begin{align}
x = -\frac{b}{a} +\frac{e^{(t+C)a}}{a}
\end{align}$$
A: You reached upto 
$$ax+B = e^{at+\color{red}{Ca}} \implies ax=e^{(t+C)a}-B \implies x=\frac{1}{a}\left(e^{(t+C)a}-B\right)$$
Now you need to use the given information : when $x=0, t=0$ too.
$$0=\frac{1}{a}\left(e^{(0+C)a}-B\right) \implies e^{aC}=B$$
Now put this back into your equation to get
$$x=\frac{1}{a}\left(e^{aC}\cdot e^{at}-B\right)=\frac{1}{a}\left(B\cdot e^{at}-B\right)$$
And replace$B$ with $bu$, to get
$$x=-\frac{bu}{a}\left(1-e^{at} \right)$$
A: It is right up to the third-to-last step, so you did the calculus correctly and slipped up on the algebra (it happens to everyone :D):
$$e^{\ln{|ax+b|}}=e^{(t+C)a}$$
Then you accidentally distributed the wrong letter in the exponent on the RHS, so the next step should be:
$$ax+b=e^{at+Ca}$$
Of course, $e^{Ca}$ is just a constant, so replace it by $c$:
$$ax+b=e^{at+Ca}=e^{at}e^{Ca}=ce^{at}$$
Then, solve for $x$:
$$x=\frac{ce^{at}-b}{a}=\frac{ce^{at}}{a}-\frac{b}{a}$$
To bring it into the required form, first factor out $-\frac{b}{a}$:
$$x=-\frac{b}{a}\left(1-bce^{at}\right)$$
Then replace $b$ back with $bu$:
$$x=-\frac{bu}{a}\left(1-buce^{at}\right)$$
Then use $x(0)=0$ to conclude that $buc=1$, and you're done.
