81.4.6 problem 5-7

Internal problem ID [21520]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 5. Integrating factors. Page 72.
Problem number : 5-7
Date solved : Thursday, October 02, 2025 at 07:46:41 PM
CAS classification : [_linear]

\begin{align*} \left (x^{2}+1\right ) y^{\prime }+\left (-x^{2}+1\right ) y&=x \,{\mathrm e}^{-x} \end{align*}
Maple. Time used: 0.004 (sec). Leaf size: 34
ode:=(x^2+1)*diff(y(x),x)+(-x^2+1)*y(x) = x*exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (\int \frac {x \,{\mathrm e}^{-2 x +2 \arctan \left (x \right )}}{x^{2}+1}d x +c_1 \right ) {\mathrm e}^{x -2 \arctan \left (x \right )} \]
Mathematica. Time used: 0.168 (sec). Leaf size: 47
ode=(1+x^2)*D[y[x],x]+(1-x^2)*y[x]==x*Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{x-2 \arctan (x)} \left (\int _1^x\frac {e^{2 \arctan (K[1])-2 K[1]} K[1]}{K[1]^2+1}dK[1]+c_1\right ) \end{align*}
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*exp(-x) + (1 - x**2)*y(x) + (x**2 + 1)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out