Solve $$\left(y-x\frac{dy}{dx}\right)=a\left(y^2+\frac{dy}{dx}\right)$$
I solved it by dividing both sides with $y^2/dx$: $$\frac{(ydx-xdy)}{y^2}=a\left(dx+\frac{dy}{y^2}\right)$$ and then integrate to get $$x/y=ax-a/y+c$$But that doesn't match the answer given by SymbolLab:
$$y=\frac{ac_1+xc_1}{a\left(-1+xc_1+ac_1\right)}$$
What's the problem here? Why doesn't my simple differential equation solution match with the given answer?
Your answer is exactly what SymbolLab suggests.
In fact, your solution yields $$ \frac{x}{y}=ax-\frac{a}{y}+c\iff\frac{x+a}{y}=ax+c\iff y=\frac{x+a}{ax+c}. $$
By contrast, SymbolLab's suggestion reads $$ y=\frac{c_1\left(x+a\right)}{c_1ax+\left(c_1a^2-a\right)}=\frac{x+a}{ax+\left(a^2-a/c_1\right)}. $$
Now, $c$ is an arbitrary constant in your solution, while $c_1$ is an arbitrary constant in SymbolLab's suggestion. Further, the constant term $\left(a^2-a/c_1\right)$ from SymbolLab's suggestion plays the role of $c$ in your solution.