40.12.5 problem 10

Internal problem ID [6753]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 17. Linear equations with variable coefficients (Cauchy and Legndre). Supplemetary problems. Page 110
Problem number : 10
Date solved : Sunday, March 30, 2025 at 11:21:29 AM
CAS classification : [[_2nd_order, _exact, _linear, _nonhomogeneous]]

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

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