In my ODEs course, I have seen that the general solution to the equation $frac{dy}{dt} = ay+b$, if $a neq 0$ is:

$$

frac{dy/dt}{ay+b} = 1 \

vdots \

y = Ce^{at}-frac{b}{a}

$$

However, I fail to see why a solution could not be derived as follows:

$$

frac{dy}{dt} = ay+b \

int frac{dy}{dt} dt = int{ay+b} dt \

y = ayt + bt + C \

y (1-at) = bt + C \

y = frac{bt + C}{1 – at}

$$

I suppose this must be erroneous but I don’t see where my mistake is. What is the problem with this solution? Thank you!