44.3.15 problem 23

Internal problem ID [6996]
Book : A First Course in Differential Equations with Modeling Applications by Dennis G. Zill. 12 ed. Metric version. 2024. Cengage learning.
Section : Chapter 1. Introduction to differential equations. Review problems at page 34
Problem number : 23
Date solved : Monday, January 27, 2025 at 02:40:14 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+y&=2 \cos \left (x \right )-2 \sin \left (x \right ) \end{align*}

Solution by Maple

Time used: 0.003 (sec). Leaf size: 18

dsolve(diff(y(x),x$2)+y(x)=2*cos(x)-2*sin(x),y(x), singsol=all)
 
\[ y = \left (c_{1} +x +1\right ) \cos \left (x \right )+\sin \left (x \right ) \left (x +c_{2} \right ) \]

Solution by Mathematica

Time used: 0.089 (sec). Leaf size: 21

DSolve[D[y[x],{x,2}]+y[x]==2*Cos[x]-2*Sin[x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to (x+1+c_1) \cos (x)+(x+c_2) \sin (x) \]