#
# xpdf ../../EBook/Elementary_Differential_Equations_10th_Edition.pdf 261 &
#
import sympy
from sympy import *
t, A, B = symbols('t A B')
y = A * cos(2*t) + B * sin(2*t)
pt1 = diff(y, t, 4)
pt2 = diff(y, t, 3)
residual = ( pt1 + pt2 - sin(2*t) )
print(simplify(residual))