64.4.7 problem 7

Internal problem ID [13217]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, section 2.2 (Separable equations). Exercises page 47
Problem number : 7
Date solved : Wednesday, March 05, 2025 at 09:22:47 PM
CAS classification : [_separable]

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

Maple. Time used: 0.008 (sec). Leaf size: 114
ode:=(x+4)*(1+y(x)^2)+y(x)*(x^2+3*x+2)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= \frac {\sqrt {-x^{6}-6 x^{5}+c_{1} x^{4}+\left (8 c_{1} +100\right ) x^{3}+\left (24 c_{1} +345\right ) x^{2}+\left (32 c_{1} +474\right ) x +16 c_{1} +239}}{\left (x +1\right )^{3}} \\ y &= -\frac {\sqrt {-x^{6}-6 x^{5}+c_{1} x^{4}+\left (8 c_{1} +100\right ) x^{3}+\left (24 c_{1} +345\right ) x^{2}+\left (32 c_{1} +474\right ) x +16 c_{1} +239}}{\left (x +1\right )^{3}} \\ \end{align*}
Mathematica. Time used: 5.349 (sec). Leaf size: 181
ode=(x+4)*(y[x]^2+1) + y[x]*(x^2+3*x+2)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {-1+\exp \left (2 \left (\int _1^x-\frac {K[1]+4}{K[1]^2+3 K[1]+2}dK[1]+c_1\right )\right )} \\ y(x)\to \sqrt {-1+\exp \left (2 \left (\int _1^x-\frac {K[1]+4}{K[1]^2+3 K[1]+2}dK[1]+c_1\right )\right )} \\ y(x)\to -i \\ y(x)\to i \\ y(x)\to -\sqrt {\exp \left (2 \int _1^x-\frac {K[1]+4}{K[1]^2+3 K[1]+2}dK[1]\right )-1} \\ y(x)\to \sqrt {\exp \left (2 \int _1^x-\frac {K[1]+4}{K[1]^2+3 K[1]+2}dK[1]\right )-1} \\ \end{align*}
Sympy. Time used: 13.071 (sec). Leaf size: 393
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((x + 4)*(y(x)**2 + 1) + (x**2 + 3*x + 2)*y(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {\frac {x^{4} e^{2 C_{1}}}{x^{6} + 6 x^{5} + 15 x^{4} + 20 x^{3} + 15 x^{2} + 6 x + 1} + \frac {8 x^{3} e^{2 C_{1}}}{x^{6} + 6 x^{5} + 15 x^{4} + 20 x^{3} + 15 x^{2} + 6 x + 1} + \frac {24 x^{2} e^{2 C_{1}}}{x^{6} + 6 x^{5} + 15 x^{4} + 20 x^{3} + 15 x^{2} + 6 x + 1} + \frac {32 x e^{2 C_{1}}}{x^{6} + 6 x^{5} + 15 x^{4} + 20 x^{3} + 15 x^{2} + 6 x + 1} - 1 + \frac {16 e^{2 C_{1}}}{x^{6} + 6 x^{5} + 15 x^{4} + 20 x^{3} + 15 x^{2} + 6 x + 1}}, \ y{\left (x \right )} = \sqrt {\frac {x^{4} e^{2 C_{1}}}{x^{6} + 6 x^{5} + 15 x^{4} + 20 x^{3} + 15 x^{2} + 6 x + 1} + \frac {8 x^{3} e^{2 C_{1}}}{x^{6} + 6 x^{5} + 15 x^{4} + 20 x^{3} + 15 x^{2} + 6 x + 1} + \frac {24 x^{2} e^{2 C_{1}}}{x^{6} + 6 x^{5} + 15 x^{4} + 20 x^{3} + 15 x^{2} + 6 x + 1} + \frac {32 x e^{2 C_{1}}}{x^{6} + 6 x^{5} + 15 x^{4} + 20 x^{3} + 15 x^{2} + 6 x + 1} - 1 + \frac {16 e^{2 C_{1}}}{x^{6} + 6 x^{5} + 15 x^{4} + 20 x^{3} + 15 x^{2} + 6 x + 1}}\right ] \]