7.2.5 problem 5

Internal problem ID [23]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 1. First order differential equations. Section 1.3. Problems at page 27
Problem number : 5
Date solved : Tuesday, March 04, 2025 at 10:38:51 AM
CAS classification : [[_linear, `class A`]]

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

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