81.6.9 problem 7-9

Internal problem ID [21555]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 7. Linear Differential Equations. Page 101.
Problem number : 7-9
Date solved : Thursday, October 02, 2025 at 07:48:03 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (2\right )&=1 \\ \end{align*}
Maple. Time used: 0.007 (sec). Leaf size: 15
ode:=(x^2+1)*diff(y(x),x)+4*x*y(x) = x; 
ic:=[y(2) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {1}{4}+\frac {75}{4 \left (x^{2}+1\right )^{2}} \]
Mathematica. Time used: 0.021 (sec). Leaf size: 26
ode=(x^2+1)*D[y[x],x]+ 4*x*y[x]==x; 
ic={y[2]==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {x^4+2 x^2+76}{4 \left (x^2+1\right )^2} \end{align*}
Sympy. Time used: 3.164 (sec). Leaf size: 66
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + (x**2 + 1)*Derivative(y(x), x) + 4*y(x),0) 
ics = {y(2): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ - \int \frac {x e^{4 \operatorname {atan}{\left (x \right )}}}{x^{2} + 1}\, dx + 4 \int \frac {y{\left (x \right )} e^{4 \operatorname {atan}{\left (x \right )}}}{x^{2} + 1}\, dx = - \int \limits ^{2} \frac {x e^{4 \operatorname {atan}{\left (x \right )}}}{x^{2} + 1}\, dx + 4 \int \limits ^{2} \frac {y{\left (x \right )} e^{4 \operatorname {atan}{\left (x \right )}}}{x^{2} + 1}\, dx \]