4.1.35 \(y'(x)=3 y(x) \tan (x)+\csc (x)\)

ODE
\[ y'(x)=3 y(x) \tan (x)+\csc (x) \] ODE Classification

[_linear]

Book solution method
Linear ODE

Mathematica
cpu = 0.0263951 (sec), leaf count = 24

\[\left \{\left \{y(x)\to \sec ^3(x) \left (c_1+\frac {1}{4} \cos (2 x)+\log (\sin (x))\right )\right \}\right \}\]

Maple
cpu = 0.067 (sec), leaf count = 40

\[ \left \{ y \left ( x \right ) ={\frac {2\, \left ( \cos \left ( x \right ) \right ) ^{2}+2\,\ln \left ( \cos \left ( x \right ) -1 \right ) +2\,\ln \left ( 1+\cos \left ( x \right ) \right ) +4\,{\it \_C1}}{\cos \left ( 3\,x \right ) +3\,\cos \left ( x \right ) }} \right \} \] Mathematica raw input

DSolve[y'[x] == Csc[x] + 3*Tan[x]*y[x],y[x],x]

Mathematica raw output

{{y[x] -> (C[1] + Cos[2*x]/4 + Log[Sin[x]])*Sec[x]^3}}

Maple raw input

dsolve(diff(y(x),x) = csc(x)+3*y(x)*tan(x), y(x),'implicit')

Maple raw output

y(x) = (2*cos(x)^2+2*ln(cos(x)-1)+2*ln(1+cos(x))+4*_C1)/(cos(3*x)+3*cos(x))