20.7.6 problem Problem 30

Internal problem ID [3721]
Book : Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section : Chapter 8, Linear differential equations of order n. Section 8.3, The Method of Undetermined Coefficients. page 525
Problem number : Problem 30
Date solved : Sunday, March 30, 2025 at 02:06:30 AM
CAS classification : [[_3rd_order, _with_linear_symmetries]]

\begin{align*} y^{\prime \prime \prime }+2 y^{\prime \prime }-5 y^{\prime }-6 y&=4 x^{2} \end{align*}

Maple. Time used: 0.005 (sec). Leaf size: 32
ode:=diff(diff(diff(y(x),x),x),x)+2*diff(diff(y(x),x),x)-5*diff(y(x),x)-6*y(x) = 4*x^2; 
dsolve(ode,y(x), singsol=all);
 
\[ y = -\frac {2 x^{2}}{3}+\frac {10 x}{9}-\frac {37}{27}+c_1 \,{\mathrm e}^{-3 x}+c_2 \,{\mathrm e}^{-x}+c_3 \,{\mathrm e}^{2 x} \]
Mathematica. Time used: 0.004 (sec). Leaf size: 45
ode=D[y[x],{x,3}]+2*D[y[x],{x,2}]-5*D[y[x],x]-6*y[x]==4*x^2; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {2 x^2}{3}+\frac {10 x}{9}+c_1 e^{-3 x}+c_2 e^{-x}+c_3 e^{2 x}-\frac {37}{27} \]
Sympy. Time used: 0.219 (sec). Leaf size: 36
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-4*x**2 - 6*y(x) - 5*Derivative(y(x), x) + 2*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} e^{- 3 x} + C_{2} e^{- x} + C_{3} e^{2 x} - \frac {2 x^{2}}{3} + \frac {10 x}{9} - \frac {37}{27} \]