15.8.49 problem 52

Internal problem ID [3052]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 12, page 46
Problem number : 52
Date solved : Sunday, March 30, 2025 at 01:14:29 AM
CAS classification : [_separable]

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

With initial conditions

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

Maple. Time used: 0.061 (sec). Leaf size: 16
ode:=4*x*y(x)^2+(x^2+1)*diff(y(x),x) = 0; 
ic:=y(0) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {1}{1+2 \ln \left (x^{2}+1\right )} \]
Mathematica. Time used: 0.171 (sec). Leaf size: 17
ode=4*x*y[x]^2+(x^2+1)*D[y[x],x]==0; 
ic={y[0]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{2 \log \left (x^2+1\right )+1} \]
Sympy. Time used: 0.203 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*x*y(x)**2 + (x**2 + 1)*Derivative(y(x), x),0) 
ics = {y(0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {1}{- 2 \log {\left (x^{2} + 1 \right )} - 1} \]