36.2.15 problem 15

Internal problem ID [6308]
Book : Fundamentals of Differential Equations. By Nagle, Saff and Snider. 9th edition. Boston. Pearson 2018.
Section : Chapter 2, First order differential equations. Section 2.3, Linear equations. Exercises. page 54
Problem number : 15
Date solved : Sunday, March 30, 2025 at 10:50:19 AM
CAS classification : [_separable]

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

Maple. Time used: 0.001 (sec). Leaf size: 15
ode:=(x^2+1)*diff(y(x),x)+x*y(x)-x = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = 1+\frac {c_1}{\sqrt {x^{2}+1}} \]
Mathematica. Time used: 0.035 (sec). Leaf size: 24
ode=(x^2+1)*D[y[x],x]+x*y[x]-x==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to 1+\frac {c_1}{\sqrt {x^2+1}} \\ y(x)\to 1 \\ \end{align*}
Sympy. Time used: 0.274 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*y(x) - 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}} + 1 \]