77.1.141 problem 168 (page 240)

Internal problem ID [17960]
Book : V.V. Stepanov, A course of differential equations (in Russian), GIFML. Moscow (1958)
Section : All content
Problem number : 168 (page 240)
Date solved : Monday, March 31, 2025 at 04:52:33 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

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

Maple. Time used: 0.003 (sec). Leaf size: 26
ode:=(1+x)^2*diff(diff(y(x),x),x)+(1+x)*diff(y(x),x)+y(x) = 4*cos(ln(1+x)); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (c_2 +2 \ln \left (1+x \right )\right ) \sin \left (\ln \left (1+x \right )\right )+\cos \left (\ln \left (1+x \right )\right ) c_1 \]
Mathematica. Time used: 0.116 (sec). Leaf size: 31
ode=(1+x)^2*D[y[x],{x,2}]+(1+x)*D[y[x],x]+y[x]==4*Cos[Log[1+x]]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to (1+c_1) \cos (\log (x+1))+(2 \log (x+1)+c_2) \sin (\log (x+1)) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 1)**2*Derivative(y(x), (x, 2)) + (x + 1)*Derivative(y(x), x) + y(x) - 4*cos(log(x + 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)) - y(x) + 4*cos(log(x + 1)) - Derivative(y(x), (x, 2)))/(x + 1) cannot be solved by the factorable group method