60.1.23 problem 23

Internal problem ID [10037]
Book : Differential Gleichungen, E. Kamke, 3rd ed. Chelsea Pub. NY, 1948
Section : Chapter 1, linear first order
Problem number : 23
Date solved : Sunday, March 30, 2025 at 02:54:39 PM
CAS classification : [_quadrature]

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

Maple. Time used: 0.005 (sec). Leaf size: 23
ode:=diff(y(x),x)+a*y(x)^2-b = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\tanh \left (\sqrt {b a}\, \left (c_1 +x \right )\right ) \sqrt {b a}}{a} \]
Mathematica. Time used: 0.19 (sec). Leaf size: 61
ode=D[y[x],x] + a*y[x]^2 - b==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to \text {InverseFunction}\left [\int _1^{\text {$\#$1}}\frac {1}{b-a K[1]^2}dK[1]\&\right ][x+c_1] \\ y(x)\to -\frac {\sqrt {b}}{\sqrt {a}} \\ y(x)\to \frac {\sqrt {b}}{\sqrt {a}} \\ \end{align*}
Sympy. Time used: 2.691 (sec). Leaf size: 29
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(a*y(x)**2 - b + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = - \frac {\sqrt {b}}{\sqrt {a} \tanh {\left (\sqrt {a} \sqrt {b} \left (C_{1} - x\right ) \right )}} \]