26.2.9 problem 9

Internal problem ID [4258]
Book : Differential equations with applications and historial notes, George F. Simmons. Second edition. 1971
Section : Chapter 2, section 8, page 41
Problem number : 9
Date solved : Sunday, March 30, 2025 at 02:46:51 AM
CAS classification : [_separable]

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

Maple. Time used: 0.002 (sec). Leaf size: 11
ode:=1+y(x)+(1-x)*diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -1+\left (-1+x \right ) c_1 \]
Mathematica. Time used: 0.027 (sec). Leaf size: 18
ode=(1+y[x])+(1-x)*D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)\to -1+c_1 (x-1) \\ y(x)\to -1 \\ \end{align*}
Sympy. Time used: 0.249 (sec). Leaf size: 8
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((1 - x)*Derivative(y(x), x) + y(x) + 1,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} x - C_{1} - 1 \]