83.37.3 problem 3

Internal problem ID [19377]
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 (B) at page 128
Problem number : 3
Date solved : Monday, March 31, 2025 at 07:11:50 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime }+\frac {2 y^{\prime }}{x}&=n^{2} y \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 21
ode:=diff(diff(y(x),x),x)+2*diff(y(x),x)/x = n^2*y(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1 \sinh \left (n x \right )+c_2 \cosh \left (n x \right )}{x} \]
Mathematica. Time used: 0.028 (sec). Leaf size: 35
ode=D[y[x],{x,2}]+2/x*D[y[x],x]==n^2*y[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {2 c_1 n e^{-n x}+c_2 e^{n x}}{2 n x} \]
Sympy. Time used: 0.213 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-n**2*y(x) + Derivative(y(x), (x, 2)) + 2*Derivative(y(x), x)/x,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} J_{\frac {1}{2}}\left (x \sqrt {- n^{2}}\right ) + C_{2} Y_{\frac {1}{2}}\left (x \sqrt {- n^{2}}\right )}{\sqrt {x}} \]