1.11.36 problem 37

Internal problem ID [357]
Book : Elementary Differential Equations. By C. Henry Edwards, David E. Penney and David Calvis. 6th edition. 2008
Section : Chapter 2. Linear Equations of Higher Order. Section 2.5 (Nonhomogeneous equations and undetermined coefficients). Problems at page 161
Problem number : 37
Date solved : Tuesday, September 30, 2025 at 03:57:45 AM
CAS classification : [[_3rd_order, _missing_y]]

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

With initial conditions

\begin{align*} y \left (0\right )&=0 \\ y^{\prime }\left (0\right )&=0 \\ y^{\prime \prime }\left (0\right )&=1 \\ \end{align*}
Maple. Time used: 0.026 (sec). Leaf size: 24
ode:=diff(diff(diff(y(x),x),x),x)-2*diff(diff(y(x),x),x)+diff(y(x),x) = 1+exp(x)*x; 
ic:=[y(0) = 0, D(y)(0) = 0, (D@@2)(y)(0) = 1]; 
dsolve([ode,op(ic)],y(x), singsol=all);
 
\[ y = \frac {\left (x^{3}-3 x^{2}+18 x -24\right ) {\mathrm e}^{x}}{6}+x +4 \]
Mathematica. Time used: 0.157 (sec). Leaf size: 28
ode=D[y[x],{x,3}]-2*D[y[x],{x,2}]+D[y[x],x]==1+x*Exp[x]; 
ic={y[0]==0,Derivative[1][y][0] ==0,Derivative[2][y][0] ==1}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \frac {1}{6} e^x \left (x^3-3 x^2+18 x-24\right )+x+4 \end{align*}
Sympy. Time used: 0.157 (sec). Leaf size: 22
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x*exp(x) + Derivative(y(x), x) - 2*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) - 1,0) 
ics = {y(0): 0, Subs(Derivative(y(x), x), x, 0): 0, Subs(Derivative(y(x), (x, 2)), x, 0): 1} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = x + \left (x \left (\frac {x^{2}}{6} - \frac {x}{2} + 3\right ) - 4\right ) e^{x} + 4 \]