39.1.8 problem Problem 11.8

Internal problem ID [6513]
Book : Schaums Outline Differential Equations, 4th edition. Bronson and Costa. McGraw Hill 2014
Section : Chapter 11. THE METHOD OF UNDETERMINED COEFFICIENTS. page 95
Problem number : Problem 11.8
Date solved : Wednesday, March 05, 2025 at 12:55:22 AM
CAS classification : [[_2nd_order, _quadrature]]

\begin{align*} y^{\prime \prime }&=9 x^{2}+2 x -1 \end{align*}

Maple. Time used: 0.003 (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.003 (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]
 
\[ y(x)\to \frac {3 x^4}{4}+\frac {x^3}{3}-\frac {x^2}{2}+c_2 x+c_1 \]
Sympy. Time used: 0.084 (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} \]