18.3.9 problem Problem 16.11

Internal problem ID [3509]
Book : Mathematical methods for physics and engineering, Riley, Hobson, Bence, second edition, 2002
Section : Chapter 16, Series solutions of ODEs. Section 16.6 Exercises, page 550
Problem number : Problem 16.11
Date solved : Sunday, March 30, 2025 at 01:45:21 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} z y^{\prime \prime }+\left (2 z -3\right ) y^{\prime }+\frac {4 y}{z}&=0 \end{align*}

Using series method with expansion around

\begin{align*} 0 \end{align*}

Maple. Time used: 0.015 (sec). Leaf size: 48
Order:=6; 
ode:=z*diff(diff(y(z),z),z)+(2*z-3)*diff(y(z),z)+4/z*y(z) = 0; 
dsolve(ode,y(z),type='series',z=0);
 
\[ y = \left (\left (c_2 \ln \left (z \right )+c_1 \right ) \left (1-4 z +6 z^{2}-\frac {16}{3} z^{3}+\frac {10}{3} z^{4}-\frac {8}{5} z^{5}+\operatorname {O}\left (z^{6}\right )\right )+\left (6 z -13 z^{2}+\frac {124}{9} z^{3}-\frac {173}{18} z^{4}+\frac {374}{75} z^{5}+\operatorname {O}\left (z^{6}\right )\right ) c_2 \right ) z^{2} \]
Mathematica. Time used: 0.006 (sec). Leaf size: 116
ode=z*D[y[z],{z,2}]+(2*z-3)*D[y[z],z]+4/z*y[z]==0; 
ic={}; 
AsymptoticDSolveValue[{ode,ic},y[z],{z,0,5}]
 
\[ y(z)\to c_1 \left (-\frac {8 z^5}{5}+\frac {10 z^4}{3}-\frac {16 z^3}{3}+6 z^2-4 z+1\right ) z^2+c_2 \left (\left (\frac {374 z^5}{75}-\frac {173 z^4}{18}+\frac {124 z^3}{9}-13 z^2+6 z\right ) z^2+\left (-\frac {8 z^5}{5}+\frac {10 z^4}{3}-\frac {16 z^3}{3}+6 z^2-4 z+1\right ) z^2 \log (z)\right ) \]
Sympy. Time used: 0.923 (sec). Leaf size: 27
from sympy import * 
z = symbols("z") 
y = Function("y") 
ode = Eq(z*Derivative(y(z), (z, 2)) + (2*z - 3)*Derivative(y(z), z) + 4*y(z)/z,0) 
ics = {} 
dsolve(ode,func=y(z),ics=ics,hint="2nd_power_series_regular",x0=0,n=6)
 
\[ y{\left (z \right )} = C_{1} z^{2} \left (- \frac {16 z^{3}}{3} + 6 z^{2} - 4 z + 1\right ) + O\left (z^{6}\right ) \]