38.2.48 problem 50

Internal problem ID [8266]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Section 1.2 Initial value problems. Exercises 1.2 at page 19
Problem number : 50
Date solved : Tuesday, September 30, 2025 at 05:21:02 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+2 y&=3 x -6 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 15
ode:=diff(y(x),x)+2*y(x) = 3*x-6; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {3 x}{2}-\frac {15}{4}+{\mathrm e}^{-2 x} c_1 \]
Mathematica. Time used: 0.048 (sec). Leaf size: 33
ode=D[y[x],x]+2*y[x]==3*x-6; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to e^{-2 x} \left (\int _1^x3 e^{2 K[1]} (K[1]-2)dK[1]+c_1\right ) \end{align*}
Sympy. Time used: 0.077 (sec). Leaf size: 17
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-3*x + 2*y(x) + Derivative(y(x), x) + 6,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 2 x} + \frac {3 x}{2} - \frac {15}{4} \]