When I plug the below sum (from here) into Mathematica 12.1.1, why do I get something different from the original function ($1 + x^2$)?
S = HoldForm[Sum[2/(n*Pi)^3*((2 L^2 - n^2*Pi^2*(1 + L^2))*(-1)^n - 2*L^2 + n^2*Pi^2)*Sin[n*Pi*x/L], {n, 1, Infinity}]]
FullSimplify[ReleaseHold[S], Assumptions -> 0 <= x <= L]


FullSimplify[ReleaseHold[S], Assumptions -> 0 <= x <= L];
– user64494 Jul 18 '20 at 14:53Plot[% - x^2 - 1, {x, 0, L}]works well in version12.0. The result ofFullSimplify` differs from yours.L=5;s = Sum[2/(n*Pi)^3*((2 L^2 - n^2*Pi^2*(1 + L^2))*(-1)^n - 2*L^2 + n^2*Pi^2)*Sin[n*Pi*x/L], {n, 1, Infinity}];FullSimplify[D[s , {x, 3}], Assumptions -> x >= 0 && x <= L]which performs0. – user64494 Jul 18 '20 at 15:08