18.1.17 problem Problem 14.23 (b)

Internal problem ID [3473]
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.23 (b)
Date solved : Tuesday, March 04, 2025 at 04:41:29 PM
CAS classification : [_separable]

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

Maple. Time used: 0.003 (sec). Leaf size: 16
ode:=diff(y(x),x) = 4*y(x)^2/x^2-y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \frac {x}{c_{1} x +x^{2}+4} \]
Mathematica. Time used: 0.162 (sec). Leaf size: 24
ode=D[y[x],x]== 4*y[x]^2/x^2 - y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x}{x^2-c_1 x+4} \\ y(x)\to 0 \\ \end{align*}
Sympy. Time used: 0.194 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(y(x)**2 + Derivative(y(x), x) - 4*y(x)**2/x**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {x}{C_{1} x + x^{2} + 4} \]