64.11.11 problem 11

Internal problem ID [13390]
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 : 11
Date solved : Monday, March 31, 2025 at 07:53:01 AM
CAS classification : [[_3rd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime \prime }+y^{\prime \prime }+3 y^{\prime }-5 y&=5 \sin \left (2 x \right )+10 x^{2}+3 x +7 \end{align*}

Maple. Time used: 0.006 (sec). Leaf size: 49
ode:=diff(diff(diff(y(x),x),x),x)+diff(diff(y(x),x),x)+3*diff(y(x),x)-5*y(x) = 5*sin(2*x)+10*x^2+3*x+7; 
dsolve(ode,y(x), singsol=all);
 
\[ y = \frac {\left (17 c_3 \,{\mathrm e}^{-x}-9\right ) \sin \left (2 x \right )}{17}+c_2 \,{\mathrm e}^{-x} \cos \left (2 x \right )-2 x^{2}+c_1 \,{\mathrm e}^{x}-3 x +\frac {2 \cos \left (2 x \right )}{17}-4 \]
Mathematica. Time used: 0.229 (sec). Leaf size: 178
ode=D[y[x],{x,3}]+D[y[x],{x,2}]+3*D[y[x],x]-5*y[x]==5*Sin[2*x]+10*x^2+3*x+7; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to e^{-x} \left (e^{2 x} \int _1^x\frac {1}{8} e^{-K[3]} \left (10 K[3]^2+3 K[3]+5 \sin (2 K[3])+7\right )dK[3]+\sin (2 x) \int _1^x-\frac {1}{8} e^{K[1]} (\cos (2 K[1])+\sin (2 K[1])) \left (10 K[1]^2+3 K[1]+5 \sin (2 K[1])+7\right )dK[1]+\cos (2 x) \int _1^x-\frac {1}{8} e^{K[2]} (\cos (2 K[2])-\sin (2 K[2])) \left (10 K[2]^2+3 K[2]+5 \sin (2 K[2])+7\right )dK[2]+c_3 e^{2 x}+c_2 \cos (2 x)+c_1 \sin (2 x)\right ) \]
Sympy. Time used: 0.369 (sec). Leaf size: 51
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(-10*x**2 - 3*x - 5*y(x) - 5*sin(2*x) + 3*Derivative(y(x), x) + Derivative(y(x), (x, 2)) + Derivative(y(x), (x, 3)) - 7,0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = C_{3} e^{x} - 2 x^{2} - 3 x + \left (C_{1} \sin {\left (2 x \right )} + C_{2} \cos {\left (2 x \right )}\right ) e^{- x} - \frac {9 \sin {\left (2 x \right )}}{17} + \frac {2 \cos {\left (2 x \right )}}{17} - 4 \]