84.11.5 problem 6.5

Internal problem ID [22142]
Book : Schaums outline series. Differential Equations By Richard Bronson. 1973. McGraw-Hill Inc. ISBN 0-07-008009-7
Section : Chapter 6. Exact first-order differential equations. Solved problems. Page 24
Problem number : 6.5
Date solved : Thursday, October 02, 2025 at 08:32:20 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (2\right )&=-5 \\ \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 13
ode:=diff(y(x),x) = -2*x*y(x)/(x^2+1); 
ic:=[y(2) = -5]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {25}{x^{2}+1} \]
Mathematica. Time used: 0.02 (sec). Leaf size: 14
ode=D[y[x],x]==(-2*x*y[x])/(1+x^2 ); 
ic={y[2]==-5}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {25}{x^2+1} \end{align*}
Sympy. Time used: 0.124 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*y(x)/(x**2 + 1) + Derivative(y(x), x),0) 
ics = {y(2): -5} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {25}{x^{2} + 1} \]