15.2.4 problem 4

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

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

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