29.26.21 problem 757

Internal problem ID [5342]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 26
Problem number : 757
Date solved : Sunday, March 30, 2025 at 08:00:44 AM
CAS classification : [_quadrature]

\begin{align*} {y^{\prime }}^{2}&=a^{2}-y^{2} \end{align*}

Maple. Time used: 0.033 (sec). Leaf size: 60
ode:=diff(y(x),x)^2 = a^2-y(x)^2; 
dsolve(ode,y(x), singsol=all);
 
\begin{align*} y &= -a \\ y &= a \\ y &= -\tan \left (-x +c_1 \right ) \sqrt {a^{2} \cos \left (-x +c_1 \right )^{2}} \\ y &= \tan \left (-x +c_1 \right ) \sqrt {a^{2} \cos \left (-x +c_1 \right )^{2}} \\ \end{align*}
Mathematica. Time used: 3.514 (sec). Leaf size: 111
ode=(D[y[x],x])^2==a^2-y[x]^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -\frac {a \tan (x-c_1)}{\sqrt {\sec ^2(x-c_1)}} \\ y(x)\to \frac {a \tan (x-c_1)}{\sqrt {\sec ^2(x-c_1)}} \\ y(x)\to -\frac {a \tan (x+c_1)}{\sqrt {\sec ^2(x+c_1)}} \\ y(x)\to \frac {a \tan (x+c_1)}{\sqrt {\sec ^2(x+c_1)}} \\ y(x)\to -a \\ y(x)\to a \\ \end{align*}
Sympy. Time used: 3.589 (sec). Leaf size: 107
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a**2 + y(x)**2 + Derivative(y(x), x)**2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ \left [ y{\left (x \right )} = \begin {cases} - a^{2} e^{- i C_{1} + i x} - \frac {e^{i C_{1} - i x}}{4} & \text {for}\: a^{2} \neq 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} C_{1} e^{i x} & \text {for}\: a^{2} = 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} C_{1} e^{- i x} & \text {for}\: a^{2} = 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} - a^{2} e^{- i C_{1} - i x} - \frac {e^{i C_{1} + i x}}{4} & \text {for}\: a^{2} \neq 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} C_{1} e^{- i x} & \text {for}\: a^{2} = 0 \\\text {NaN} & \text {otherwise} \end {cases}, \ y{\left (x \right )} = \begin {cases} C_{1} e^{i x} & \text {for}\: a^{2} = 0 \\\text {NaN} & \text {otherwise} \end {cases}\right ] \]