1. ## Fourier Series

f(x)= modulus(x) over the interval(-pi,pi)

i have split the function into -x for (-pi,0)

and x for(0,pi)

i was wondering whether this was the right path to take i have figured out a0 to be pi

also I need a little direction on teh fourier series on f(x)=cos(ax) where a is NOT an integer therefore I am uncertain on what to do is teh question sayin a can be a rational number?

2. Originally Posted by calculusgeek

also I need a little direction on teh fourier series on f(x)=cos(ax) where a is NOT an integer therefore I am uncertain on what to do is teh question sayin a can be a rational number?
Yes it can, it just cannot be an integer, the reason being that the final answer will have a term with something to the effect of $\frac{1}{\sin(a\pi)}$ and we both know what happens if a is an integer

3. Originally Posted by calculusgeek
f(x)= modulus(x) over the interval(-pi,pi)

i have split the function into -x for (-pi,0)

and x for(0,pi)

i was wondering whether this was the right path to take i have figured out a0 to be pi
Yes, it is the right approach, and the righth value for $a_0$

also I need a little direction on teh fourier series on f(x)=cos(ax) where a is NOT an integer therefore I am uncertain on what to do is teh question sayin a can be a rational number?
The reason for specifying that $a$ is not an integer is because if it is the function is aready a Fourier series (all the other terms will have zero coefficients).

Yes $a$ can be rational (but not an integer, obviously), it can also be irrational.

CB

4. thanks very much ot both that was extremely helpful

so for the cos(ax) when i am trying to work out teh coeffiencts as cos is an even function can i conlude that the values of a0 and bn will be 0
and thus only need to figure out an

or if having to do the integration for say a0 wil is simply be 1/a*sin(ax) am i able to do this??

thanks once againfor the input it was helpful in helping me to finsh other problems i had also

5. Originally Posted by calculusgeek
thanks very much ot both that was extremely helpful

so for the cos(ax) when i am trying to work out teh coeffiencts as cos is an even function can i conlude that the values of a0 and bn will be 0
and thus only need to figure out an

or if having to do the integration for say a0 wil is simply be 1/a*sin(ax) am i able to do this??

thanks once againfor the input it was helpful in helping me to finsh other problems i had also
You should probably disregard my last post. Here is what you should do, I think I owe it to you to show you the solution since I provided a misleading answer earlier

I will let you show which points the function $\cos(ax)\to{S_n(x)}$

But we can say until you have shown that, that $f(x)\sim{S_n(x)}$ or that $f(x)$ and $S_n(x)$ have a strong correlation.

We know that the Fourier Series for $f(x)$ on the interval $[-\pi,\pi]$ is given by

$S_n(x)=\frac{A_0}{2}+\sum_{n=1}^{\infty}\bigg[A_n\cos(nx)+B_n\sin(nx)\bigg]$

Where in our specific case we have:

\begin{aligned}A_0&=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)dx\\
&\frac{1}{\pi}\int_{-\pi}^{\pi}\cos(ax)dx\\
&=\frac{2\sin(a\pi)}{a\pi}\end{aligned}

\begin{aligned}A_n&=\frac{1}{\pi}\int_{-\pi}^{\pi}f(x)\cos(nx)\\
&=\frac{1}{\pi}\int_{-\pi}^{\pi}\cos(ax)\cos(nx)dx\\
&=\frac{2}{\pi}a\sin(a\pi)\frac{(-1)^n}{a^2-n^2}~\forall{n}\in\mathbb{N}\end{aligned}

\begin{aligned}B_n&=\frac{1}{\pi}\int_{-\pi}^{\pi}\sin(nx)f(x)dx\\
&=\frac{1}{\pi}\int_{-\pi}^{\pi}\sin(nx)\cos(ax)dx\\
&=0\end{aligned}

The last part because the integrand was odd.

So

$S_n(x)=\frac{\sin(a\pi)}{a\pi}+\frac{2}{\pi}a\sin( a\pi)\sum_{n=1}^{\infty}\frac{(-1)^n}{a^2-n^2}\cos(nx)$

As for your first question assuming that you mean $\text{modulous}(x)=|x|$ just remember that

$\int_{-a}^{a}|x|f(x)dx=-\int_{-a}^0{x}f(x)dx+\int_0^a{x}f(x)dx$

6. thank you so much and yes i didi mean that for the modulus and i had already started using that but is it possible for me to disregard a0 and an as i know that the modulus is an odd function im slightly confused because i worked out a0 using that method and obtain pi??

once again thank you so much for your help its help me understand a lot which is even better for future stuff that i will be asked to do!!!

7. Originally Posted by calculusgeek
thank you so much and yes i didi mean that for the modulus and i had already started using that but is it possible for me to disregard a0 and an as i know that the modulus is an odd function im slightly confused because i worked out a0 using that method and obtain pi??

once again thank you so much for your help its help me understand a lot which is even better for future stuff that i will be asked to do!!!
You have made just one error, if we define $|x|=f(x)$ then $f(-x)=|-x|=|-1||x|=|x|=f(x)$ so $f(x)$ is an even function. So $\int_{-a}^{a}|x|dx=2\int_0^a|x|dx$

8. thanks once again it was extremely helpful, i obtained for mod(x) the a_n coeff to be -2/(n^2*pi)hoever i am not sure if thsi is correct i no that there will not be any b(n) as its an even function

im not sure whether its correct or nto as for teh even and odd values i obatin the same a(n) coeff in the integral

9. Originally Posted by calculusgeek
thanks once again it was extremely helpful, i obtained for mod(x) the a_n coeff to be -2/(n^2*pi)hoever i am not sure if thsi is correct i no that there will not be any b(n) as its an even function

im not sure whether its correct or nto as for teh even and odd values i obatin the same a(n) coeff in the integral
$A_n=\frac{2}{\pi}\frac{(-1)^n-1}{n^2}$

$B_n=0$

10. thanks again i have tried doing it again and i only obtain -2?n^2 can you tell me how u obtained (-1)^n-1, that implies that even number are o,however whn i do the integral of (-xcos(ax))+ integral of(xcos(ax))

im slightly confused

11. Originally Posted by calculusgeek
thanks again i have tried doing it again and i only obtain -2?n^2 can you tell me how u obtained (-1)^n-1, that implies that even number are o,however whn i do the integral of (-xcos(ax))+ integral of(xcos(ax))

im slightly confused
No problem! First let us get out of the way the calculation of $\int\cos(ax)xdx$

By letting $\left\{ \begin{array}{c}
u=x\implies~du=dx \\ dv=\cos(ax)dx\implies{v}=\frac{1}{a}\sin(ax)\end{a rray}\right.$
and using the integration by parts formula

$\int{udv}=u\cdot{v}-\int{v}\cdot{du}$ to obtain

\begin{aligned}\int{x\cos(ax)dx}&=\frac{x}{a}\sin( ax)-\frac{1}{a}\int\sin(ax)dx\\
&=\frac{x}{a}\sin(ax)+\frac{1}{a^2}\cos(ax)+C\end{ aligned}

So now then

\begin{aligned}\frac{1}{\pi}\int_{-\pi}^{\pi}|x|\cos(ax)dx&=\frac{2}{\pi}\int_0^{\pi} x\cos(ax)dx\\
&=\frac{2}{\pi}\bigg[\frac{x}{a}\sin(ax)+\frac{\cos(ax)}{a^2}\bigg]\bigg|_{x=0}^{x=\pi}\\
&=\frac{2}{\pi}\bigg[\left(\frac{\sin(a\pi)\pi}{a}+\frac{\cos(a\pi)}{a^ 2}\right)-\left(0+\frac{1}{a^2}\right)\bigg]\\
&=\frac{2}{\pi}\bigg[\frac{\cos(a\pi)-1}{a^2}+\frac{\sin(a\pi)\pi}{a}\bigg]\end{aligned}

Now we know that $\sin(a\pi)=0~\forall{a}\in\mathbb{N}$ and similarly $\cos(a\pi)=(-1)^a~\forall{a}\in\mathbb{N}$

So we can finally conclude that

\begin{aligned}\frac{1}{\pi}\int_{-\pi}^{\pi}|x|\cos(ax)dx&=\frac{2}{\pi}\int_{0}^{\p i}x\cos(ax)dx\\
&\frac{2}{\pi}\bigg[\frac{\cos(a\pi)-1}{a^2}+\frac{\sin(a\pi)\pi}{a}\bigg]\\
&=\frac{2}{\pi}\cdot\frac{(-1)^a-1}{a^2}~\forall{a}\in\mathbb{N}\end{aligned}

And that

$\frac{2}{\pi}\frac{(-1)^a-1}{a^2}=\left\{ \begin{array}{rcl}
\frac{-4}{\pi{a^2}} & \mbox{if} & a\in2\mathbb{N}+1 \\ 0 & \mbox{if} & a\in2\mathbb{N}
\end{array}\right.$

Hope that clears things up.

12. thank you u r an absolute life saver i tried it again by myself after some long swotting and I did work it out, at the moment im trying to work out the integral for cos(ax)cos(nx)

using integration by partsi am finding to difficult therefore im going to use an identity which is cosx*cosy =1/2(cos(x-y)+cos(x+y)) and trying to integrate in this was by letting ax=x and nx=y i was wondering if thsi is the right approach to take i can see how to obtain a^2-n^" from this after all my working i get

((a+n)(a-n)(4sin(a*pi)(-1)^n))/(a+n)(a-n)

im not sure what i can do to be honest after here if you could help thanks

13. after lots of sweat i have managed to complete it thank you very much for all your help

14. For the mod x problem, do you only do it for 1 and cos(nx) because mod x is an even function, and thus the sin(nx) integration part is not required?

15. Originally Posted by pkr
For the mod x problem, do you only do it for 1 and cos(nx) because mod x is an even function, and thus the sin(nx) integration part is not required?
You do the $\sin(nx)$ integration but since $\sin(nx)|x|$ is odd the integral equals zero.

Page 1 of 2 12 Last

,

,

,

,

,

,

,

,

,

,

,

,

,

,

# Fourier expansion of f(x)=mod x

Click on a term to search for related topics.