20.2.6 problem Problem 6

Internal problem ID [3598]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 1, First-Order Differential Equations. Section 1.4, Separable Differential Equations. page 43
Problem number : Problem 6
Date solved : Sunday, March 30, 2025 at 01:53:54 AM
CAS classification : [_separable]

\begin{align*} y^{\prime }&=\frac {2 x \left (y-1\right )}{x^{2}+3} \end{align*}

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