\[ a y'(x)+b y(x)+y''(x)+\tan (x)=0 \] ✓ Mathematica : cpu = 0.476844 (sec), leaf count = 1400
\[\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.22 (sec), leaf count = 125
\[ \left \{ y \left ( x \right ) ={{\rm e}^{-{\frac {x}{2} \left ( a-\sqrt {{a}^{2}-4\,b} \right ) }}}{\it \_C2}+{{\rm e}^{-{\frac {x}{2} \left ( a+\sqrt {{a}^{2}-4\,b} \right ) }}}{\it \_C1}-{1 \left ( \int \!\tan \left ( x \right ) {{\rm e}^{-{\frac {x}{2} \left ( -a+\sqrt {{a}^{2}-4\,b} \right ) }}}\,{\rm d}x{{\rm e}^{x\sqrt {{a}^{2}-4\,b}}}-\int \!\tan \left ( x \right ) {{\rm e}^{{\frac {x}{2} \left ( a+\sqrt {{a}^{2}-4\,b} \right ) }}}\,{\rm d}x \right ) {{\rm e}^{-{\frac {x}{2} \left ( a+\sqrt {{a}^{2}-4\,b} \right ) }}}{\frac {1}{\sqrt {{a}^{2}-4\,b}}}} \right \} \]