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]]

\[ \boxed {y^{\prime \prime }+y-\csc \left (x \right )-2 x^{2}-5 x -1=0} \]

Solution by Maple

Time used: 0.0 (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 \left (x \right ) = \sin \left (x \right ) c_{2} +c_{1} \cos \left (x \right )-\cos \left (x \right ) x +\sin \left (x \right ) \ln \left (\sin \left (x \right )\right )+2 x^{2}+5 x -3 \]

Solution by Mathematica

Time used: 0.106 (sec). Leaf size: 36

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 (\tan (x))+\log (\cos (x))+c_2) \\ \end{align*}