I have a second-order linear ODE y'' + (w/c)^2*(cos(cos(2pix/d) + q0)*y=0. I need to get exact and numerical solution. Firstly, i tried to solve it with sympy.dsolve with this code:
c = 1
w = 1.5
d = 1
q0 = 2
wc = (w / c)**2
x = symbols('x')
y = Function('y')
equation = Eq(y(x).diff(x, x) + wc * (cos(2 * pi * x / d) + q0) * y(x), 0)
y_x = dsolve(equation)
y_x
but when compiling jupyter said: "The kernel has died. It will restart automatically". I already did 2 ODEs with this method but there weren't cos(kx) and there were initial conditions in equations I solved. I guess I have a problem with that but I don't know how to fix this.