74.6.6 problem 8 (eq 69)

Internal problem ID [19856]
Book : Elementary Differential Equations. By Thornton C. Fry. D Van Nostrand. NY. First Edition (1929)
Section : Chapter IV. Methods of solution: First order equations. section 33. Problems at page 91
Problem number : 8 (eq 69)
Date solved : Thursday, October 02, 2025 at 04:51:19 PM
CAS classification : [_separable]

\begin{align*} n^{\prime }&=\left (n^{2}+1\right ) x \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 12
ode:=diff(n(x),x) = (n(x)^2+1)*x; 
dsolve(ode,n(x), singsol=all);
 
\[ n = \tan \left (\frac {x^{2}}{2}+c_1 \right ) \]
Mathematica. Time used: 0.143 (sec). Leaf size: 30
ode=D[n[x],x]==(n[x]^2+1)*x; 
ic={}; 
DSolve[{ode,ic},n[x],x,IncludeSingularSolutions->True]
 
\begin{align*} n(x)&\to \tan \left (\frac {x^2}{2}+c_1\right )\\ n(x)&\to -i\\ n(x)&\to i \end{align*}
Sympy. Time used: 0.178 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
n = Function("n") 
ode = Eq(-x*(n(x)**2 + 1) + Derivative(n(x), x),0) 
ics = {} 
dsolve(ode,func=n(x),ics=ics)
 
\[ n{\left (x \right )} = \tan {\left (C_{1} + \frac {x^{2}}{2} \right )} \]