Skip to main content

Timeline for A more convenient Fourier series

Current License: CC BY-SA 3.0

12 events
when toggle format what by license comment
Jul 19, 2017 at 4:50 history edited xzczd CC BY-SA 3.0
added 1 character in body
Jul 4, 2017 at 15:48 comment added user36273 @xzczd Mm..The current version is good, only some functions can not be formed in a Fourier series. By the way, Mathematica can not form FourierSin and FourierCosSeries with f[x_] = E^Sin[x]. FourierTrigSeries but works. Try it with Integrate, the better version then stock.
Jul 4, 2017 at 14:57 comment added xzczd @rewi Funny, Integrate maanges to find the former coefficient: Integrate[E^Cos[t/2] Exp[-I k t], {t, -Pi, Pi}] // AbsoluteTiming. Well, should I rebuild my easy… on Integrate?
Jul 4, 2017 at 14:11 comment added xzczd @rewi This time it's somewhat beyond my reach… The root of evil is that, FourierCoefficient and FourierCosCoefficient is unable to find the general formula for the coefficient. Try e.g. FourierCoefficient[E^Cos[x/2], x, k] or FourierCosCoefficient[E^Sin[x], x, k]. (Corresponding range of $x$ is $(0,\pi)$. ) My easy…s are built on these functions so limited by their symbolic solving ability. Maybe we can start another (hard) question like "can we enhance the solving ability of FourierCoefficient"?
Jul 4, 2017 at 11:37 comment added user36273 @xzczd He who seeks finds! Unfortunately the worm is still somewhere. Please try the function f [x _] = Exp [Sin [x]] with easyFourierTrigSeries or easyFourierCosSeries (it takes a few minutes). FourierCoefficient or FourierCosCoefficient is not calculated. Mathematica's FourierTrigSeries finds the solution.
Jul 2, 2017 at 21:15 comment added user36273 Fantastic! The above example is now properly calculated, furthermore, I have also given difficult examples, e.g. Phase control; it works.
Jul 2, 2017 at 20:21 comment added xzczd @rewi OK, the problem is harder than I expected… The core issue is that we don't have a general function for obtaining singularity (see discussion here for more information). Anyway, I've modified the code to make the shell more general, have a look.
Jul 2, 2017 at 20:18 history edited xzczd CC BY-SA 3.0
Make the function more general
Jul 2, 2017 at 17:51 comment added user36273 Please be careful in handling these procedures! For example: f = Piecewise[{{x Sin[x], 0 <= x <= 2 Pi}}] , series = easyFourierSinSeries[f, {x, 0, 2 Pi}] /. C -> 5 // ReleaseHold
Jul 2, 2017 at 13:22 comment added user36273 These procedures are really very helpful. Thanks for this work. (+1)
Jul 1, 2017 at 16:05 comment added Jens Thanks, the built-in functions are indeed kind of hard to remember so I usually rescale arguments by hand before using them...
Jul 1, 2017 at 11:35 history answered xzczd CC BY-SA 3.0