\[ \boxed { {\frac {\rm d}{{\rm d}x}}y \left ( x \right ) +f \left ( x \right ) y \left ( x \right ) -g \left ( x \right ) =0} \]
Mathematica: cpu = 0.472560 (sec), leaf count = 62 \[ \left \{\left \{y(x)\to c_1 e^{\int _1^x -f(K[1]) \, dK[1]}+e^{\int _1^x -f(K[1]) \, dK[1]} \int _1^x g(K[2]) e^{-\int _1^{K[2]} -f(K[1]) \, dK[1]} \, dK[2]\right \}\right \} \]
Maple: cpu = 0.0 (sec), leaf count = 24 \[ \left \{ y \left ( x \right ) = \left ( \int \!g \left ( x \right ) { {\rm e}^{\int \!f \left ( x \right ) \,{\rm d}x}}\,{\rm d}x+{\it \_C1} \right ) {{\rm e}^{\int \!-f \left ( x \right ) \,{\rm d}x}} \right \} \]
Sage: cpu = 0.096 (sec), leaf count = 0 \[ \left [{\left (c + \int e^{\left (\int f\left (x\right )\,{d x}\right )} g\left (x\right )\,{d x}\right )} e^{\left (-\int f\left (x\right )\,{d x}\right )}, \text {\texttt {linear}}\right ] \]