15.6.13 problem 13

Internal problem ID [2970]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 10, page 41
Problem number : 13
Date solved : Sunday, March 30, 2025 at 01:02:36 AM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=(1+x)*diff(y(x),x)+2*y(x) = exp(x)/(1+x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {{\mathrm e}^{x}+c_1}{\left (x +1\right )^{2}} \]
Mathematica. Time used: 0.058 (sec). Leaf size: 17
ode=(x+1)*D[y[x],x]+2*y[x]==Exp[x]/(1+x); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {e^x+c_1}{(x+1)^2} \]
Sympy. Time used: 0.292 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 1)*Derivative(y(x), x) + 2*y(x) - exp(x)/(x + 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + e^{x}}{x^{2} + 2 x + 1} \]