19.2.6 problem 6

Internal problem ID [3535]
Book : Differential equations and linear algebra, Stephen W. Goode, second edition, 2000
Section : 1.6, page 50
Problem number : 6
Date solved : Sunday, March 30, 2025 at 01:46:27 AM
CAS classification : [_linear]

\begin{align*} 2 \cos \left (x \right )^{2} y^{\prime }+y \sin \left (2 x \right )&=4 \cos \left (x \right )^{4} \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 13
ode:=2*cos(x)^2*diff(y(x),x)+y(x)*sin(2*x) = 4*cos(x)^4; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (2 \sin \left (x \right )+c_1 \right ) \cos \left (x \right ) \]
Mathematica. Time used: 0.047 (sec). Leaf size: 15
ode=2*Cos[x]^2*D[y[x],x]+y[x]*Sin[2*x]==4*Cos[x]^4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \cos (x) (2 \sin (x)+c_1) \]
Sympy. Time used: 144.533 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)*sin(2*x) - 4*cos(x)**4 + 2*cos(x)**2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} + 2 \sin {\left (x \right )}\right ) \cos {\left (x \right )} \]