82.10.4 problem Ex. 4

Internal problem ID [18680]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter II. Equations of the first order and of the first degree. Exercises at page 27
Problem number : Ex. 4
Date solved : Thursday, March 13, 2025 at 12:37:21 PM
CAS classification : [_linear]

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

Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=(1+x)*diff(y(x),x)-n*y(x) = exp(x)*(1+x)^(n+1); 
dsolve(ode,y(x), singsol=all);
 
\[ y \left (x \right ) = \left ({\mathrm e}^{x}+c_{1} \right ) \left (x +1\right )^{n} \]
Mathematica. Time used: 0.077 (sec). Leaf size: 17
ode=(x+1)*D[y[x],x]-n*y[x]==Exp[x]*(x+1)^(n+1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \left (e^x+c_1\right ) (x+1)^n \]
Sympy. Time used: 12.411 (sec). Leaf size: 196
from sympy import * 
x = symbols("x") 
n = symbols("n") 
y = Function("y") 
ode = Eq(-n*y(x) + (x + 1)*Derivative(y(x), x) - (x + 1)**(n + 1)*exp(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \begin {cases} \frac {C_{1} x e^{n \log {\left (x + 1 \right )}}}{x + 1} + \frac {C_{1} e^{n \log {\left (x + 1 \right )}}}{x + 1} + \left (x + 1\right )^{n} e^{x} & \text {for}\: n > -\infty \wedge n < \infty \wedge n \neq 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} \frac {C_{1} x e^{n \log {\left (x + 1 \right )}}}{n x e^{n \log {\left (x + 1 \right )}} \log {\left (x + 1 \right )} + n e^{n \log {\left (x + 1 \right )}} \log {\left (x + 1 \right )} + 2 x + 2} + \frac {C_{1} e^{n \log {\left (x + 1 \right )}}}{n x e^{n \log {\left (x + 1 \right )}} \log {\left (x + 1 \right )} + n e^{n \log {\left (x + 1 \right )}} \log {\left (x + 1 \right )} + 2 x + 2} + \frac {\left (x + 1\right )^{n + 1} e^{x}}{n x e^{n \log {\left (x + 1 \right )}} \log {\left (x + 1 \right )} + n e^{n \log {\left (x + 1 \right )}} \log {\left (x + 1 \right )} + 2 x + 2} & \text {for}\: n = 0 \vee n \geq \infty \vee n \leq -\infty \\\text {NaN} & \text {otherwise} \end {cases}\right ] \]