24.1.23 problem 5(d)

Internal problem ID [4212]
Book : Elementary Differential equations, Chaundy, 1969
Section : Exercises 3, page 60
Problem number : 5(d)
Date solved : Sunday, March 30, 2025 at 02:43:06 AM
CAS classification : [_linear]

\begin{align*} \sqrt {\left (x +a \right ) \left (x +b \right )}\, y^{\prime }+y&=\sqrt {x +a}-\sqrt {x +b} \end{align*}

Maple. Time used: 0.001 (sec). Leaf size: 114
ode:=((x+a)*(x+b))^(1/2)*diff(y(x),x)+y(x) = (x+a)^(1/2)-(x+b)^(1/2); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {2 \left (\left (2 a +2 x \right ) \sqrt {x +a}+\left (-2 b -2 x \right ) \sqrt {x +b}+3 c_1 \right ) \sqrt {\left (x +a \right ) \left (x +b \right )}+6 \left (x +b \right ) \left (-\frac {b}{3}+a +\frac {2 x}{3}\right ) \sqrt {x +a}+2 \sqrt {x +b}\, \left (x +a \right ) \left (-2 x +a -3 b \right )}{\sqrt {\left (x +a \right ) \left (x +b \right )}\, \left (6 \sqrt {\left (x +a \right ) \left (x +b \right )}+3 a +3 b +6 x \right )} \]
Mathematica. Time used: 1.687 (sec). Leaf size: 145
ode=Sqrt[(x+a)*(x+b)]*D[y[x],x]+y[x]==Sqrt[x+a]-Sqrt[x+b]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \exp \left (-\frac {2 \sqrt {a+x} \sqrt {b+x} \text {arctanh}\left (\frac {\sqrt {b+x}}{\sqrt {a+x}}\right )}{\sqrt {(a+x) (b+x)}}\right ) \left (\int _1^x\frac {\exp \left (\frac {2 \text {arctanh}\left (\frac {\sqrt {b+K[1]}}{\sqrt {a+K[1]}}\right ) \sqrt {a+K[1]} \sqrt {b+K[1]}}{\sqrt {(a+K[1]) (b+K[1])}}\right ) \left (\sqrt {a+K[1]}-\sqrt {b+K[1]}\right )}{\sqrt {(a+K[1]) (b+K[1])}}dK[1]+c_1\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
a = symbols("a") 
b = symbols("b") 
y = Function("y") 
ode = Eq(sqrt((a + x)*(b + x))*Derivative(y(x), x) - sqrt(a + x) + sqrt(b + x) + y(x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out