76.10.4 problem Ex. 4

Internal problem ID [20044]
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, October 02, 2025 at 05:16:02 PM
CAS classification : [_linear]

\begin{align*} \left (1+x \right ) y^{\prime }-n y&={\mathrm e}^{x} \left (1+x \right )^{n +1} \end{align*}
Maple. Time used: 0.002 (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 ({\mathrm e}^{x}+c_1 \right ) \left (x +1\right )^{n} \]
Mathematica. Time used: 0.048 (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]
 
\begin{align*} y(x)&\to \left (e^x+c_1\right ) (x+1)^n \end{align*}
Sympy. Time used: 8.769 (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 ] \]