64.6.21 problem 21

Internal problem ID [13292]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 2, Miscellaneous Review. Exercises page 60
Problem number : 21
Date solved : Wednesday, March 05, 2025 at 09:34:55 PM
CAS classification : [_separable]

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

With initial conditions

\begin{align*} y \left (\sqrt {15}\right )&=2 \end{align*}

Maple. Time used: 0.013 (sec). Leaf size: 13
ode:=diff(y(x),x) = x*y(x)/(x^2+1); 
ic:=y(15^(1/2)) = 2; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = \frac {\sqrt {x^{2}+1}}{2} \]
Mathematica. Time used: 0.032 (sec). Leaf size: 18
ode=D[y[x],x]==(x*y[x])/(x^2+1); 
ic={y[Sqrt[15]]==2}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {\sqrt {x^2+1}}{2} \]
Sympy. Time used: 0.212 (sec). Leaf size: 12
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*y(x)/(x**2 + 1) + Derivative(y(x), x),0) 
ics = {y(sqrt(15)): 2} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {\sqrt {x^{2} + 1}}{2} \]