12.3.7 problem 8

Internal problem ID [1584]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. separable equations. Section 2.2 Page 52
Problem number : 8
Date solved : Tuesday, March 04, 2025 at 12:40:54 PM
CAS classification : [_separable]

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

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