38.2.44 problem 44

Internal problem ID [6473]
Book : Engineering Mathematics. By K. A. Stroud. 5th edition. Industrial press Inc. NY. 2001
Section : Program 24. First order differential equations. Further problems 24. page 1068
Problem number : 44
Date solved : Wednesday, March 05, 2025 at 12:51:22 AM
CAS classification : [_linear]

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

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