ODE No. 1874

\[ \left \{x'(t)=f(t) x(t)+g(t) y(t),y'(t)=f(t) y(t)-g(t) x(t)\right \} \] Mathematica : cpu = 0.0075882 (sec), leaf count = 115

DSolve[{Derivative[1][x][t] == f[t]*x[t] + g[t]*y[t], Derivative[1][y][t] == -(g[t]*x[t]) + f[t]*y[t]},{x[t], y[t]},t]
 

\[\left \{\left \{x(t)\to c_1 \exp \left (\int _1^tf(K[2])dK[2]\right ) \cos \left (\int _1^tg(K[1])dK[1]\right )+c_2 \exp \left (\int _1^tf(K[2])dK[2]\right ) \sin \left (\int _1^tg(K[1])dK[1]\right ),y(t)\to c_2 \exp \left (\int _1^tf(K[2])dK[2]\right ) \cos \left (\int _1^tg(K[1])dK[1]\right )-c_1 \exp \left (\int _1^tf(K[2])dK[2]\right ) \sin \left (\int _1^tg(K[1])dK[1]\right )\right \}\right \}\] Maple : cpu = 0.457 (sec), leaf count = 57

dsolve({diff(x(t),t) = x(t)*f(t)+y(t)*g(t), diff(y(t),t) = -x(t)*g(t)+y(t)*f(t)})
 

\[\{x \left (t \right ) = {\mathrm e}^{\int \left (\tan \left (c_{1}-\left (\int g \left (t \right )d t \right )\right ) g \left (t \right )+f \left (t \right )\right )d t} c_{2}, y \left (t \right ) = {\mathrm e}^{\int \left (\tan \left (c_{1}-\left (\int g \left (t \right )d t \right )\right ) g \left (t \right )+f \left (t \right )\right )d t} c_{2} \tan \left (c_{1}-\left (\int g \left (t \right )d t \right )\right )\}\]