58.1.1 problem 1(a)

Internal problem ID [14527]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 1, Differential equations and their solutions. Exercises page 13
Problem number : 1(a)
Date solved : Thursday, October 02, 2025 at 09:38:11 AM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+y&=1+x \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 12
ode:=diff(y(x),x)+y(x) = 1+x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = x +{\mathrm e}^{-x} c_1 \]
Mathematica. Time used: 0.029 (sec). Leaf size: 15
ode=D[y[x],x]+y[x]==1+x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x+c_1 e^{-x} \end{align*}
Sympy. Time used: 0.063 (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 \]