80.6.6 problem 8 (eq 69)

Internal problem ID [18499]
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 : Monday, March 31, 2025 at 05:38:20 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.191 (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.289 (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 )} \]