83.36.10 problem 10

Internal problem ID [19373]
Book : A Text book for differentional equations for postgraduate students by Ray and Chaturvedi. First edition, 1958. BHASKAR press. INDIA
Section : Chapter VIII. Linear equations of second order. Excercise VIII (A) at page 125
Problem number : 10
Date solved : Monday, March 31, 2025 at 07:11:44 PM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

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

Using reduction of order method given that one solution is

\begin{align*} y&={\mathrm e}^{a x} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 27
ode:=diff(diff(y(x),x),x)-a*x*diff(y(x),x)+a^2*(x-1)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{a x} \left (c_2 \,\operatorname {erf}\left (\frac {\sqrt {2}\, \sqrt {-a}\, \left (x -2\right )}{2}\right )+c_1 \right ) \]
Mathematica. Time used: 0.171 (sec). Leaf size: 54
ode=D[y[x],{x,2}]-a*x*D[y[x],x]+a^2*(x-1)*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2} e^{a x} \left (\frac {\sqrt {2 \pi } e^{-2 a} c_2 \text {erfi}\left (\frac {\sqrt {a} (x-2)}{\sqrt {2}}\right )}{\sqrt {a}}+2 c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(a**2*(x - 1)*y(x) - a*x*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
False