89.16.38 problem 38

Internal problem ID [24688]
Book : A short course in Differential Equations. Earl D. Rainville. Second edition. 1958. Macmillan Publisher, NY. CAT 58-5010
Section : Chapter 9. Nonhomogeneous Equations: Undetermined coefficients. Exercises at page 140
Problem number : 38
Date solved : Thursday, October 02, 2025 at 10:47:06 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y&=x^{3} \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=0 \\ y \left (\pi \right )&=0 \\ \end{align*}
Maple
ode:=diff(diff(y(x),x),x)+y(x) = x^3; 
ic:=[y(0) = 0, y(Pi) = 0]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ \text {No solution found} \]
Mathematica
ode=D[y[x],{x,2}]+y[x]==  x^3; 
ic={y[0]==0,y[Pi]==0}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 

{}

Sympy
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 + y(x) + Derivative(y(x), (x, 2)),0) 
ics = {y(0): 0, y(pi): 0} 
dsolve(ode,func=y(x),ics=ics)
 
ValueError : Couldnt solve for initial conditions