20.10.9 problem Problem 22

Internal problem ID [3781]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.8, A Differential Equation with Nonconstant Coefficients. page 567
Problem number : Problem 22
Date solved : Sunday, March 30, 2025 at 02:08:24 AM
CAS classification : [[_Emden, _Fowler]]

\begin{align*} x^{2} y^{\prime \prime }-x y^{\prime }+5 y&=0 \end{align*}

With initial conditions

\begin{align*} y \left (1\right )&=\sqrt {2}\\ y^{\prime }\left (1\right )&=3 \sqrt {2} \end{align*}

Maple. Time used: 0.083 (sec). Leaf size: 20
ode:=x^2*diff(diff(y(x),x),x)-x*diff(y(x),x)+5*y(x) = 0; 
ic:=y(1) = 2^(1/2), D(y)(1) = 3*2^(1/2); 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = x \sqrt {2}\, \left (\sin \left (2 \ln \left (x \right )\right )+\cos \left (2 \ln \left (x \right )\right )\right ) \]
Mathematica. Time used: 0.026 (sec). Leaf size: 23
ode=x^2*D[y[x],{x,2}]-x*D[y[x],x]+5*y[x]==0; 
ic={y[1]==Sqrt[2],Derivative[1][y][1]==3*Sqrt[2]}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \sqrt {2} x (\sin (2 \log (x))+\cos (2 \log (x))) \]
Sympy. Time used: 0.197 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) - x*Derivative(y(x), x) + 5*y(x),0) 
ics = {y(1): sqrt(2), Subs(Derivative(y(x), x), x, 1): 3*sqrt(2)} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \left (\sqrt {2} \sin {\left (2 \log {\left (x \right )} \right )} + \sqrt {2} \cos {\left (2 \log {\left (x \right )} \right )}\right ) \]