88.6.1 problem 1

Internal problem ID [23983]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 2. Differential equations of first order. Exercise at page 38
Problem number : 1
Date solved : Thursday, October 02, 2025 at 09:48:59 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} y^{\prime }&=\frac {3 x -y}{x +2 y} \end{align*}
Maple. Time used: 0.013 (sec). Leaf size: 53
ode:=diff(y(x),x) = (-y(x)+3*x)/(2*y(x)+x); 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {-c_1 x -\sqrt {7 x^{2} c_1^{2}+2}}{2 c_1} \\ y &= \frac {-c_1 x +\sqrt {7 x^{2} c_1^{2}+2}}{2 c_1} \\ \end{align*}
Mathematica. Time used: 0.318 (sec). Leaf size: 114
ode=D[y[x],{x,1}]==(3*x-y[x])/(x+2*y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{2} \left (-x-\sqrt {7 x^2+2 e^{2 c_1}}\right )\\ y(x)&\to \frac {1}{2} \left (-x+\sqrt {7 x^2+2 e^{2 c_1}}\right )\\ y(x)&\to \frac {1}{2} \left (-\sqrt {7} \sqrt {x^2}-x\right )\\ y(x)&\to \frac {1}{2} \left (\sqrt {7} \sqrt {x^2}-x\right ) \end{align*}
Sympy. Time used: 0.726 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (3*x - y(x))/(x + 2*y(x)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \frac {x}{2} - \frac {\sqrt {C_{1} + 7 x^{2}}}{2}, \ y{\left (x \right )} = - \frac {x}{2} + \frac {\sqrt {C_{1} + 7 x^{2}}}{2}\right ] \]