88.9.1 problem 1

Internal problem ID [24021]
Book : Elementary Differential Equations. By Lee Roy Wilcox and Herbert J. Curtis. 1961 first edition. International texbook company. Scranton, Penn. USA. CAT number 61-15976
Section : Chapter 2. Differential equations of first order. Exercise at page 48
Problem number : 1
Date solved : Thursday, October 02, 2025 at 09:54:28 PM
CAS classification : [[_linear, `class A`]]

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