69.1.38 problem 57

Internal problem ID [14112]
Book : DIFFERENTIAL and INTEGRAL CALCULUS. VOL I. by N. PISKUNOV. MIR PUBLISHERS, Moscow 1969.
Section : Chapter 8. Differential equations. Exercises page 595
Problem number : 57
Date solved : Wednesday, March 05, 2025 at 10:35:21 PM
CAS classification : [_linear]

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

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