85.33.48 problem 48

Internal problem ID [22671]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter two. First order and simple higher order ordinary differential equations. A Exercises at page 65
Problem number : 48
Date solved : Thursday, October 02, 2025 at 09:03:35 PM
CAS classification : [_separable]

\begin{align*} q^{\prime }&=\frac {p \,{\mathrm e}^{p^{2}-q^{2}}}{q} \end{align*}
Maple. Time used: 0.005 (sec). Leaf size: 31
ode:=diff(q(p),p) = p/q(p)*exp(p^2-q(p)^2); 
dsolve(ode,q(p), singsol=all);
 
\begin{align*} q &= \sqrt {\ln \left ({\mathrm e}^{p^{2}}+2 c_1 \right )} \\ q &= -\sqrt {\ln \left ({\mathrm e}^{p^{2}}+2 c_1 \right )} \\ \end{align*}
Mathematica. Time used: 3.057 (sec). Leaf size: 41
ode=D[q[p],p]==p/q[p] * Exp[p^2-q[p]^2]; 
ic={}; 
DSolve[{ode,ic},q[p],p,IncludeSingularSolutions->True]
 
\begin{align*} q(p)&\to -\sqrt {\log \left (e^{p^2}+2 c_1\right )}\\ q(p)&\to \sqrt {\log \left (e^{p^2}+2 c_1\right )} \end{align*}
Sympy. Time used: 0.327 (sec). Leaf size: 29
from sympy import * 
p = symbols("p") 
q = Function("q") 
ode = Eq(-p*exp(p**2 - q(p)**2)/q(p) + Derivative(q(p), p),0) 
ics = {} 
dsolve(ode,func=q(p),ics=ics)
 
\[ \left [ q{\left (p \right )} = - \sqrt {\log {\left (C_{1} + e^{p^{2}} \right )}}, \ q{\left (p \right )} = \sqrt {\log {\left (C_{1} + e^{p^{2}} \right )}}\right ] \]