12.9.37 problem 38 part (b)

Internal problem ID [1793]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 5 linear second order equations. Section 5.6 Reduction or order. Page 253
Problem number : 38 part (b)
Date solved : Tuesday, March 04, 2025 at 01:42:18 PM
CAS classification : [_quadrature]

\begin{align*} y^{\prime }+y^{2}-3 y+2&=0 \end{align*}

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