12.3.13 problem 14

Internal problem ID [1590]
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 : 14
Date solved : Thursday, March 13, 2025 at 04:00:34 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (1\right )&=0 \end{align*}

Maple. Time used: 8.218 (sec). Leaf size: 552
ode:=diff(y(x),x)+(y(x)+1)*(y(x)-1)*(y(x)-2)/(1+x) = 0; 
ic:=y(1) = 0; 
dsolve([ode,ic],y(x), singsol=all);
 
\begin{align*} y &= \frac {8 \operatorname {RootOf}\left (512 \textit {\_Z}^{6}+\left (96 x^{2} 2^{{1}/{3}}+192 x 2^{{1}/{3}}+96 \,2^{{1}/{3}}\right ) \textit {\_Z}^{4}-x^{6}-6 x^{5}-15 x^{4}-20 x^{3}-15 x^{2}-6 x -257\right )^{2}-2^{{1}/{3}} \left (x +1\right )^{2}}{8 \operatorname {RootOf}\left (512 \textit {\_Z}^{6}+\left (96 x^{2} 2^{{1}/{3}}+192 x 2^{{1}/{3}}+96 \,2^{{1}/{3}}\right ) \textit {\_Z}^{4}-x^{6}-6 x^{5}-15 x^{4}-20 x^{3}-15 x^{2}-6 x -257\right )^{2}} \\ y &= \frac {16 \operatorname {RootOf}\left (512 \textit {\_Z}^{6}+\left (48 i x^{2} \sqrt {3}\, 2^{{1}/{3}}+96 i x \sqrt {3}\, 2^{{1}/{3}}+48 i \sqrt {3}\, 2^{{1}/{3}}-48 x^{2} 2^{{1}/{3}}-96 x 2^{{1}/{3}}-48 \,2^{{1}/{3}}\right ) \textit {\_Z}^{4}-x^{6}-6 x^{5}-15 x^{4}-20 x^{3}-15 x^{2}-6 x -257\right )^{2}-\left (x +1\right )^{2} 2^{{1}/{3}} \left (i \sqrt {3}-1\right )}{16 \operatorname {RootOf}\left (512 \textit {\_Z}^{6}+\left (48 i x^{2} \sqrt {3}\, 2^{{1}/{3}}+96 i x \sqrt {3}\, 2^{{1}/{3}}+48 i \sqrt {3}\, 2^{{1}/{3}}-48 x^{2} 2^{{1}/{3}}-96 x 2^{{1}/{3}}-48 \,2^{{1}/{3}}\right ) \textit {\_Z}^{4}-x^{6}-6 x^{5}-15 x^{4}-20 x^{3}-15 x^{2}-6 x -257\right )^{2}} \\ y &= \frac {16 \operatorname {RootOf}\left (512 \textit {\_Z}^{6}+\left (-48 i x^{2} \sqrt {3}\, 2^{{1}/{3}}-96 i x \sqrt {3}\, 2^{{1}/{3}}-48 i \sqrt {3}\, 2^{{1}/{3}}-48 x^{2} 2^{{1}/{3}}-96 x 2^{{1}/{3}}-48 \,2^{{1}/{3}}\right ) \textit {\_Z}^{4}-x^{6}-6 x^{5}-15 x^{4}-20 x^{3}-15 x^{2}-6 x -257\right )^{2}+\left (x +1\right )^{2} 2^{{1}/{3}} \left (1+i \sqrt {3}\right )}{16 \operatorname {RootOf}\left (512 \textit {\_Z}^{6}+\left (-48 i x^{2} \sqrt {3}\, 2^{{1}/{3}}-96 i x \sqrt {3}\, 2^{{1}/{3}}-48 i \sqrt {3}\, 2^{{1}/{3}}-48 x^{2} 2^{{1}/{3}}-96 x 2^{{1}/{3}}-48 \,2^{{1}/{3}}\right ) \textit {\_Z}^{4}-x^{6}-6 x^{5}-15 x^{4}-20 x^{3}-15 x^{2}-6 x -257\right )^{2}} \\ \end{align*}
Mathematica. Time used: 60.938 (sec). Leaf size: 1618
ode=D[y[x],x]+((y[x]+1)*(y[x]-1)*(y[x]-2))/(x+1)==0; 
ic=y[1]==0; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} \text {Solution too large to show}\end{align*}

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) + (y(x) - 2)*(y(x) - 1)*(y(x) + 1)/(x + 1),0) 
ics = {y(1): 0} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out