87.17.14 problem 14

Internal problem ID [23606]
Book : Ordinary differential equations with modern applications. Ladas, G. E. and Finizio, N. Wadsworth Publishing. California. 1978. ISBN 0-534-00552-7. QA372.F56
Section : Chapter 2. Linear differential equations. Exercise at page 127
Problem number : 14
Date solved : Thursday, October 02, 2025 at 09:43:24 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 4 y+y^{\prime \prime }&=4 x^{3}-8 x^{2}-14 x +7 \end{align*}
Maple. Time used: 0.002 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)+4*y(x) = 4*x^3-8*x^2-14*x+7; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (2 x \right ) c_2 +\cos \left (2 x \right ) c_1 +x^{3}-2 x^{2}-5 x +\frac {11}{4} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 34
ode=D[y[x],{x,2}]+4*y[x]==4*x^3-8*x^2-14*x+7; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to x^3-2 x^2-5 x+c_1 \cos (2 x)+c_2 \sin (2 x)+\frac {11}{4} \end{align*}
Sympy. Time used: 0.063 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*x**3 + 8*x**2 + 14*x + 4*y(x) + Derivative(y(x), (x, 2)) - 7,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} \sin {\left (2 x \right )} + C_{2} \cos {\left (2 x \right )} + x^{3} - 2 x^{2} - 5 x + \frac {11}{4} \]