81.11.7 problem 15-6

Internal problem ID [21631]
Book : The Differential Equations Problem Solver. VOL. I. M. Fogiel director. REA, NY. 1978. ISBN 78-63609
Section : Chapter 15. Method of undetermined coefficients. Page 337.
Problem number : 15-6
Date solved : Thursday, October 02, 2025 at 07:59:15 PM
CAS classification : [[_2nd_order, _quadrature]]

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