76.11.7 problem 7

Internal problem ID [17472]
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.1 (Definitions and examples). Problems at page 214
Problem number : 7
Date solved : Thursday, March 13, 2025 at 10:09:10 AM
CAS classification : [[_2nd_order, _with_linear_symmetries]]

\begin{align*} a \,x^{2} y^{\prime \prime }+b x y^{\prime }+c y&=d \end{align*}

Maple. Time used: 0.007 (sec). Leaf size: 76
ode:=a*x^2*diff(diff(y(x),x),x)+b*x*diff(y(x),x)+c*y(x) = d; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{-\frac {-a +b +\sqrt {a^{2}+\left (-2 b -4 c \right ) a +b^{2}}}{2 a}} c_{1} c +x^{\frac {a -b +\sqrt {a^{2}+\left (-2 b -4 c \right ) a +b^{2}}}{2 a}} c_{2} c +d}{c} \]
Mathematica. Time used: 0.073 (sec). Leaf size: 108
ode=a*x^2*D[y[x],{x,2}]+b*x*D[y[x],x]+c*y[x]==d; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {d}{c}+x^{-\frac {\sqrt {a} \sqrt {c} \sqrt {\frac {a^2-2 a (b+2 c)+b^2}{a c}}-a+b}{2 a}} \left (c_2 x^{\frac {\sqrt {c} \sqrt {\frac {a^2-2 a (b+2 c)+b^2}{a c}}}{\sqrt {a}}}+c_1\right ) \]
Sympy. Time used: 1.352 (sec). Leaf size: 82
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
c = symbols("c") 
d = symbols("d") 
y = Function("y") 
ode = Eq(a*x**2*Derivative(y(x), (x, 2)) + b*x*Derivative(y(x), x) + c*y(x) - d,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sqrt {x} e^{\frac {\left (- b - \sqrt {a^{2} - 2 a b - 4 a c + b^{2}}\right ) \log {\left (x \right )}}{2 a}} + C_{2} \sqrt {x} e^{\frac {\left (- b + \sqrt {a^{2} - 2 a b - 4 a c + b^{2}}\right ) \log {\left (x \right )}}{2 a}} + \frac {d}{c} \]