15.4.2 problem 2

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

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

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