20.9.11 problem Problem 11

Internal problem ID [3755]
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
Date solved : Monday, January 27, 2025 at 07:59:48 AM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y&=\csc \left (x \right )+2 x^{2}+5 x +1 \end{align*}

Solution by Maple

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

Solution by Mathematica

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

DSolve[D[y[x],{x,2}]+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 \]