9.11 problem Problem 11

Internal problem ID [2275]

Book: Differential equations and linear algebra, Stephen W. Goode and Scott A Annin. Fourth edition, 2015
Section: Chapter 8, Linear differential equations of order n. Section 8.7, The Variation of Parameters Method. page 556
Problem number: Problem 11.
ODE order: 2.
ODE degree: 1.

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

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

Solution by Maple

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

dsolve(diff(y(x),x$2)+y(x)=csc(x)+2*x^2+5*x+1,y(x), singsol=all)
 

\[ y \relax (x ) = \sin \relax (x ) c_{2}+c_{1} \cos \relax (x )+2 x^{2}+\left (-\cos \relax (x )+5\right ) x +\sin \relax (x ) \ln \left (\sin \relax (x )\right )-3 \]

Solution by Mathematica

Time used: 0.073 (sec). Leaf size: 33

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

\begin{align*} y(x)\to (x+3) (2 x-1)+(-x+c_1) \cos (x)+\sin (x) (\log (\sin (x))+c_2) \\ \end{align*}