12.8.12 problem 15

Internal problem ID [1748]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 5 linear second order equations. Section 5.1 Homogeneous linear equations. Page 203
Problem number : 15
Date solved : Tuesday, March 04, 2025 at 01:41:33 PM
CAS classification : [[_Emden, _Fowler]]

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

Maple. Time used: 0.003 (sec). Leaf size: 14
ode:=x^2*diff(diff(y(x),x),x)-(2*a-1)*x*diff(y(x),x)+a^2*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_2 \ln \left (x \right )+c_1 \right ) x^{a} \]
Mathematica. Time used: 0.019 (sec). Leaf size: 18
ode=x^2*D[y[x],{x,2}]-(2*a-1)*x*D[y[x],x]+a^2*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x^a (a c_2 \log (x)+c_1) \]
Sympy. Time used: 0.300 (sec). Leaf size: 54
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a**2*y(x) + x**2*Derivative(y(x), (x, 2)) - x*(2*a - 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x^{\operatorname {re}{\left (a\right )}} \left (C_{3} \sin {\left (\log {\left (x \right )} \left |{\operatorname {im}{\left (a\right )}}\right | \right )} + C_{4} \cos {\left (\log {\left (x \right )} \operatorname {im}{\left (a\right )} \right )} + \left (C_{1} \sin {\left (\log {\left (x \right )} \left |{\operatorname {im}{\left (a\right )}}\right | \right )} + C_{2} \cos {\left (\log {\left (x \right )} \operatorname {im}{\left (a\right )} \right )}\right ) \log {\left (x \right )}\right ) \]