64.4.18 problem 18

Internal problem ID [13236]
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 : 18
Date solved : Monday, March 31, 2025 at 07:42:35 AM
CAS classification : [[_homogeneous, `class A`], _rational, _Bernoulli]

\begin{align*} x^{2}+3 y^{2}-2 x y y^{\prime }&=0 \end{align*}

With initial conditions

\begin{align*} y \left (2\right )&=6 \end{align*}

Maple. Time used: 0.116 (sec). Leaf size: 13
ode:=x^2+3*y(x)^2-2*x*y(x)*diff(y(x),x) = 0; 
ic:=y(2) = 6; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \sqrt {5 x -1}\, x \]
Mathematica. Time used: 0.345 (sec). Leaf size: 16
ode=(x^2+3*y[x]^2)-2*x*y[x]*D[y[x],x]==0; 
ic={y[2]==6}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x \sqrt {5 x-1} \]
Sympy. Time used: 0.442 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2 - 2*x*y(x)*Derivative(y(x), x) + 3*y(x)**2,0) 
ics = {y(2): 6} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x \sqrt {5 x - 1} \]