64.11.15 problem 15

Internal problem ID [13394]
Book : Differential Equations by Shepley L. Ross. Third edition. John Willey. New Delhi. 2004.
Section : Chapter 4, Section 4.3. The method of undetermined coefficients. Exercises page 151
Problem number : 15
Date solved : Monday, March 31, 2025 at 07:53:06 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }-3 y^{\prime \prime }+4 y&=4 \,{\mathrm e}^{x}-18 \,{\mathrm e}^{-x} \end{align*}

Maple. Time used: 0.004 (sec). Leaf size: 33
ode:=diff(diff(diff(y(x),x),x),x)-3*diff(diff(y(x),x),x)+4*y(x) = 4*exp(x)-18*exp(-x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{2 x} \left (c_3 x +c_2 \right )+2 \,{\mathrm e}^{x}+\frac {{\mathrm e}^{-x} \left (3 c_1 -6 x -4\right )}{3} \]
Mathematica. Time used: 0.23 (sec). Leaf size: 78
ode=D[y[x],{x,3}]-3*D[y[x],{x,2}]+4*y[x]==4*Exp[x]-18*Exp[-x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{2 x} \int _1^x-\frac {2}{9} e^{-3 K[1]} \left (-9+2 e^{2 K[1]}\right ) (3 K[1]+1)dK[1]-\frac {2}{9} e^x (6 x-1)+c_1 e^{-x}+e^{2 x} (c_3 x+c_2) \]
Sympy. Time used: 0.117 (sec). Leaf size: 26
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) - 4*exp(x) - 3*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) + 18*exp(-x),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} - 2 x\right ) e^{- x} + \left (C_{2} + C_{3} x\right ) e^{2 x} + 2 e^{x} \]