71.4.21 problem 21

Internal problem ID [14322]
Book : Ordinary Differential Equations by Charles E. Roberts, Jr. CRC Press. 2010
Section : Chapter 2. The Initial Value Problem. Exercises 2.2, page 53
Problem number : 21
Date solved : Monday, March 31, 2025 at 12:17:39 PM
CAS classification : [_linear]

\begin{align*} y^{\prime }&=\frac {y}{-x^{2}+4}+\sqrt {x} \end{align*}

With initial conditions

\begin{align*} y \left (1\right )&=-3 \end{align*}

Maple. Time used: 0.081 (sec). Leaf size: 47
ode:=diff(y(x),x) = y(x)/(-x^2+4)+x^(1/2); 
ic:=y(1) = -3; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = -\frac {\left (x +2\right )^{{1}/{4}} \left (-2 \int _{1}^{x}\frac {\sqrt {\textit {\_z1}}\, \left (\textit {\_z1} -2\right )^{{1}/{4}}}{\left (\textit {\_z1} +2\right )^{{1}/{4}}}d \textit {\_z1} +\left (1+i\right ) \sqrt {2}\, 3^{{3}/{4}}\right )}{2 \left (x -2\right )^{{1}/{4}}} \]
Mathematica. Time used: 0.097 (sec). Leaf size: 63
ode=D[y[x],x]==y[x]/(4-x^2)+Sqrt[x]; 
ic={y[1]==-3}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \exp \left (\int _1^x\frac {1}{4-K[1]^2}dK[1]\right ) \left (\int _1^x\exp \left (-\int _1^{K[2]}\frac {1}{4-K[1]^2}dK[1]\right ) \sqrt {K[2]}dK[2]-3\right ) \]
Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-sqrt(x) + Derivative(y(x), x) - y(x)/(4 - x**2),0) 
ics = {y(1): -3} 
dsolve(ode,func=y(x),ics=ics)
 
Timed Out