18.1.24 problem Problem 14.29

Internal problem ID [3480]
Book : Mathematical methods for physics and engineering, Riley, Hobson, Bence, second edition, 2002
Section : Chapter 14, First order ordinary differential equations. 14.4 Exercises, page 490
Problem number : Problem 14.29
Date solved : Sunday, March 30, 2025 at 01:44:11 AM
CAS classification : [[_homogeneous, `class G`], _rational, _Bernoulli]

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

With initial conditions

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

Maple. Time used: 0.057 (sec). Leaf size: 18
ode:=x*diff(y(x),x)+y(x)-y(x)^2/x^(3/2) = 0; 
ic:=y(1) = 1; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {5 x^{{3}/{2}}}{3 x^{{5}/{2}}+2} \]
Mathematica. Time used: 0.188 (sec). Leaf size: 23
ode=x*D[y[x],x]+y[x]-y[x]^2/x^(3/2)==0; 
ic=y[1]==1; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {5 x^{3/2}}{3 x^{5/2}+2} \]
Sympy. Time used: 0.213 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(x*Derivative(y(x), x) + y(x) - y(x)**2/x**(3/2),0) 
ics = {y(1): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {5 x^{\frac {3}{2}}}{3 x^{\frac {5}{2}} + 2} \]