30.1.4 problem Example, page 30

Internal problem ID [5692]
Book : Differential and integral calculus, vol II By N. Piskunov. 1974
Section : Chapter 1
Problem number : Example, page 30
Date solved : Sunday, March 30, 2025 at 10:02:35 AM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 13
ode:=diff(y(x),x)-2*y(x)/(1+x) = (1+x)^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (x +c_1 \right ) \left (1+x \right )^{2} \]
Mathematica. Time used: 0.034 (sec). Leaf size: 15
ode=D[y[x],x]-2*y[x]/(1+x)==(x+1)^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to (x+1)^2 (x+c_1) \]
Sympy. Time used: 0.330 (sec). Leaf size: 24
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(x + 1)**2 + 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} + x^{3} + 2 x^{2} + x \]