6.3.22 problem 23

Internal problem ID [1599]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. separable equations. Section 2.2 Page 52
Problem number : 23
Date solved : Tuesday, September 30, 2025 at 04:39:10 AM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (1\right )&=-3 \\ \end{align*}
Maple. Time used: 0.080 (sec). Leaf size: 26
ode:=(1+x)*(x-2)*diff(y(x),x)+y(x) = 0; 
ic:=[y(1) = -3]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = -\frac {3 \,2^{{2}/{3}} \left (1+i \sqrt {3}\right ) \left (x +1\right )^{{1}/{3}}}{4 \left (x -2\right )^{{1}/{3}}} \]
Mathematica. Time used: 0.025 (sec). Leaf size: 23
ode=(x+1)*(x-2)*D[y[x],x]+y[x]==0; 
ic=y[1]==-3; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to -\frac {3 \sqrt [3]{x+1}}{\sqrt [3]{4-2 x}} \end{align*}
Sympy. Time used: 0.197 (sec). Leaf size: 32
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x - 2)*(x + 1)*Derivative(y(x), x) + y(x),0) 
ics = {y(1): -3} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {3 \sqrt [3]{-1} \cdot 2^{\frac {2}{3}} \sqrt [3]{x + 1}}{2 \sqrt [3]{x - 2}} \]