81.3.27 problem 27

Internal problem ID [18566]
Book : A short course on differential equations. By Donald Francis Campbell. Maxmillan company. London. 1907
Section : Chapter III. Ordinary differential equations of the first order and first degree. Exercises at page 33
Problem number : 27
Date solved : Thursday, March 13, 2025 at 12:22:16 PM
CAS classification : [_linear]

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

Maple. Time used: 0.003 (sec). Leaf size: 18
ode:=(x^2-2*x*y(x))*diff(y(x),x)+x^2-3*x*y(x)+2*y(x)^2 = 0; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y \left (x \right ) &= \frac {x}{2} \\ y \left (x \right ) &= \left (-\ln \left (x \right )+c_{1} \right ) x \\ \end{align*}
Mathematica. Time used: 0.027 (sec). Leaf size: 32
ode=(x^2-2*x*y[x])*D[y[x],x]+(x^2-3*x*y[x]+2*y[x]^2)==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \frac {x}{2} \\ y(x)\to x (-\log (x)+c_1) \\ y(x)\to \frac {x}{2} \\ \end{align*}
Sympy. Time used: 0.281 (sec). Leaf size: 14
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x**2 - 3*x*y(x) + (x**2 - 2*x*y(x))*Derivative(y(x), x) + 2*y(x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \frac {x}{2}, \ y{\left (x \right )} = x \left (C_{1} - \log {\left (x \right )}\right )\right ] \]