expand fourier in maple

f(x)=x^2
expand in fourier series:
a)by cosinuses on (0,pi)
b)by sinuses on (0,pi)
c)on (0,2pi)

Scott03's picture

part of the solution

You could try something like the following:

with(inttrans):
f:=x->x^2;
fouriercos(f(x),x,t);
fouriersin(f(x),x,t);

I don't know how to deal with the range. It has been a while since I dealt with Fourier Series.

Scott

periodic vs aperiodic

Scott

The  commands ' fourier', 'fouriercos' and ' fouriersin' in the package 'inttrans' compute "Fourier transforms", which you apply to aperiodic functions. For periodic functions you get a Fourier series.

I cannot understand why, after so many years of development, Maple is not distributed with a package for Fourier series , which are more basic or elementary than Fourier transforms.

 

Probably it is too late

In Maple you need to use "step by step" method (i think). Regarding automatic computation take a look at FourierTrigSeries package, math.muni.cz/~xsrot/fourierseries/

How to add this to maple

How do I get this package to load into Maple. I just downloaded the file from your website. Great work!

gkokovidis's picture

How to add this to Maple

For Windows Use:
Unpack the zip file to a local directory, preferably without spaces in it.
Find the directory in your Maple installation that is called "Users"
Using a text editor, create a file called maple.ini and in that file
paste the line below into it.

libname := libname, `c:/Apps/MySource/Maple/fouriertrigseries`:

The path will be whatever directory you unpacked the zip file into.
Edit the line to reflect your path.  Then save the file as maple.ini
into the Maple/Users directory.

Make sure Maple is not running when you do this.  When Maple starts up, it
checks the maple.ini file in the Users directory.  If you do all of this
correctly, then the examples.mws worksheet should work.  If you want to use
the fouriertrigseries package in your own worksheet, then you can call it
using the "with" command, just like in the example worksheet that was
provided.

 

Regards,
Georgios Kokovidis
Dräger Medical


hmmm, doesn't seem to work

Here is where the maple.ini file which I saved in the Users directory points to:

c:\Program Files\Maple 12\fouriertrigseries

The above location is where I saved the unzipped files. I know there is a space there but I also tried it in another directory and it didn't work.

with(fouriertrigseries)

Error, invalid input: with expects its 1st argument, pname, to be of type {`module`, package}, but received fouriertrigseries

Do you happen to know where Maple saves its own packages? Or is it a black box? It would be nice to look at their programming.

gkokovidis's picture

Case Sensitive

 Maple is case sensitive.  Try the following:

>with(FourierTrigSeries);

 

and see if that works for you.  I tried the example with spaces in the directory, and it workded, so that is not the problem.

 

Regards,
Georgios Kokovidis
Dräger Medical


How to install FourierTrigSeries on Windows platform

Hello,

below you can find instructions how to install FourierTrigSeries module. It is written for Maple 10 but should work also for other versions. The module itself was tested on versions 8, 9, 10, 11. It wasn't tested on Maple 12 but I hope it should work.

 Suppose the Maple is installed in "c:\Program Files\Maple 10" and FourierTrigSeries module files are stored in "c:\Program Files\Maple 10\fouriertrigseries"  (the directory path can contain space blank characters).

1. Close all opened Maple sessions.

2. Create a plaintext file "maple.ini" in "c:\Program Files\Maple 10\Users"  with following content:

libname:=libname, "c:/Program Files/Maple 10/fouriertrigseries":

This tells Maple to search modules also in the directory where our new module is stored.
Use forward slashes instead of backslashes. I recommend to use double quotes to enclose the directory path.

3. Start Maple session and try to load the module with command " with(FourierTrigSeries); ". The module name is case sensitive, you have to use exactly this form. The module name used inside "with" command has no relation to the directory path where the files are stored.
 

lemelinm's picture

it works fine in Maple 12.01

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
}