32.6.20 problem Exercise 12.20, page 103

Internal problem ID [5885]
Book : Ordinary Differential Equations, By Tenenbaum and Pollard. Dover, NY 1963
Section : Chapter 2. Special types of differential equations of the first kind. Lesson 12, Miscellaneous Methods
Problem number : Exercise 12.20, page 103
Date solved : Monday, January 27, 2025 at 01:24:35 PM
CAS classification : [[_linear, `class A`]]

\begin{align*} y^{\prime }+a y&=b \sin \left (k x \right ) \end{align*}

Solution by Maple

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

dsolve(diff(y(x),x)+a*y(x)=b*sin(k*x),y(x), singsol=all)
 
\[ y \left (x \right ) = \frac {c_{1} {\mathrm e}^{-a x} \left (a^{2}+k^{2}\right )+b \left (-k \cos \left (k x \right )+\sin \left (k x \right ) a \right )}{a^{2}+k^{2}} \]

Solution by Mathematica

Time used: 0.077 (sec). Leaf size: 40

DSolve[D[y[x],x]+a*y[x]==b*Sin[k*x],y[x],x,IncludeSingularSolutions -> True]
 
\[ y(x)\to \frac {b (a \sin (k x)-k \cos (k x))}{a^2+k^2}+c_1 e^{-a x} \]