64.11.23 problem 23

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 : 23
Date solved : Wednesday, March 05, 2025 at 09:51:56 PM
CAS classification : [[_high_order, _missing_y]]

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

Maple. Time used: 0.005 (sec). Leaf size: 64
ode:=diff(diff(diff(diff(y(x),x),x),x),x)+2*diff(diff(diff(y(x),x),x),x)-3*diff(diff(y(x),x),x) = 18*x^2+16*x*exp(x)+4*exp(3*x)-9; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {\left (\left (x^{4}+\frac {8}{3} x^{3}+\frac {19}{3} x^{2}-2 c_{3} x -2 c_4 \right ) {\mathrm e}^{3 x}+\left (-4 x^{2}+18 x -2 c_{2} -\frac {57}{2}\right ) {\mathrm e}^{4 x}-\frac {2 c_{1}}{9}-\frac {2 \,{\mathrm e}^{6 x}}{27}\right ) {\mathrm e}^{-3 x}}{2} \]
Mathematica. Time used: 32.208 (sec). Leaf size: 138
ode=D[y[x],{x,4}]+2*D[y[x],{x,3}]-3*D[y[x],{x,2}]==18*x^2+16*x*Exp[x]+4*Exp[3*x]-9; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \int _1^x\int _1^{K[4]}e^{-3 K[3]} \left (c_1+e^{4 K[3]} c_2+\int _1^{K[3]}-\frac {1}{4} e^{3 K[1]} \left (18 K[1]^2+16 e^{K[1]} K[1]+4 e^{3 K[1]}-9\right )dK[1]+e^{4 K[3]} \int _1^{K[3]}\left (\frac {9}{2} e^{-K[2]} K[2]^2+4 K[2]-\frac {9}{4} e^{-K[2]}+e^{2 K[2]}\right )dK[2]\right )dK[3]dK[4]+c_4 x+c_3 \]
Sympy. Time used: 0.212 (sec). Leaf size: 54
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-18*x**2 - 16*x*exp(x) - 4*exp(3*x) - 3*Derivative(y(x), (x, 2)) + 2*Derivative(y(x), (x, 3)) + Derivative(y(x), (x, 4)) + 9,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{3} e^{- 3 x} + C_{4} e^{x} - \frac {x^{4}}{2} - \frac {4 x^{3}}{3} + x^{2} \left (2 e^{x} - \frac {19}{6}\right ) + x \left (C_{2} - 9 e^{x}\right ) + \frac {e^{3 x}}{27} \]