4.1.5 \(y'(x)=a \cos (b x+c)+k y(x)\)

ODE
\[ y'(x)=a \cos (b x+c)+k y(x) \] ODE Classification

[[_linear, `class A`]]

Book solution method
Linear ODE

Mathematica
cpu = 0.0653687 (sec), leaf count = 43

\[\left \{\left \{y(x)\to \frac {a (b \sin (b x+c)-k \cos (b x+c))}{b^2+k^2}+c_1 e^{k x}\right \}\right \}\]

Maple
cpu = 0.022 (sec), leaf count = 40

\[ \left \{ y \relax (x ) ={{\rm e}^{kx}}{\it \_C1}+{\frac {a \left (b\sin \left (bx+c \right ) -\cos \left (bx+c \right ) k \right ) }{{b}^{2}+{k}^{2}}} \right \} \] Mathematica raw input

DSolve[y'[x] == a*Cos[c + b*x] + k*y[x],y[x],x]

Mathematica raw output

{{y[x] -> E^(k*x)*C[1] + (a*(-(k*Cos[c + b*x]) + b*Sin[c + b*x]))/(b^2 + k^2)}}

Maple raw input

dsolve(diff(y(x),x) = a*cos(b*x+c)+k*y(x), y(x),'implicit')

Maple raw output

y(x) = exp(k*x)*_C1+a*(b*sin(b*x+c)-cos(b*x+c)*k)/(b^2+k^2)