64.1.1 problem 1(a)

Internal problem ID [13175]
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 : Monday, March 31, 2025 at 07:36:08 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.036 (sec). Leaf size: 15
ode=D[y[x],x]+y[x]==1+x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to x+c_1 e^{-x} \]
Sympy. Time used: 0.138 (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 \]