15.3.13 problem 13

Internal problem ID [2906]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 7, page 28
Problem number : 13
Date solved : Sunday, March 30, 2025 at 12:49:12 AM
CAS classification : [[_homogeneous, `class C`], _rational, [_Abel, `2nd type`, `class A`]]

\begin{align*} 2 x +3 y+2+\left (y-x \right ) y^{\prime }&=0 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=-2 \end{align*}

Maple
ode:=2*x+3*y(x)+2+(y(x)-x)*diff(y(x),x) = 0; 
ic:=y(0) = -2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica. Time used: 0.086 (sec). Leaf size: 78
ode=(2*x+3*y[x]+2)+(y[x]-x)*D[y[x],x]==0; 
ic={y[0]==-2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [32 \arctan \left (\frac {2 y(x)+3 x+2}{x-y(x)}\right )=8 \log \left (\frac {10 x^2+10 x y(x)+5 y(x)^2+8 y(x)+12 x+4}{(5 x+2)^2}\right )+16 \log (5 x+2)-8 (\pi +3 \log (2)),y(x)\right ] \]
Sympy. Time used: 5.854 (sec). Leaf size: 75
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (-x + y(x))*Derivative(y(x), x) + 3*y(x) + 2,0) 
ics = {y(0): -2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \log {\left (x + \frac {2}{5} \right )} = - \log {\left (\sqrt {2 + \frac {2 \left (y{\left (x \right )} + \frac {2}{5}\right )}{x + \frac {2}{5}} + \frac {\left (y{\left (x \right )} + \frac {2}{5}\right )^{2}}{\left (x + \frac {2}{5}\right )^{2}}} \right )} + 2 \operatorname {atan}{\left (1 + \frac {y{\left (x \right )} + \frac {2}{5}}{x + \frac {2}{5}} \right )} - \log {\left (5 \right )} + \log {\left (2 \right )} + \frac {\log {\left (10 \right )}}{2} + 2 \operatorname {atan}{\left (3 \right )} \]