4.25.19 \(y(x) \left (\sum _{n=0}^m a(n) \cos (2 n x)\right )+y''(x)=0\)

ODE
\[ y(x) \left (\sum _{n=0}^m a(n) \cos (2 n x)\right )+y''(x)=0 \] ODE Classification

[[_2nd_order, _with_linear_symmetries]]

Book solution method
TO DO

Mathematica
cpu = 2.30941 (sec), leaf count = 0 , could not solve

DSolve[Sum[a[n]*Cos[2*n*x], {n, 0, m}]*y[x] + Derivative[2][y][x] == 0, y[x], x]

Maple
cpu = 2.187 (sec), leaf count = 45

\[ \left \{ y \left ( x \right ) ={\it \_C1}\,{\it MathieuC} \left ( 0,-{\frac {\sum _{n=0}^{m}a \left ( n \right ) }{2\,{n}^{2}}},nx \right ) +{\it \_C2}\,{\it MathieuS} \left ( 0,-{\frac {\sum _{n=0}^{m}a \left ( n \right ) }{2\,{n}^{2}}},nx \right ) \right \} \] Mathematica raw input

DSolve[Sum[a[n]*Cos[2*n*x], {n, 0, m}]*y[x] + y''[x] == 0,y[x],x]

Mathematica raw output

DSolve[Sum[a[n]*Cos[2*n*x], {n, 0, m}]*y[x] + Derivative[2][y][x] == 0, y[x], x]

Maple raw input

dsolve(diff(diff(y(x),x),x)+sum(a(n)*cos(2*n*x),n = 0 .. m)*y(x) = 0, y(x),'implicit')

Maple raw output

y(x) = _C1*MathieuC(0,-1/2*sum(a(n),n = 0 .. m)/n^2,n*x)+_C2*MathieuS(0,-1/2*sum
(a(n),n = 0 .. m)/n^2,n*x)