82.54.1 problem Ex. 1

Internal problem ID [18946]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter IX. Equations of the second order. problems at end of chapter at page 120
Problem number : Ex. 1
Date solved : Monday, March 31, 2025 at 06:26:16 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.006 (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.039 (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.224 (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}} \]