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 = 293.577 (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 = 8.912 (sec), leaf count = 45

\[\left [y \left (x \right ) = \textit {\_C1} \MathieuC \left (0, -\frac {\moverset {m}{\munderset {n =0}{\sum }}a \left (n \right )}{2 n^{2}}, n x \right )+\textit {\_C2} \MathieuS \left (0, -\frac {\moverset {m}{\munderset {n =0}{\sum }}a \left (n \right )}{2 n^{2}}, n x \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))

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*su
m(a(n),n = 0 .. m)/n^2,n*x)]