2
$\begingroup$

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$)?

enter image description here

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]

enter image description here

$\endgroup$
3
  • 1
    $\begingroup$ The code L = 5; 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]; Plot[% - x^2 - 1, {x, 0, L}] works well in version12.0. The result of FullSimplify differs from yours. $\endgroup$ – user64494 Jul 18 '20 at 14:53
  • 1
    $\begingroup$ @user64494 Yes, the plot shows 0, but is there a way to get the original expression? $\endgroup$ – Leponzo Jul 18 '20 at 14:56
  • $\begingroup$ My best is 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 performs 0. $\endgroup$ – user64494 Jul 18 '20 at 15:08
2
$\begingroup$

According to Find the function $f(x)$ by using its fourier expansion, it looks like it is usually not possible to get $f(x)$ from the infinite series.

$\endgroup$
1
  • $\begingroup$ Unfortunately, PowerExpand[ FunctionExpand[-(1/\[Pi]^3) I (-\[Pi]^2 Log[1 - E^(I \[Pi] x)] + \[Pi]^2 Log[ E^(-I \[Pi] x) (-1 + E^(I \[Pi] x))] + 2 \[Pi]^2 Log[1 + E^(I \[Pi] x)] - 2 \[Pi]^2 Log[E^(-I \[Pi] x) (1 + E^(I \[Pi] x))] - 2 PolyLog[3, -E^(-I \[Pi] x)] + 2 PolyLog[3, E^(-I \[Pi] x)] + 2 PolyLog[3, -E^(I \[Pi] x)] - 2 PolyLog[3, E^(I \[Pi] x)])]] does not work $\endgroup$ – user64494 Jul 19 '20 at 16:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.