12.18.20 problem section 9.2, problem 20

Internal problem ID [2134]
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.2. constant coefficient. Page 483
Problem number : section 9.2, problem 20
Date solved : Saturday, March 29, 2025 at 11:49:15 PM
CAS classification : [[_3rd_order, _missing_x]]

\begin{align*} y^{\prime \prime \prime }-6 y^{\prime \prime }+12 y^{\prime }-8 y&=0 \end{align*}

With initial conditions

\begin{align*} y \left (0\right )&=1\\ y^{\prime }\left (0\right )&=-1\\ y^{\prime \prime }\left (0\right )&=-4 \end{align*}

Maple. Time used: 0.045 (sec). Leaf size: 19
ode:=diff(diff(diff(y(x),x),x),x)-6*diff(diff(y(x),x),x)+12*diff(y(x),x)-8*y(x) = 0; 
ic:=y(0) = 1, D(y)(0) = -1, (D@@2)(y)(0) = -4; 
dsolve([ode,ic],y(x), singsol=all);
 
\[ y = {\mathrm e}^{2 x} \left (2 x^{2}-3 x +1\right ) \]
Mathematica. Time used: 0.003 (sec). Leaf size: 21
ode=D[y[x],{x,3}]-6*D[y[x],{x,2}]+12*D[y[x],x]-8*y[x]==0; 
ic={y[0]==1,Derivative[1][y][0] ==-1,Derivative[2][y][0] ==-4}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{2 x} \left (2 x^2-3 x+1\right ) \]
Sympy. Time used: 0.219 (sec). Leaf size: 15
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-8*y(x) + 12*Derivative(y(x), x) - 6*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)),0) 
ics = {y(0): 1, Subs(Derivative(y(x), x), x, 0): -1, Subs(Derivative(y(x), (x, 2)), x, 0): -4} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (x \left (2 x - 3\right ) + 1\right ) e^{2 x} \]