7.7.35 problem 35

Internal problem ID [213]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Review problems at page 98
Problem number : 35
Date solved : Saturday, March 29, 2025 at 04:47:41 PM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 12
ode:=diff(y(x),x) = (2*x*y(x)+2*x)/(x^2+1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = c_1 \,x^{2}+c_1 -1 \]
Mathematica. Time used: 0.031 (sec). Leaf size: 20
ode=D[y[x],x] ==  (2*x*y[x]+2*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.253 (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 \]