83.38.8 problem 8

Internal problem ID [19396]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VIII. Linear equations of second order. Excercise VIII (C) at page 133
Problem number : 8
Date solved : Monday, March 31, 2025 at 07:12:29 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Maple. Time used: 0.277 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)+(tan(x)-1)^2*diff(y(x),x)-n*(n-1)*y(x)*sec(x)^4 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-\frac {\tan \left (x \right )}{2}} \left (c_1 \sinh \left (\left (n -\frac {1}{2}\right ) \tan \left (x \right )\right )+c_2 \cosh \left (\left (n -\frac {1}{2}\right ) \tan \left (x \right )\right )\right ) \]
Mathematica. Time used: 1.876 (sec). Leaf size: 209
ode=D[y[x],{x,2}]+(Tan[x]-1)^2*D[y[x],x]-n*(n-1)*y[x]*Sec[x]^4==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {\sqrt {-\cos (x)+\sqrt {\cos (x)-1} \sqrt {\cos (x)+1}-1} \sqrt {-\cos (x)+\sqrt {\cos (x)-1} \sqrt {\cos (x)+1}+1} \exp \left (-\frac {1}{2} \sqrt {\cos (x)+1} \sec (x) \left (\sqrt {-(1-2 n)^2} \sqrt {\cos (x)-1}+\sqrt {1-\cos (x)}\right )\right ) \left (c_1 \sqrt {-(1-2 n)^2} \exp \left (\sqrt {-(2 n-1)^2} \sqrt {\cos (x)-1} \sqrt {\cos (x)+1} \sec (x)\right )+c_2\right )}{2 \sqrt {-(1-2 n)^2} \sqrt [4]{-\sin ^2(x)} \left (\sqrt {\cos (x)-1}-\sqrt {\cos (x)+1}\right )} \]
Sympy
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-n*(n - 1)*y(x)/cos(x)**4 + (tan(x) - 1)**2*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False