9.11 problem Problem 11

Internal problem ID [2784]

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

Solution by Maple

Time used: 0.0 (sec). Leaf size: 32

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

Solution by Mathematica

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

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

\[ y(x)\to 2 x^2+5 x+(-x+c_1) \cos (x)+\sin (x) (\log (\sin (x))+c_2)-3 \]