73.7.24 problem 24

Internal problem ID [15111]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 8. Review exercises for part of part II. page 143
Problem number : 24
Date solved : Monday, March 31, 2025 at 01:25:11 PM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

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

Maple. Time used: 0.008 (sec). Leaf size: 24
ode:=diff(y(x),x) = (2*y(x)+x)/(2*x-y(x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \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 ) x \]
Mathematica. Time used: 0.034 (sec). Leaf size: 36
ode=D[y[x],x]==(x+2*y[x])/(2*x-y[x]); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {K[1]-2}{K[1]^2+1}dK[1]=-\log (x)+c_1,y(x)\right ] \]
Sympy. Time used: 1.399 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(x + 2*y(x))/(2*x - y(x)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x \right )} = C_{1} - \log {\left (\sqrt {1 + \frac {y^{2}{\left (x \right )}}{x^{2}}} \right )} + 2 \operatorname {atan}{\left (\frac {y{\left (x \right )}}{x} \right )} \]