11.4 problem 1(d)

Internal problem ID [5247]

Book: An introduction to Ordinary Differential Equations. Earl A. Coddington. Dover. NY 1961
Section: Chapter 2. Linear equations with constant coefficients. Page 93
Problem number: 1(d).
ODE order: 2.
ODE degree: 1.

CAS Maple gives this as type [[_2nd_order, _linear, _nonhomogeneous]]

Solve \begin {gather*} \boxed {y^{\prime \prime }-y^{\prime }-2 y-x^{2}-\cos \relax (x )=0} \end {gather*}

Solution by Maple

Time used: 0.004 (sec). Leaf size: 34

dsolve(diff(y(x),x$2)-diff(y(x),x)-2*y(x)=x^2+cos(x),y(x), singsol=all)
 

\[ y \relax (x ) = c_{2} {\mathrm e}^{2 x}+{\mathrm e}^{-x} c_{1}-\frac {x^{2}}{2}-\frac {3 \cos \relax (x )}{10}-\frac {\sin \relax (x )}{10}+\frac {x}{2}-\frac {3}{4} \]

Solution by Mathematica

Time used: 0.059 (sec). Leaf size: 45

DSolve[y''[x]-y'[x]-2*y[x]==x^2+Cos[x],y[x],x,IncludeSingularSolutions -> True]
 

\begin{align*} y(x)\to c_1 e^{-x}+c_2 e^{2 x}+\frac {1}{20} (-5 (2 (x-1) x+3)-2 \sin (x)-6 \cos (x)) \\ \end{align*}