11.23 problem 46

Internal problem ID [241]

Book: Differential equations and linear algebra, 3rd ed., Edwards and Penney
Section: Section 5.5, Nonhomogeneous equations and undetermined coefficients Page 351
Problem number: 46.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

Time used: 0.015 (sec). Leaf size: 44

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

\[ y \relax (x ) = \sin \relax (x ) c_{2}+\cos \relax (x ) c_{1}-\frac {x \left (\cos ^{3}\relax (x )\right )}{8}+\frac {3 \left (\cos ^{2}\relax (x )\right ) \sin \relax (x )}{32}+\frac {9 x \cos \relax (x )}{32}+\frac {\left (12 x^{2}+9\right ) \sin \relax (x )}{64} \]

Solution by Mathematica

Time used: 0.049 (sec). Leaf size: 50

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

\begin{align*} y(x)\to \frac {1}{128} \left (4 \left (6 x^2-3+32 c_2\right ) \sin (x)+3 \sin (3 x)-4 x \cos (3 x)+8 (3 x+16 c_1) \cos (x)\right ) \\ \end{align*}