35.8.19 problem 19

Internal problem ID [6226]
Book : Mathematical Methods in the Physical Sciences. third edition. Mary L. Boas. John Wiley. 2006
Section : Chapter 8, Ordinary differential equations. Section 13. Miscellaneous problems. page 466
Problem number : 19
Date solved : Wednesday, March 05, 2025 at 12:25:58 AM
CAS classification : [_linear]

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

Maple. Time used: 0.003 (sec). Leaf size: 19
ode:=sin(x)^2*diff(y(x),x)+sin(x)^2+(x+y(x))*sin(2*x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {2 c_{1}}{-1+\cos \left (2 x \right )}-x \]
Mathematica. Time used: 0.076 (sec). Leaf size: 27
ode=Sin[x]^2*D[y[x],x]+(Sin[x]^2+(x+y[x])*Sin[2*x])==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} \csc ^2(x) (-x+x \cos (2 x)+2 c_1) \]
Sympy. Time used: 7.208 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + y(x))*sin(2*x) + sin(x)**2*Derivative(y(x), x) + sin(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \int \frac {\left (2 x + 2 y{\left (x \right )} + \tan {\left (x \right )}\right ) \sin ^{2}{\left (x \right )}}{\tan {\left (x \right )}}\, dx = C_{1} \]