83.6.1 problem 2 (a)

Internal problem ID [21944]
Book : Differential Equations By Kaj L. Nielsen. Second edition 1966. Barnes and nobel. 66-28306
Section : Chapter III. First order differential equations of the first degree. Ex. VII at page 50
Problem number : 2 (a)
Date solved : Thursday, October 02, 2025 at 08:18:56 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+4 y&=x^{2} \end{align*}
Maple. Time used: 0.000 (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.035 (sec). Leaf size: 28
ode=D[y[x],x]+4*y[x]==x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{32} \left (8 x^2-4 x+1\right )+c_1 e^{-4 x} \end{align*}
Sympy. Time used: 0.078 (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} \]