Post Reply 
Classic Fourier Series
01-31-2015, 09:53 PM (This post was last modified: 02-01-2015 10:05 AM by salvomic.)
Post: #14
RE: Classic Fourier Series
(01-31-2015 09:11 PM)Snorre Wrote:  Hello Salvo,

a program is always a good idea ;-)

Just two tips:

...

hi friend,
your tips are very welcome!
I'm changing my program in this way.
I'm still a newcomer in this programming language, so I love to learn more and more tips!

Yes, however, I would export a list of three arguments: a0 (however this one is always the same), ak, bk...

Last: doing so:
Code:

a0:=int(fun(t),t,0,2*PI)/(2*PI);
ak:=int(fun(t)*cos(k*t),t,0,2*PI)/PI;
bk:=int(fun(t)*sin(k*t),t,0,2*PI)/PI;
How can we avoid this error?
I set g:=x^2 then input fourcoeff(g(x),1) or fourcoeff(x^2,1) and I get "warning, evaluating invariable expression(value) like if expression was a function. You should write subst(x^2,x,t)"...
Sure I miss something else Smile
I would better have the possibility to input both functions or expressions :-)

For the rest, I would also use the program (or the function we discussed above) with some "piecewise" functions.
So I tried to define a function for "square wave", f(t):=PIECEWISE(-π<t<0,-1,t=0,0,t=-π,0,t=π,0,0<t<π,1); this function seem to be ok, but if I use it with the program or with other integrate function I get "No case applies"...
Is this the way to use "Piecewise" function or I miss something?

Thank you!

Salvo
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Classic Fourier Series - salvomic - 01-27-2015, 07:15 PM
RE: Classic Fourier Series - Snorre - 01-30-2015, 05:20 PM
RE: Classic Fourier Series - salvomic - 01-30-2015, 06:07 PM
RE: Classic Fourier Series - salvomic - 01-30-2015, 06:48 PM
RE: Classic Fourier Series - Han - 01-30-2015, 07:23 PM
RE: Classic Fourier Series - salvomic - 01-30-2015, 07:32 PM
RE: Classic Fourier Series - Han - 01-30-2015, 07:54 PM
RE: Classic Fourier Series - salvomic - 01-30-2015, 09:06 PM
RE: Classic Fourier Series - Han - 01-31-2015, 12:05 AM
RE: Classic Fourier Series - salvomic - 01-31-2015, 06:27 AM
RE: Classic Fourier Series - Tim Wessman - 01-31-2015, 09:29 PM
RE: Classic Fourier Series - salvomic - 01-31-2015, 09:47 PM
RE: Classic Fourier Series - Snorre - 01-31-2015, 09:11 PM
RE: Classic Fourier Series - salvomic - 01-31-2015 09:53 PM
RE: Classic Fourier Series - Han - 02-01-2015, 03:10 AM
RE: Classic Fourier Series - rprosperi - 02-01-2015, 03:22 AM
RE: Classic Fourier Series - Han - 02-01-2015, 03:51 AM
RE: Classic Fourier Series - salvomic - 02-01-2015, 09:32 AM
RE: Classic Fourier Series - salvomic - 02-01-2015, 01:52 PM
RE: Classic Fourier Series - Snorre - 02-01-2015, 05:12 PM
RE: Classic Fourier Series - salvomic - 02-01-2015, 05:34 PM
RE: Classic Fourier Series - salvomic - 02-01-2015, 05:55 PM
RE: Classic Fourier Series - salvomic - 02-01-2015, 07:06 PM
RE: Classic Fourier Series - salvomic - 02-03-2015, 08:06 PM
RE: Classic Fourier Series - Snorre - 02-01-2015, 06:13 PM
RE: Classic Fourier Series - salvomic - 02-01-2015, 06:16 PM
RE: Classic Fourier Series - Snorre - 02-01-2015, 08:37 PM
RE: Classic Fourier Series - salvomic - 02-01-2015, 09:14 PM
RE: Classic Fourier Series - Snorre - 02-01-2015, 09:31 PM
RE: Classic Fourier Series - salvomic - 02-01-2015, 09:47 PM
RE: Classic Fourier Series - Snorre - 02-01-2015, 10:19 PM
RE: Classic Fourier Series - salvomic - 02-01-2015, 10:33 PM
RE: Classic Fourier Series - Snorre - 02-01-2015, 10:39 PM
RE: Classic Fourier Series - salvomic - 02-01-2015, 11:00 PM
RE: Classic Fourier Series - salvomic - 02-01-2015, 11:24 PM
RE: Classic Fourier Series - salvomic - 02-02-2015, 10:59 AM
RE: Classic Fourier Series - salvomic - 04-11-2015, 05:35 AM
RE: Classic Fourier Series - StephenG1CMZ - 10-09-2015, 09:37 PM
RE: Classic Fourier Series - salvomic - 10-10-2015, 07:38 AM



User(s) browsing this thread: 4 Guest(s)