85.59.3 problem 3

Internal problem ID [22844]
Book : Applied Differential Equations. By Murray R. Spiegel. 3rd edition. 1980. Pearson. ISBN 978-0130400970
Section : Chapter 4. Linear differential equations. A Exercises at page 203
Problem number : 3
Date solved : Thursday, October 02, 2025 at 09:15:41 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} 4 y+y^{\prime \prime }&=\csc \left (2 x \right ) \end{align*}
Maple. Time used: 0.003 (sec). Leaf size: 35
ode:=diff(diff(y(x),x),x)+4*y(x) = csc(2*x); 
dsolve(ode,y(x), singsol=all);
 
\[ y = \sin \left (2 x \right ) c_2 +\cos \left (2 x \right ) c_1 -\frac {\ln \left (\csc \left (2 x \right )\right ) \sin \left (2 x \right )}{4}-\frac {x \cos \left (2 x \right )}{2} \]
Mathematica. Time used: 0.025 (sec). Leaf size: 37
ode=D[y[x],{x,2}]+4*y[x]==Csc[2*x]; 
ic={}; 
DSolve[{ode,ic},y[x],x,IncludeSingularSolutions->True]
 
\begin{align*} y(x)&\to \left (-\frac {x}{2}+c_1\right ) \cos (2 x)+\frac {1}{4} \sin (2 x) (\log (\sin (2 x))+4 c_2) \end{align*}
Sympy. Time used: 0.219 (sec). Leaf size: 27
from sympy import * 
x = symbols("x") 
y = Function("y") 
ode = Eq(4*y(x) - csc(2*x) + Derivative(y(x), (x, 2)),0) 
ics = {} 
dsolve(ode,func=y(x),ics=ics)
 
\[ y{\left (x \right )} = \left (C_{1} - \frac {x}{2}\right ) \cos {\left (2 x \right )} + \left (C_{2} + \frac {\log {\left (\sin {\left (2 x \right )} \right )}}{4}\right ) \sin {\left (2 x \right )} \]