12.19.53 problem section 9.3, problem 53

Internal problem ID [2200]
Book : Elementary differential equations with boundary value problems. William F. Trench. Brooks/Cole 2001
Section : Chapter 9 Introduction to Linear Higher Order Equations. Section 9.3. Undetermined Coefficients for Higher Order Equations. Page 495
Problem number : section 9.3, problem 53
Date solved : Tuesday, March 04, 2025 at 01:51:37 PM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }+y^{\prime \prime }-y^{\prime }-y&=4 \,{\mathrm e}^{-x} \left (1-6 x \right )-2 x \cos \left (x \right )+2 \left (1+x \right ) \sin \left (x \right ) \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 40
ode:=diff(diff(diff(y(x),x),x),x)+diff(diff(y(x),x),x)-diff(y(x),x)-y(x) = 4*exp(-x)*(1-6*x)-2*x*cos(x)+2*(1+x)*sin(x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \left (2 x^{3}+2 x^{2}+\left (c_3 +2\right ) x +c_2 +1\right ) {\mathrm e}^{-x}+\cos \left (x \right ) x +{\mathrm e}^{x} c_1 -2 \sin \left (x \right ) \]
Mathematica. Time used: 0.419 (sec). Leaf size: 54
ode=1*D[y[x],{x,3}]+1*D[y[x],{x,2}]-1*D[y[x],x]-1*y[x]==4*Exp[-x]*(1-6*x)-2*x*Cos[x]+2*(1+x)*Sin[x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-x} \left (2 x^3+2 x^2+2 x-2 e^x \sin (x)+e^x x \cos (x)+c_2 x+c_3 e^{2 x}+1+c_1\right ) \]
Sympy. Time used: 0.709 (sec). Leaf size: 90
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(2*x*cos(x) - (4 - 24*x)*exp(-x) - (2*x + 2)*sin(x) - y(x) - Derivative(y(x), x) + Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{3} e^{x} + \frac {\sqrt {2} x \sin {\left (x + \frac {\pi }{4} \right )}}{2} + \frac {\sqrt {2} x \cos {\left (x + \frac {\pi }{4} \right )}}{2} + \left (C_{1} + x \left (C_{2} + 2 x^{2} + 2 x\right )\right ) e^{- x} - \frac {\sin {\left (x \right )}}{2} - \sqrt {2} \sin {\left (x + \frac {\pi }{4} \right )} + \frac {\cos {\left (x \right )}}{2} + \frac {\sqrt {2} \cos {\left (x + \frac {\pi }{4} \right )}}{2} \]