12.1.11 problem Problem 14.11

Internal problem ID [3467]
Book : Mathematical methods for physics and engineering, Riley, Hobson, Bence, second edition, 2002
Section : Chapter 14, First order ordinary differential equations. 14.4 Exercises, page 490
Problem number : Problem 14.11
Date solved : Tuesday, September 30, 2025 at 06:39:25 AM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} \left (y-x \right ) y^{\prime }+2 x +3 y&=0 \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 26
ode:=(y(x)-x)*diff(y(x),x)+2*x+3*y(x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x \left (-1+\tan \left (\operatorname {RootOf}\left (-4 \textit {\_Z} +\ln \left (\sec \left (\textit {\_Z} \right )^{2}\right )+2 \ln \left (x \right )+2 c_1 \right )\right )\right ) \]
Mathematica. Time used: 0.022 (sec). Leaf size: 45
ode=(y[x]-x)*D[y[x],x]+2*x+3*y[x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\frac {1}{2} \log \left (\frac {y(x)^2}{x^2}+\frac {2 y(x)}{x}+2\right )-2 \arctan \left (\frac {y(x)}{x}+1\right )=-\log (x)+c_1,y(x)\right ] \]
Sympy. Time used: 1.356 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (-x + y(x))*Derivative(y(x), x) + 3*y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x \right )} = C_{1} - \log {\left (\sqrt {2 + \frac {2 y{\left (x \right )}}{x} + \frac {y^{2}{\left (x \right )}}{x^{2}}} \right )} + 2 \operatorname {atan}{\left (1 + \frac {y{\left (x \right )}}{x} \right )} \]