64.4.19 problem 19

Internal problem ID [13237]
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 : 19
Date solved : Monday, March 31, 2025 at 07:42:40 AM
CAS classification : [[_homogeneous, `class A`], _rational, [_Abel, `2nd type`, `class A`]]

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

With initial conditions

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

Maple. Time used: 0.266 (sec). Leaf size: 35
ode:=2*x-5*y(x)+(4*x-y(x))*diff(y(x),x) = 0; 
ic:=y(1) = 4; 
dsolve([ode,ic],y(x), singsol=all);
 
\begin{align*} y &= 6-2 x -6 \sqrt {1-x} \\ y &= 6-2 x +6 \sqrt {1-x} \\ \end{align*}
Mathematica. Time used: 0.043 (sec). Leaf size: 62
ode=(2*x-5*y[x])+(4*x-y[x])*D[y[x],x]==0; 
ic={y[1]==4}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [\int _1^{\frac {y(x)}{x}}\frac {K[1]-4}{(K[1]-1) (K[1]+2)}dK[1]=\int _1^4\frac {K[1]-4}{(K[1]-1) (K[1]+2)}dK[1]-\log (x),y(x)\right ] \]
Sympy. Time used: 2.053 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x + (4*x - y(x))*Derivative(y(x), x) - 5*y(x),0) 
ics = {y(1): 4} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - 2 x - 2 \sqrt {9 - 9 x} + 6, \ y{\left (x \right )} = - 2 x + 2 \sqrt {9 - 9 x} + 6\right ] \]