20.2.7 problem Problem 7

Internal problem ID [3599]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.4, Separable Differential Equations. page 43
Problem number : Problem 7
Date solved : Sunday, March 30, 2025 at 01:53:56 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.033 (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.271 (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} \]