82.39.12 problem Ex. 12

Internal problem ID [18873]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter VII. Linear equations with variable coefficients. End of chapter problems at page 91
Problem number : Ex. 12
Date solved : Monday, March 31, 2025 at 06:17:42 PM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.003 (sec). Leaf size: 22
ode:=x^2*diff(diff(y(x),x),x)+3*x*diff(y(x),x)+y(x) = 1/(1-x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {c_1 \ln \left (x \right )-\ln \left (-1+x \right )+\ln \left (x \right )+c_2}{x} \]
Mathematica. Time used: 0.036 (sec). Leaf size: 27
ode=x^2*D[y[x],{x,2}]+3*x*D[y[x],x]+y[x]==1/(1-x)^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {-\log (1-x)+\log (x)+c_2 \log (x)+c_1}{x} \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2*Derivative(y(x), (x, 2)) + 3*x*Derivative(y(x), x) + y(x) - 1/(1 - x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
NotImplementedError : The given ODE Derivative(y(x), x) - (-x**4*Derivative(y(x), (x, 2)) + 2*x**3*Derivative(y(x), (x, 2)) - x**2*y(x) - x**2*Derivative(y(x), (x, 2)) + 2*x*y(x) - y(x) + 1)/(3*x*(x**2 - 2*x + 1)) cannot be solved by the factorable group method