56.4.71 problem 68

Internal problem ID [8960]
Book : Own collection of miscellaneous problems
Section : section 4.0
Problem number : 68
Date solved : Sunday, March 30, 2025 at 01:56:31 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+20 y^{\prime }+500 y&=100000 \cos \left (100 x \right ) \end{align*}

Maple. Time used: 0.036 (sec). Leaf size: 37
ode:=diff(diff(y(x),x),x)+20*diff(y(x),x)+500*y(x) = 100000*cos(100*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = {\mathrm e}^{-10 x} \sin \left (20 x \right ) c_2 +{\mathrm e}^{-10 x} \cos \left (20 x \right ) c_1 -\frac {3800 \cos \left (100 x \right )}{377}+\frac {800 \sin \left (100 x \right )}{377} \]
Mathematica. Time used: 0.037 (sec). Leaf size: 47
ode=D[y[x],{x,2}]+20*D[y[x],x]+500*y[x] == 100000*Cos[100*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\[ y(x)\to -\frac {200}{377} (19 \cos (100 x)-4 \sin (100 x))+c_2 e^{-10 x} \cos (20 x)+c_1 e^{-10 x} \sin (20 x) \]
Sympy. Time used: 0.253 (sec). Leaf size: 37
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(500*y(x) - 100000*cos(100*x) + 20*Derivative(y(x), x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} \sin {\left (20 x \right )} + C_{2} \cos {\left (20 x \right )}\right ) e^{- 10 x} + \frac {800 \sin {\left (100 x \right )}}{377} - \frac {3800 \cos {\left (100 x \right )}}{377} \]