60.1.158 problem 161

Internal problem ID [10172]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 161
Date solved : Sunday, March 30, 2025 at 03:21:30 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 27
ode:=(x^2-5*x+6)*diff(y(x),x)+3*x*y(x)-8*y(x)+x^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-\frac {1}{4} x^{4}+\frac {2}{3} x^{3}+c_1}{\left (x -2\right )^{2} \left (x -3\right )} \]
Mathematica. Time used: 0.135 (sec). Leaf size: 93
ode=(x^2-5*x+6)*D[y[x],x] + 3*x*y[x] - 8*y[x] + x^2==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \exp \left (\int _1^x\frac {8-3 K[1]}{K[1]^2-5 K[1]+6}dK[1]\right ) \left (\int _1^x-\frac {\exp \left (-\int _1^{K[2]}\frac {8-3 K[1]}{K[1]^2-5 K[1]+6}dK[1]\right ) K[2]^2}{K[2]^2-5 K[2]+6}dK[2]+c_1\right ) \]
Sympy. Time used: 0.419 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2 + 3*x*y(x) + (x**2 - 5*x + 6)*Derivative(y(x), x) - 8*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} - \frac {x^{4}}{4} + \frac {2 x^{3}}{3}}{x^{3} - 7 x^{2} + 16 x - 12} \]