60.1.12 problem 12

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

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

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