\[ a y'(x)+b y(x)+y''(x)+\tan (x)=0 \] ✓ Mathematica : cpu = 0.439261 (sec), leaf count = 1400
DSolve[Tan[x] + b*y[x] + a*Derivative[1][y][x] + Derivative[2][y][x] == 0,y[x],x]
\[\left \{\left \{y(x)\to e^{\frac {1}{2} \left (-a-\sqrt {a^2-4 b}\right ) x} c_1+e^{\frac {1}{2} \left (\sqrt {a^2-4 b}-a\right ) x} c_2+\frac {8 \left (2 \, _2F_1\left (1,\frac {1}{4} i \left (\sqrt {a^2-4 b}-a\right );\frac {1}{4} i \left (\sqrt {a^2-4 b}-a\right )+1;-e^{2 i x}\right ) a^2-2 \, _2F_1\left (1,-\frac {1}{4} i \left (a+\sqrt {a^2-4 b}\right );\frac {1}{4} \left (-i a-i \sqrt {a^2-4 b}+4\right );-e^{2 i x}\right ) a^2-i b e^{2 i x} \, _2F_1\left (1,-\frac {i a}{4}-\frac {1}{4} i \sqrt {a^2-4 b}+1;-\frac {i a}{4}-\frac {1}{4} i \sqrt {a^2-4 b}+2;-e^{2 i x}\right ) a+i b e^{2 i x} \, _2F_1\left (1,-\frac {i a}{4}+\frac {1}{4} i \sqrt {a^2-4 b}+1;-\frac {i a}{4}+\frac {1}{4} i \sqrt {a^2-4 b}+2;-e^{2 i x}\right ) a-i b \, _2F_1\left (1,\frac {1}{4} i \left (\sqrt {a^2-4 b}-a\right );\frac {1}{4} i \left (\sqrt {a^2-4 b}-a\right )+1;-e^{2 i x}\right ) a+2 \sqrt {a^2-4 b} \, _2F_1\left (1,\frac {1}{4} i \left (\sqrt {a^2-4 b}-a\right );\frac {1}{4} i \left (\sqrt {a^2-4 b}-a\right )+1;-e^{2 i x}\right ) a+4 i \, _2F_1\left (1,\frac {1}{4} i \left (\sqrt {a^2-4 b}-a\right );\frac {1}{4} i \left (\sqrt {a^2-4 b}-a\right )+1;-e^{2 i x}\right ) a+i b \, _2F_1\left (1,-\frac {1}{4} i \left (a+\sqrt {a^2-4 b}\right );\frac {1}{4} \left (-i a-i \sqrt {a^2-4 b}+4\right );-e^{2 i x}\right ) a+2 \sqrt {a^2-4 b} \, _2F_1\left (1,-\frac {1}{4} i \left (a+\sqrt {a^2-4 b}\right );\frac {1}{4} \left (-i a-i \sqrt {a^2-4 b}+4\right );-e^{2 i x}\right ) a-4 i \, _2F_1\left (1,-\frac {1}{4} i \left (a+\sqrt {a^2-4 b}\right );\frac {1}{4} \left (-i a-i \sqrt {a^2-4 b}+4\right );-e^{2 i x}\right ) a+i \sqrt {a^2-4 b} b e^{2 i x} \, _2F_1\left (1,-\frac {i a}{4}-\frac {1}{4} i \sqrt {a^2-4 b}+1;-\frac {i a}{4}-\frac {1}{4} i \sqrt {a^2-4 b}+2;-e^{2 i x}\right )+4 b e^{2 i x} \, _2F_1\left (1,-\frac {i a}{4}-\frac {1}{4} i \sqrt {a^2-4 b}+1;-\frac {i a}{4}-\frac {1}{4} i \sqrt {a^2-4 b}+2;-e^{2 i x}\right )+i \sqrt {a^2-4 b} b e^{2 i x} \, _2F_1\left (1,-\frac {i a}{4}+\frac {1}{4} i \sqrt {a^2-4 b}+1;-\frac {i a}{4}+\frac {1}{4} i \sqrt {a^2-4 b}+2;-e^{2 i x}\right )-4 b e^{2 i x} \, _2F_1\left (1,-\frac {i a}{4}+\frac {1}{4} i \sqrt {a^2-4 b}+1;-\frac {i a}{4}+\frac {1}{4} i \sqrt {a^2-4 b}+2;-e^{2 i x}\right )-i \sqrt {a^2-4 b} b \, _2F_1\left (1,\frac {1}{4} i \left (\sqrt {a^2-4 b}-a\right );\frac {1}{4} i \left (\sqrt {a^2-4 b}-a\right )+1;-e^{2 i x}\right )+4 i \sqrt {a^2-4 b} \, _2F_1\left (1,\frac {1}{4} i \left (\sqrt {a^2-4 b}-a\right );\frac {1}{4} i \left (\sqrt {a^2-4 b}-a\right )+1;-e^{2 i x}\right )-i \sqrt {a^2-4 b} b \, _2F_1\left (1,-\frac {1}{4} i \left (a+\sqrt {a^2-4 b}\right );\frac {1}{4} \left (-i a-i \sqrt {a^2-4 b}+4\right );-e^{2 i x}\right )+4 i \sqrt {a^2-4 b} \, _2F_1\left (1,-\frac {1}{4} i \left (a+\sqrt {a^2-4 b}\right );\frac {1}{4} \left (-i a-i \sqrt {a^2-4 b}+4\right );-e^{2 i x}\right )\right )}{\left (\sqrt {a^2-4 b}-a\right ) \left (-a+\sqrt {a^2-4 b}-4 i\right ) \left (a+\sqrt {a^2-4 b}\right ) \left (a+\sqrt {a^2-4 b}+4 i\right ) \sqrt {a^2-4 b}}\right \}\right \}\] ✓ Maple : cpu = 0.343 (sec), leaf count = 134
dsolve(diff(diff(y(x),x),x)+a*diff(y(x),x)+tan(x)+b*y(x)=0,y(x))
\[y \left (x \right ) = {\mathrm e}^{-\frac {\left (a -\sqrt {a^{2}-4 b}\right ) x}{2}} c_{2}+{\mathrm e}^{-\frac {\left (a +\sqrt {a^{2}-4 b}\right ) x}{2}} c_{1}+\frac {\left (\left (\int \tan \left (x \right ) {\mathrm e}^{\frac {\left (a +\sqrt {a^{2}-4 b}\right ) x}{2}}d x \right ) {\mathrm e}^{-\frac {\left (-a +\sqrt {a^{2}-4 b}\right ) x}{2}}-\left (\int \tan \left (x \right ) {\mathrm e}^{-\frac {\left (-a +\sqrt {a^{2}-4 b}\right ) x}{2}}d x \right ) {\mathrm e}^{\frac {\left (a +\sqrt {a^{2}-4 b}\right ) x}{2}}\right ) {\mathrm e}^{-a x}}{\sqrt {a^{2}-4 b}}\]