chaynes75268

5 Reputation

2 Badges

14 years, 249 days

MaplePrimes Activity


These are replies submitted by chaynes75268

I am looking for a function f(x) which is continuous with corners

@Robert Israel 

cheers thats helped alot

@Robert Israel 

cheers thats helped alot

@chaynes75268 

meant to say make an Array

@chaynes75268 

meant to say make an Array

Sorry i was a bit vague. So far iv managed to compute a fourier approximation of f(x)= x^2 as follows:

restart;

f: x-> x^2;

assume (k, integer);

a[0]:= (1/Pi)*int(f(x), x= -PI..Pi);

a[k]:= (1/Pi)*int(f(x)*cos(k*x), x=-Pi..Pi);

b[k]:= (1/Pi)*int(f(x)*sin(k*x), x=-Pi..Pi);

fourier:= a[0]/2 + sum(a[k]*cos(k*x) + b[k]*sin(k*x), k=1....n);

 

and i am wanting to take the approximations of "fourier" and loop these values into an array so that i can extract them later on if this is possible.

Sorry i was a bit vague. So far iv managed to compute a fourier approximation of f(x)= x^2 as follows:

restart;

f: x-> x^2;

assume (k, integer);

a[0]:= (1/Pi)*int(f(x), x= -PI..Pi);

a[k]:= (1/Pi)*int(f(x)*cos(k*x), x=-Pi..Pi);

b[k]:= (1/Pi)*int(f(x)*sin(k*x), x=-Pi..Pi);

fourier:= a[0]/2 + sum(a[k]*cos(k*x) + b[k]*sin(k*x), k=1....n);

 

and i am wanting to take the approximations of "fourier" and loop these values into an array so that i can extract them later on if this is possible.

Page 1 of 1