34.4.1 problem 19 (a)

Internal problem ID [7928]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 6. Equations of first order and first degree (Linear equations). Supplemetary problems. Page 39
Problem number : 19 (a)
Date solved : Tuesday, September 30, 2025 at 05:10:10 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+y&=2+2 x \end{align*}
Maple. Time used: 0.001 (sec). Leaf size: 14
ode:=diff(y(x),x)+y(x) = 2+2*x; 
dsolve(ode,y(x), singsol=all);
 
\[ y = 2 x +{\mathrm e}^{-x} c_1 \]
Mathematica. Time used: 0.017 (sec). Leaf size: 17
ode=D[y[x],x]+y[x]==2+2*x; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to 2 x+c_1 e^{-x} \end{align*}
Sympy. Time used: 0.066 (sec). Leaf size: 10
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-2*x + y(x) + Derivative(y(x), x) - 2,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- x} + 2 x \]