19.1.7 problem 7

Internal problem ID [3521]
Book : Differential equations and linear algebra, Stephen W. Goode, second edition, 2000
Section : 1.4, page 36
Problem number : 7
Date solved : Sunday, March 30, 2025 at 01:45:45 AM
CAS classification : [_separable]

\begin{align*} y-x y^{\prime }&=3-2 x^{2} y^{\prime } \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 17
ode:=y(x)-x*diff(y(x),x) = 3-2*x^2*diff(y(x),x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1 x -3}{2 x -1} \]
Mathematica. Time used: 0.035 (sec). Leaf size: 24
ode=y[x]-x*D[y[x],x]==3-2*x^2*D[y[x],x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {3+c_1 x}{1-2 x} \\ y(x)\to 3 \\ \end{align*}
Sympy. Time used: 0.304 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x**2*Derivative(y(x), x) - x*Derivative(y(x), x) + y(x) - 3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} x + 6 x - 3}{2 x - 1} \]