12.2.17 problem 17

Internal problem ID [1553]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 2, First order equations. Linear first order. Section 2.1 Page 41
Problem number : 17
Date solved : Saturday, March 29, 2025 at 10:58:44 PM
CAS classification : [_linear]

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

Maple. Time used: 0.002 (sec). Leaf size: 20
ode:=diff(y(x),x)+4/(x-1)*y(x) = 1/(x-1)^5+sin(x)/(x-1)^4; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {-\cos \left (x \right )+\ln \left (x -1\right )+c_1}{\left (x -1\right )^{4}} \]
Mathematica. Time used: 0.059 (sec). Leaf size: 22
ode=D[y[x],x] +4/(x-1)*y[x]==1/(x-1)^5+Sin[x]/(x-1)^4; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {\log (x-1)-\cos (x)+c_1}{(x-1)^4} \]
Sympy. Time used: 1.796 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(Derivative(y(x), x) + 4*y(x)/(x - 1) - sin(x)/(x - 1)**4 - 1/(x - 1)**5,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \frac {C_{1} + \log {\left (x - 1 \right )} - \cos {\left (x \right )}}{x^{4} - 4 x^{3} + 6 x^{2} - 4 x + 1} \]