29.2.8 problem 33

Internal problem ID [4641]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 2
Problem number : 33
Date solved : Sunday, March 30, 2025 at 03:32:02 AM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=2+2 \sec \left (2 x \right )+2 y \tan \left (2 x \right ) \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 24
ode:=diff(y(x),x) = 2+2*sec(2*x)+2*y(x)*tan(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\operatorname {csgn}\left (\sec \left (2 x \right )\right ) c_1 +\sin \left (2 x \right )+2 x \right ) \sec \left (2 x \right ) \]
Mathematica. Time used: 0.065 (sec). Leaf size: 20
ode=D[y[x],x]==2*(1+Sec[2 x]+y[x] Tan[2 x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sec (2 x) (2 x+\sin (2 x)+c_1) \]
Sympy. Time used: 0.946 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*y(x)*tan(2*x) + Derivative(y(x), x) - 2 - 2/cos(2*x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + 2 x + \sin {\left (2 x \right )}}{\cos {\left (2 x \right )}} \]