28.2.41 problem 41

Internal problem ID [4484]
Book : Differential equations for engineers by Wei-Chau XIE, Cambridge Press 2010
Section : Chapter 4. Linear Differential Equations. Page 183
Problem number : 41
Date solved : Sunday, March 30, 2025 at 03:23:46 AM
CAS classification : [[_2nd_order, _missing_y]]

\begin{align*} y^{\prime \prime }-y^{\prime }&={\mathrm e}^{x} \left (x^{2}+10\right ) \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 26
ode:=diff(diff(y(x),x),x)-diff(y(x),x) = exp(x)*(x^2+10); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (x^{3}-3 x^{2}+3 c_1 +36 x -36\right ) {\mathrm e}^{x}}{3}+c_2 \]
Mathematica. Time used: 0.083 (sec). Leaf size: 31
ode=D[y[x],{x,2}]-D[y[x],x]==Exp[x]*(10+x^2); 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^x \left (\frac {x^3}{3}-x^2+12 x-12+c_1\right )+c_2 \]
Sympy. Time used: 0.221 (sec). Leaf size: 20
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq((-x**2 - 10)*exp(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} + \left (C_{2} + \frac {x^{3}}{3} - x^{2} + 12 x\right ) e^{x} \]