82.12.12 problem Ex. 12

Internal problem ID [18706]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter II. Equations of the first order and of the first degree. Examples on chapter II at page 29
Problem number : Ex. 12
Date solved : Monday, March 31, 2025 at 05:59:37 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 16
ode:=diff(y(x),x)+4*x/(x^2+1)*y(x) = 1/(x^2+1)^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\arctan \left (x \right )+c_1}{\left (x^{2}+1\right )^{2}} \]
Mathematica. Time used: 0.038 (sec). Leaf size: 18
ode=D[y[x],x]+4*x/(x^2+1)*y[x]==1/(x^2+1)^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {\arctan (x)+c_1}{\left (x^2+1\right )^2} \]
Sympy. Time used: 0.427 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*x*y(x)/(x**2 + 1) + Derivative(y(x), x) - 1/(x**2 + 1)**3,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} - i \log {\left (x - i \right )} + i \log {\left (x + i \right )}}{2 \left (x^{4} + 2 x^{2} + 1\right )} \]