29.6.11 problem 157

Internal problem ID [4757]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 6
Problem number : 157
Date solved : Tuesday, March 04, 2025 at 07:14:01 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 22
ode:=x*diff(y(x),x)+2+(3-x)*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {{\mathrm e}^{x} c_{1} +2 x^{2}+4 x +4}{x^{3}} \]
Mathematica. Time used: 0.034 (sec). Leaf size: 25
ode=x D[y[x],x]+2+(3-x)y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {2 x^2+4 x+c_1 e^x+4}{x^3} \]
Sympy. Time used: 0.293 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + (3 - x)*y(x) + 2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\frac {C_{1} e^{x}}{x^{2}} + 2 + \frac {4}{x} + \frac {4}{x^{2}}}{x} \]