53.1.216 problem 219

Internal problem ID [10688]
Book : Collection of Kovacic problems
Section : section 1
Problem number : 219
Date solved : Tuesday, September 30, 2025 at 07:31:00 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} f^{\prime \prime }+2 \left (z -1\right ) f^{\prime }+4 f&=0 \end{align*}
Maple. Time used: 0.006 (sec). Leaf size: 42
ode:=diff(diff(f(z),z),z)+2*(z-1)*diff(f(z),z)+4*f(z) = 0; 
dsolve(ode,f(z), singsol=all);
 
\[ f = \sqrt {\pi }\, \operatorname {erf}\left (i \left (z -1\right )\right ) c_2 \left (z -1\right ) {\mathrm e}^{-\left (z -1\right )^{2}}+c_1 \,{\mathrm e}^{-z \left (z -2\right )} \left (z -1\right )-i c_2 \]
Mathematica. Time used: 0.068 (sec). Leaf size: 72
ode=D[ f[z],{z,2}]+2*(z-a)*D[ f[z],z]+4*f[z]==0; 
ic={}; 
DSolve[{ode,ic},f[z],z,IncludeSingularSolutions->True]
 
\begin{align*} f(z)&\to e^{z (2 a-z)} \left (-\sqrt {\pi } c_2 \sqrt {(a-z)^2} \text {erfi}\left (\sqrt {(a-z)^2}\right )+c_2 e^{(a-z)^2}-2 a c_1+2 c_1 z\right ) \end{align*}
Sympy
from sympy import * 
z = symbols("z") 
f = Function("f") 
ode = Eq((2*z - 2)*Derivative(f(z), z) + 4*f(z) + Derivative(f(z), (z, 2)),0) 
ics = {} 
dsolve(ode,func=f(z),ics=ics)
 
False