74.8.12 problem 12

Internal problem ID [16077]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 2. First Order Equations. Review exercises, page 80
Problem number : 12
Date solved : Monday, March 31, 2025 at 02:39:02 PM
CAS classification : [[_linear, `class A`]]

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

Maple. Time used: 0.002 (sec). Leaf size: 13
ode:=y(x)-x+diff(y(x),x) = 0; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x -1+{\mathrm e}^{-x} c_1 \]
Mathematica. Time used: 0.028 (sec). Leaf size: 16
ode=(y[x]-x)+D[y[x],x]==0; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x+c_1 e^{-x}-1 \]
Sympy. Time used: 0.110 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x + y(x) + Derivative(y(x), x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- x} + x - 1 \]