\[ f(x) y(x)-g(x)+y'(x)=0 \] ✓ Mathematica : cpu = 0.0288013 (sec), leaf count = 66
\[\left \{\left \{y(x)\to \exp \left (\int _1^x-f(K[1])dK[1]\right ) \int _1^x\exp \left (-\int _1^{K[2]}-f(K[1])dK[1]\right ) g(K[2])dK[2]+c_1 \exp \left (\int _1^x-f(K[1])dK[1]\right )\right \}\right \}\] ✓ Maple : cpu = 0.028 (sec), leaf count = 24
\[y \relax (x ) = \left (\int g \relax (x ) {\mathrm e}^{\int f \relax (x )d x}d x +c_{1}\right ) {\mathrm e}^{\int -f \relax (x )d x}\]
Hand solution
\begin {equation} \frac {dy}{dx}+y\relax (x) f\relax (x) =g\relax (x) \tag {1} \end {equation}
Integrating factor \(\mu =e^{\int f\relax (x) dx}\). Therefore (1) becomes\[ \frac {d}{dx}\left (e^{\int f\relax (x) dx}y\relax (x) \right ) =e^{\int f\relax (x) dx}g\relax (x) \] Integrating\begin {align*} e^{\int f\relax (x) dx}y\relax (x) & =\int e^{\int f\left ( x\right ) dx}g\relax (x) dx+C\\ y\relax (x) & =e^{-\int f\relax (x) dx}\int e^{\int f\left ( x\right ) dx}g\relax (x) dx+e^{-\int f\relax (x) dx}C\\ & =\left (\int e^{\int f\relax (x) dx}g\relax (x) dx+C\right ) e^{-\int f\relax (x) dx} \end {align*}