ASKSAGE: Sage Q&A Forum - RSS feedhttps://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Fri, 30 Dec 2011 15:26:01 +0100Recover general formula for fourier series?https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/Hi,
Is there a way to recover the general formula for a fourier series? That is, f.fourier_series_sine_coefficient(9,pi) will give me the 9th sine coefficient, but I'd like to know more generally how I can construct the Nth sine coefficient.
I'm doing some complicated (to me) fourier series, and I'm having trouble figuring out the formula for the Nth.
Thanks for any help.
AndrewThu, 29 Dec 2011 15:52:24 +0100https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/Comment by Shashank for <p>Hi,</p>
<p>Is there a way to recover the general formula for a fourier series? That is, f.fourier_series_sine_coefficient(9,pi) will give me the 9th sine coefficient, but I'd like to know more generally how I can construct the Nth sine coefficient.</p>
<p>I'm doing some complicated (to me) fourier series, and I'm having trouble figuring out the formula for the Nth.</p>
<p>Thanks for any help.</p>
<p>Andrew</p>
https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/?comment=20615#post-id-20615Can you explain what you mean by that? Generally the coefficients of the fourier series are not related to one another. One can write a expression for the nth coefficient only in special cases, and I am not sure there is a way of identifying whether a given formula falls in that category. Thu, 29 Dec 2011 16:05:47 +0100https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/?comment=20615#post-id-20615Comment by gopher13 for <p>Hi,</p>
<p>Is there a way to recover the general formula for a fourier series? That is, f.fourier_series_sine_coefficient(9,pi) will give me the 9th sine coefficient, but I'd like to know more generally how I can construct the Nth sine coefficient.</p>
<p>I'm doing some complicated (to me) fourier series, and I'm having trouble figuring out the formula for the Nth.</p>
<p>Thanks for any help.</p>
<p>Andrew</p>
https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/?comment=20612#post-id-20612It may be a poor question then .. my frame of reference is the typical fourier series for periodic functions found on-line (square, triangle, saw), which all seem to reduce to nice clean equations for the nth coefficient. I didn't realize most would not behave so nicely .. though, I don't feel so bad now for scratching my head about the more complex function for which I was trying to generate a series .. smile. Thanks for the input/answer.Fri, 30 Dec 2011 14:23:12 +0100https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/?comment=20612#post-id-20612Answer by achrzesz for <p>Hi,</p>
<p>Is there a way to recover the general formula for a fourier series? That is, f.fourier_series_sine_coefficient(9,pi) will give me the 9th sine coefficient, but I'd like to know more generally how I can construct the Nth sine coefficient.</p>
<p>I'm doing some complicated (to me) fourier series, and I'm having trouble figuring out the formula for the Nth.</p>
<p>Thanks for any help.</p>
<p>Andrew</p>
https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/?answer=12625#post-id-12625Also:
sage: maxima('load(fourie)')
sage: maxima('foursimp(fourier(x^3,x,%pi))')
[%t26,%t27,%t28]
sage: maxima('[%t26,%t27,%t28]')
[a[0]=0,a[n]=0,b[n]=-2*(%pi^2*n^2-6)*(-1)^n/n^3]Fri, 30 Dec 2011 05:09:08 +0100https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/?answer=12625#post-id-12625Comment by gopher13 for <p>Also:</p>
<p>sage: maxima('load(fourie)')</p>
<p>sage: maxima('foursimp(fourier(x^3,x,%pi))')</p>
<p>[%t26,%t27,%t28]</p>
<p>sage: maxima('[%t26,%t27,%t28]')</p>
<p>[a[0]=0,a[n]=0,b[n]=-2<em>(%pi^2</em>n^2-6)*(-1)^n/n^3]</p>
https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/?comment=20611#post-id-20611Thanks very much for these .. I will study/play with them, and hopefully my function falls under 'simple case' .. thanks again.Fri, 30 Dec 2011 14:24:26 +0100https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/?comment=20611#post-id-20611Answer by achrzesz for <p>Hi,</p>
<p>Is there a way to recover the general formula for a fourier series? That is, f.fourier_series_sine_coefficient(9,pi) will give me the 9th sine coefficient, but I'd like to know more generally how I can construct the Nth sine coefficient.</p>
<p>I'm doing some complicated (to me) fourier series, and I'm having trouble figuring out the formula for the Nth.</p>
<p>Thanks for any help.</p>
<p>Andrew</p>
https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/?answer=13079#post-id-13079I would recommend also the class notes by Prof. David Joyner:
http://www.usna.edu/Users/math/wdj/teach/sm472-cft/sm472_CFT/Fri, 30 Dec 2011 15:26:01 +0100https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/?answer=13079#post-id-13079Answer by achrzesz for <p>Hi,</p>
<p>Is there a way to recover the general formula for a fourier series? That is, f.fourier_series_sine_coefficient(9,pi) will give me the 9th sine coefficient, but I'd like to know more generally how I can construct the Nth sine coefficient.</p>
<p>I'm doing some complicated (to me) fourier series, and I'm having trouble figuring out the formula for the Nth.</p>
<p>Thanks for any help.</p>
<p>Andrew</p>
https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/?answer=13076#post-id-13076In simple cases you can try:
sage: maxima('load(fourie)')
sage: maxima('totalfourier(abs(x),x,%pi)').sage()
1/2*pi + 2*sum(((-1)^n - 1)*cos(n*x)/n^2, n, 1, +Infinity)/pi
sage: maxima('totalfourier(x^3,x,%pi)').sage()
-2*sum((pi^2*n^2 - 6)*(-1)^n*sin(n*x)/n^3, n, 1, +Infinity)Fri, 30 Dec 2011 04:00:00 +0100https://ask.sagemath.org/question/8600/recover-general-formula-for-fourier-series/?answer=13076#post-id-13076