68.1.1 problem 1

Internal problem ID [17068]
Book : INTRODUCTORY DIFFERENTIAL EQUATIONS. Martha L. Abell, James P. Braselton. Fourth edition 2014. ElScAe. 2014
Section : Chapter 1. Introduction to Differential Equations. Exercises 1.1, page 10
Problem number : 1
Date solved : Thursday, October 02, 2025 at 01:42:34 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y^{\prime }-2 y&=x^{3} \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 29
ode:=diff(diff(y(x),x),x)+diff(y(x),x)-2*y(x) = x^3; 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{x} c_2 +{\mathrm e}^{-2 x} c_1 -\frac {x^{3}}{2}-\frac {3 x^{2}}{4}-\frac {9 x}{4}-\frac {15}{8} \]
Mathematica. Time used: 0.013 (sec). Leaf size: 39
ode=D[y[x],{x,2}]+D[y[x],x]-2*y[x]==x^3; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{8} \left (-4 x^3-6 x^2-18 x-15\right )+c_1 e^{-2 x}+c_2 e^x \end{align*}
Sympy. Time used: 0.098 (sec). Leaf size: 34
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**3 - 2*y(x) + Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 2 x} + C_{2} e^{x} - \frac {x^{3}}{2} - \frac {3 x^{2}}{4} - \frac {9 x}{4} - \frac {15}{8} \]