77.1.107 problem 135 (page 195)

Internal problem ID [17926]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 135 (page 195)
Date solved : Monday, March 31, 2025 at 04:51:37 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.138 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)*sin(x)^2 = 2*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = -i \ln \left (\cos \left (2 x \right )+i \sin \left (2 x \right )\right ) c_2 \cot \left (x \right )-2 c_2 +c_1 \cot \left (x \right ) \]
Mathematica. Time used: 0.146 (sec). Leaf size: 55
ode=D[y[x],{x,2}]*Sin[x]^2==2*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {c_2 \cos (x) \text {arctanh}\left (\frac {\cos (x)}{\sqrt {-\sin ^2(x)}}\right )+c_1 \cos (x)-c_2 \sqrt {-\sin ^2(x)}}{\sqrt {-\sin ^2(x)}} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*y(x) + sin(x)**2*Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : solve: Cannot solve -2*y(x) + sin(x)**2*Derivative(y(x), (x, 2))