9.8.45 problem 48

Internal problem ID [3048]
Book : Differential Equations by Alfred L. Nelson, Karl W. Folley, Max Coral. 3rd ed. DC heath. Boston. 1964
Section : Exercise 12, page 46
Problem number : 48
Date solved : Tuesday, September 30, 2025 at 06:25:36 AM
CAS classification : [[_1st_order, _with_linear_symmetries], _Bernoulli]

\begin{align*} x^{\prime }&=x+x^{2} {\mathrm e}^{\theta } \end{align*}

With initial conditions

\begin{align*} x \left (0\right )&=2 \\ \end{align*}
Maple. Time used: 0.052 (sec). Leaf size: 17
ode:=diff(x(theta),theta) = x(theta)+x(theta)^2*exp(theta); 
ic:=[x(0) = 2]; 
dsolve([ode,op(ic)],x(theta), singsol=all);
 
\[ x = -\frac {2}{{\mathrm e}^{\theta }-2 \,{\mathrm e}^{-\theta }} \]
Mathematica. Time used: 0.137 (sec). Leaf size: 19
ode=D[ x[\[Theta]], \[Theta] ]==x[\[Theta]]+x[\[Theta]]^2*Exp[\[Theta]]; 
ic={x[0]==2}; 
DSolve[{ode,ic},x[\[Theta]],\[Theta],IncludeSingularSolutions->True]
 
\begin{align*} x(\theta )&\to -\frac {2 e^{\theta }}{e^{2 \theta }-2} \end{align*}
Sympy. Time used: 0.144 (sec). Leaf size: 14
from sympy import * 
theta = symbols("theta") 
x = Function("x") 
ode = Eq(-x(theta)**2*exp(theta) - x(theta) + Derivative(x(theta), theta),0) 
ics = {x(0): 2} 
dsolve(ode,func=x(theta),ics=ics)
 
\[ x{\left (\theta \right )} = \frac {2 e^{\theta }}{2 - e^{2 \theta }} \]