67.3.7 problem 4.3 (g)

Internal problem ID [16328]
Book : Ordinary Differential Equations. An introduction to the fundamentals. Kenneth B. Howell. second edition. CRC Press. FL, USA. 2020
Section : Chapter 4. SEPARABLE FIRST ORDER EQUATIONS. Additional exercises. page 90
Problem number : 4.3 (g)
Date solved : Thursday, October 02, 2025 at 01:20:38 PM
CAS classification : [[_linear, `class A`]]

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