8.6.35 problem 35 (a)

Internal problem ID [805]
Book : Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section : Chapter 1 review problems. Page 78
Problem number : 35 (a)
Date solved : Tuesday, March 04, 2025 at 11:51:41 AM
CAS classification : [_separable]

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

Maple. Time used: 0.000 (sec). Leaf size: 12
ode:=diff(y(x),x) = (2*x+2*x*y(x))/(x^2+1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \,x^{2}+c_1 -1 \]
Mathematica. Time used: 0.029 (sec). Leaf size: 20
ode=D[y[x],x] == (2*x+2*x*y[x])/(x^2+1); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -1+c_1 \left (x^2+1\right ) \\ y(x)\to -1 \\ \end{align*}
Sympy. Time used: 0.252 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (2*x*y(x) + 2*x)/(x**2 + 1),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} x^{2} + C_{1} - 1 \]