29.3.5 problem 59
Internal
problem
ID
[4667]
Book
:
Ordinary
differential
equations
and
their
solutions.
By
George
Moseley
Murphy.
1960
Section
:
Various
3
Problem
number
:
59
Date
solved
:
Sunday, March 30, 2025 at 03:35:32 AM
CAS
classification
:
[_quadrature]
\begin{align*} y^{\prime }&=\operatorname {a0} +\operatorname {a1} y+\operatorname {a2} y^{2} \end{align*}
✓ Maple. Time used: 0.005 (sec). Leaf size: 44
ode:=diff(y(x),x) = a0+a1*y(x)+a2*y(x)^2;
dsolve(ode,y(x), singsol=all);
\[
y = \frac {-\operatorname {a1} +\tan \left (\frac {\sqrt {4 \operatorname {a0} \operatorname {a2} -\operatorname {a1}^{2}}\, \left (c_1 +x \right )}{2}\right ) \sqrt {4 \operatorname {a0} \operatorname {a2} -\operatorname {a1}^{2}}}{2 \operatorname {a2}}
\]
✓ Mathematica. Time used: 47.053 (sec). Leaf size: 106
ode=D[y[x],x]==a0+a1 y[x]+ a2 y[x]^2;
ic={};
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
\begin{align*}
y(x)\to \frac {-\text {a1}+\sqrt {4 \text {a0} \text {a2}-\text {a1}^2} \tan \left (\frac {1}{2} (x+c_1) \sqrt {4 \text {a0} \text {a2}-\text {a1}^2}\right )}{2 \text {a2}} \\
y(x)\to \frac {\sqrt {\text {a1}^2-4 \text {a0} \text {a2}}-\text {a1}}{2 \text {a2}} \\
y(x)\to -\frac {\sqrt {\text {a1}^2-4 \text {a0} \text {a2}}+\text {a1}}{2 \text {a2}} \\
\end{align*}
✓ Sympy. Time used: 1.506 (sec). Leaf size: 131
from sympy import *
x = symbols("x")
a0 = symbols("a0")
a1 = symbols("a1")
a2 = symbols("a2")
y = Function("y")
ode = Eq(-a0 - a1*y(x) - a2*y(x)**2 + Derivative(y(x), x),0)
ics = {}
dsolve(ode,func=y(x),ics=ics)
\[
x + \sqrt {- \frac {1}{4 a_{0} a_{2} - a_{1}^{2}}} \log {\left (y{\left (x \right )} + \frac {- 4 a_{0} a_{2} \sqrt {- \frac {1}{4 a_{0} a_{2} - a_{1}^{2}}} + a_{1}^{2} \sqrt {- \frac {1}{4 a_{0} a_{2} - a_{1}^{2}}} + a_{1}}{2 a_{2}} \right )} - \sqrt {- \frac {1}{4 a_{0} a_{2} - a_{1}^{2}}} \log {\left (y{\left (x \right )} + \frac {4 a_{0} a_{2} \sqrt {- \frac {1}{4 a_{0} a_{2} - a_{1}^{2}}} - a_{1}^{2} \sqrt {- \frac {1}{4 a_{0} a_{2} - a_{1}^{2}}} + a_{1}}{2 a_{2}} \right )} = C_{1}
\]