29.22.8 problem 614

Internal problem ID [5208]
Book : Ordinary differential equations and their solutions. By George Moseley Murphy. 1960
Section : Various 22
Problem number : 614
Date solved : Sunday, March 30, 2025 at 06:52:12 AM
CAS classification : [[_homogeneous, `class C`], _dAlembert]

\begin{align*} \left (x +y\right )^{2} y^{\prime }&=a^{2} \end{align*}

Maple. Time used: 0.015 (sec). Leaf size: 24
ode:=(x+y(x))^2*diff(y(x),x) = a^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = a \operatorname {RootOf}\left (\tan \left (\textit {\_Z} \right ) a -\textit {\_Z} a +c_1 -x \right )-c_1 \]
Mathematica. Time used: 0.115 (sec). Leaf size: 21
ode=(x+y[x])^2 D[y[x],x]==a^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ \text {Solve}\left [y(x)-a \arctan \left (\frac {y(x)+x}{a}\right )=c_1,y(x)\right ] \]
Sympy. Time used: 9.903 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
a = symbols("a") 
y = Function("y") 
ode = Eq(-a**2 + (x + y(x))**2*Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ C_{1} + \frac {a \left (i \log {\left (- i a - x - y{\left (x \right )} \right )} - i \log {\left (i a - x - y{\left (x \right )} \right )}\right )}{2} - y{\left (x \right )} = 0 \]