76.12.26 problem 38

Internal problem ID [17511]
Book : Differential equations. An introduction to modern methods and applications. James Brannan, William E. Boyce. Third edition. Wiley 2015
Section : Chapter 4. Second order linear equations. Section 4.2 (Theory of second order linear homogeneous equations). Problems at page 226
Problem number : 38
Date solved : Monday, March 31, 2025 at 04:16:10 PM
CAS classification : [[_2nd_order, _exact, _linear, _homogeneous]]

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

Using reduction of order method given that one solution is

\begin{align*} y&={\mathrm e}^{-\frac {a \,x^{2}}{2}} \end{align*}

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