74.1.33 problem 40

Internal problem ID [15742]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 1. Introduction to Differential Equations. Exercises 1.1, page 10
Problem number : 40
Date solved : Monday, March 31, 2025 at 01:46:50 PM
CAS classification : [_quadrature]

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

Maple. Time used: 0.001 (sec). Leaf size: 16
ode:=diff(y(x),x) = (-2*x-10)/(x+2)/(-4+x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \ln \left (x +2\right )-3 \ln \left (x -4\right )+c_1 \]
Mathematica. Time used: 0.019 (sec). Leaf size: 33
ode=D[y[x],x]==(-2*(x+5))/((x+2)*(x-4)); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \int _1^x-\frac {2 (K[1]+5)}{K[1]^2-2 K[1]-8}dK[1]+c_1 \]
Sympy. Time used: 0.219 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-(-2*x - 10)/((x - 4)*(x + 2)) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} - 3 \log {\left (x - 4 \right )} + \log {\left (x + 2 \right )} \]