83.49.2 problem Ex 2 page 120

Internal problem ID [19544]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Book Solved Excercises. Chapter VIII. Linear equations of second order
Problem number : Ex 2 page 120
Date solved : Monday, March 31, 2025 at 07:32:51 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.114 (sec). Leaf size: 29
ode:=sin(x)^2*diff(diff(y(x),x),x) = 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 )+c_1 \cot \left (x \right )-2 c_2 \]
Mathematica. Time used: 0.143 (sec). Leaf size: 55
ode=Sin[x]^2*D[y[x],{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))