19.1.23 problem 23

Internal problem ID [4235]
Book : Advanced Mathematica, Book2, Perkin and Perkin, 1992
Section : Chapter 11.3, page 316
Problem number : 23
Date solved : Tuesday, September 30, 2025 at 07:08:04 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&={\mathrm e}^{x} \left (y^{2}+1\right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 9
ode:=diff(y(x),x) = exp(x)*(1+y(x)^2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \tan \left ({\mathrm e}^{x}+c_1 \right ) \]
Mathematica. Time used: 0.197 (sec). Leaf size: 26
ode=D[y[x],x]==Exp[x]*(y[x]^2+1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \tan \left (e^x+c_1\right )\\ y(x)&\to -i\\ y(x)&\to i \end{align*}
Sympy. Time used: 0.173 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-y(x)**2 - 1)*exp(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \tan {\left (C_{1} + e^{x} \right )} \]