0

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.

Marat
  • 1
  • 1
  • This is a bug and should be reported as an issue on GitHub: https://github.com/sympy/sympy/issues – Oscar Benjamin Jun 21 '22 at 20:26
  • This is a Mathieu equation. Apart from giving the basis solutions a name, there is no symbolic solution. There is some interesting resonance theory for this equation, but still no exact solution. – Lutz Lehmann Jun 22 '22 at 04:26
  • @LutzLehmann thanks! My task, I guess, is to investigate the equation, get dispersion diagrams and so on. I thought I had to get a solution, but no. – Marat Jun 23 '22 at 11:03
  • I'm not sure how far you get using numerical solutions. Determining if they stay bounded might be heuristic. You could probably do some numerical Floquet theory, compute the basis solutions over a period 2*pi, compute the eigenvalues of the fundamental/Wronski matrix,... The manual approach is via sub-determinants of the Hill matrices, but that might be the wrong point-of-view here, if q0 is assumed to be small. – Lutz Lehmann Jun 23 '22 at 12:54

0 Answers0