40.10.10 problem 19

Internal problem ID [6732]
Book : Schaums Outline. Theory and problems of Differential Equations, 1st edition. Frank Ayres. McGraw Hill 1952
Section : Chapter 15. Linear equations with constant coefficients (Variation of parameters). Supplemetary problems. Page 98
Problem number : 19
Date solved : Sunday, March 30, 2025 at 11:20:55 AM
CAS classification : [[_3rd_order, _missing_y]]

\begin{align*} y^{\prime \prime \prime }+3 y^{\prime \prime }+2 y^{\prime }&=x^{2}+4 x +8 \end{align*}

Maple. Time used: 0.002 (sec). Leaf size: 33
ode:=diff(diff(diff(y(x),x),x),x)+3*diff(diff(y(x),x),x)+2*diff(y(x),x) = x^2+4*x+8; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {x^{2}}{4}+\frac {x^{3}}{6}+\frac {{\mathrm e}^{-2 x} c_1}{2}-{\mathrm e}^{-x} c_2 +\frac {11 x}{4}+c_3 \]
Mathematica. Time used: 0.159 (sec). Leaf size: 43
ode=D[y[x],{x,3}]+3*D[y[x],{x,2}]+2*D[y[x],x]==x^2+4*x+8; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to \frac {1}{12} \left (2 x^3+3 x^2+33 x-6 e^{-2 x} \left (2 c_2 e^x+c_1\right )\right )+c_3 \]
Sympy. Time used: 0.283 (sec). Leaf size: 31
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-x**2 - 4*x + 2*Derivative(y(x), x) + 3*Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) - 8,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{1} + C_{2} e^{- 2 x} + C_{3} e^{- x} + \frac {x^{3}}{6} + \frac {x^{2}}{4} + \frac {11 x}{4} \]