Here is a simple differential equation.
mwe=y[x]/.First@DSolve [{y'[x]==x-2*x*y[x],y[0]==0},y[x],x]
I get the answer $\frac{1}{2}-\frac{e^{-x^2}}{2}$
If I build up the same equation in a simple program, I get a different answer:
lsolve[r_,q_,a_,eta_]=y[x]/.First@DSolve[{y'[x]==r-q*y[x],y[a]==eta},y[x],x];
nwe=lsolve[x,2*x,0,0]
After simplifying, I get the answer $\frac{1}{2}-\frac{e^{-2x^2}}{2}$. Where did the extra factor of $2$ in the exponent come from? And how can I make it go away?