82.12.24 problem Ex. 26

Internal problem ID [18710]
Book : Introductory Course On Differential Equations by Daniel A Murray. Longmans Green and Co. NY. 1924
Section : Chapter II. Equations of the first order and of the first degree. Examples on chapter II at page 29
Problem number : Ex. 26
Date solved : Thursday, March 13, 2025 at 12:39:56 PM
CAS classification : [_separable]

\begin{align*} y y^{\prime }&=a x \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 27
ode:=y(x)*diff(y(x),x) = a*x; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y \left (x \right ) &= \sqrt {x^{2} a +c_{1}} \\ y \left (x \right ) &= -\sqrt {x^{2} a +c_{1}} \\ \end{align*}
Mathematica. Time used: 0.101 (sec). Leaf size: 39
ode=y[x]*D[y[x],x]==a*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\sqrt {a x^2+2 c_1} \\ y(x)\to \sqrt {a x^2+2 c_1} \\ \end{align*}
Sympy. Time used: 0.328 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a*x + y(x)*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = - \sqrt {C_{1} + a x^{2}}, \ y{\left (x \right )} = \sqrt {C_{1} + a x^{2}}\right ] \]