76.12.25 problem 37

Internal problem ID [17502]
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 : 37
Date solved : Thursday, March 13, 2025 at 10:10:37 AM
CAS classification : [_Laguerre]

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

Using reduction of order method given that one solution is

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

Maple. Time used: 0.006 (sec). Leaf size: 30
ode:=x*diff(diff(y(x),x),x)-(x+n)*diff(y(x),x)+n*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} c_{1} +c_{2} \operatorname {WhittakerM}\left (\frac {n}{2}, \frac {n}{2}+\frac {1}{2}, x\right ) {\mathrm e}^{\frac {x}{2}} x^{\frac {n}{2}} \]
Mathematica. Time used: 0.12 (sec). Leaf size: 21
ode=x*D[y[x],{x,2}]-(x+n)*D[y[x],x]+n*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^x (c_1-c_2 \Gamma (n+1,x)) \]
Sympy
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(n*y(x) + x*Derivative(y(x), (x, 2)) - (n + x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Expected Expr or iterable but got None