10.10.8 problem 8

Internal problem ID [1340]
Book : Elementary differential equations and boundary value problems, 10th ed., Boyce and DiPrima
Section : Chapter 3, Second order linear equations, section 3.6, Variation of Parameters. page 190
Problem number : 8
Date solved : Saturday, March 29, 2025 at 10:52:40 PM
CAS classification : [[_2nd_order, _linear, _nonhomogeneous]]

\begin{align*} y^{\prime \prime }+4 y&=3 \csc \left (2 t \right ) \end{align*}

Maple. Time used: 0.066 (sec). Leaf size: 35
ode:=diff(diff(y(t),t),t)+4*y(t) = 3*csc(2*t); 
dsolve(ode,y(t), singsol=all);
 
\[ y = -\frac {3 \ln \left (\csc \left (2 t \right )\right ) \sin \left (2 t \right )}{4}+\frac {\left (-6 t +4 c_1 \right ) \cos \left (2 t \right )}{4}+\sin \left (2 t \right ) c_2 \]
Mathematica. Time used: 0.029 (sec). Leaf size: 39
ode=D[y[t],{t,2}]+4*y[t] ==3*Csc[2*t]; 
ic={}; 
DSolve[{ode,ic},y[t],t,IncludeSingularSolutions->True]
 
\[ y(t)\to \left (-\frac {3 t}{2}+c_1\right ) \cos (2 t)+\frac {1}{4} \sin (2 t) (3 \log (\sin (2 t))+4 c_2) \]
Sympy. Time used: 0.300 (sec). Leaf size: 31
from sympy import * 
t = symbols("t") 
y = Function("y") 
ode = Eq(4*y(t) + Derivative(y(t), (t, 2)) - 3/sin(2*t),0) 
ics = {} 
dsolve(ode,func=y(t),ics=ics)
 
\[ y{\left (t \right )} = \left (C_{1} - \frac {3 t}{2}\right ) \cos {\left (2 t \right )} + \left (C_{2} + \frac {3 \log {\left (\sin {\left (2 t \right )} \right )}}{4}\right ) \sin {\left (2 t \right )} \]