74.2.13 problem 18

Internal problem ID [15775]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 1. Introduction to Differential Equations. Review exercises, page 23
Problem number : 18
Date solved : Thursday, March 13, 2025 at 06:19:36 AM
CAS classification : [_quadrature]

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

Maple. Time used: 0.002 (sec). Leaf size: 18
ode:=diff(y(x),x) = (2*x^2-x+1)/(x-1)/(x^2+1); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\ln \left (x^{2}+1\right )}{2}+\ln \left (x -1\right )+c_{1} \]
Mathematica. Time used: 0.02 (sec). Leaf size: 44
ode=D[y[x],x]==(2*x^2-x+1)/( (x-1)*(x^2+1)); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \int _1^x\frac {2 K[1]^2-K[1]+1}{K[1]^3-K[1]^2+K[1]-1}dK[1]+c_1 \]
Sympy. Time used: 0.225 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) - (2*x**2 - x + 1)/((x - 1)*(x**2 + 1)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + \log {\left (x - 1 \right )} + \frac {\log {\left (x^{2} + 1 \right )}}{2} \]