0

Sketch each function and determine its Fourier series . $f(x)=x$, $1<x<2$

Could you help me with this problem. My doubt is the interval given to me that is $1 <x <2$, it is not a symmetric interval as they are in many exercises ranging from $[-\pi ,\pi ]$ or $[-1 ,1 ]$ etc, if I have the Fourier coefficients:

\begin{align} a_0 &=\frac{1}{L}\int_{-L}^{L}f(x)dx \\ a_n &=\frac{1}{L}\int_{-L}^{L}f(x) \cos\left ( \frac{n\pi x}{L} \right )dx \\ b_{n} &=\frac{1}{L}\int_{-L}^{L}f(x) \sin\left ( \frac{n\pi x}{L} \right )dx \end{align}

I see that the limits of integration are for a symmetric interval, how can I solve this problem. Would you have to modify the equations of Fourier coefficients?

  • The function $f(x)$ is given on the interval $(1,2)$. In a sense, the question is ill posed because $f(x)$ can be extended to a periodic function in a number of ways. Assuming the period is $T=1$, there is one interpretation, plotted below. In this case, you can integrate the extension of $f(x)$ over one period, as long as you define $f(x)$ properly over this period. – mjw Feb 10 '20 at 02:57
  • Also, with $T=1$, $L=\frac{1}{2}$, so the cosine and sine integrals contain $f(x)$ multiplied by $\cos 2\pi k x$ or $\sin 2\pi k x$ in the integrands. – mjw Feb 10 '20 at 03:00

2 Answers2

1

Please notice that in Fourier coefficient, you just need to calculate integration in one period, it's not necessary to be symmetric around origin. i.e.

\begin{align} a_0 &=\frac{1}{L}\int_{<T>}f(x)dx \\ a_n &=\frac{1}{L}\int_{<T>}f(x) \cos\left ( \frac{n\pi x}{L} \right )dx \\ b_{n} &=\frac{1}{L}\int_{<T>}f(x) \sin\left ( \frac{n\pi x}{L} \right )dx \end{align}

here $T = 2-1=1$ and $L = \frac{T}{2}=\frac{1}{2}$. The function is depicted in the figure below

enter image description here

Therefore the coefficients are ($\cos (n\pi) = (-1)^n$)

\begin{align} a_0 &=\frac{1}{\frac{1}{2}}\int_{1}^{2}xdx =3 \\ a_{n} &=\frac{1}{\frac{1}{2}}\int_{1}^{2} x\cos\left ( n\pi x\right )dx = \frac{x\sin(n\pi x)}{(n\pi)}+\frac{\cos(n\pi x)}{(n\pi)^2} \Bigl|_{1}^{2}=\frac{2(1-(-1)^n)}{(n\pi)^2}\\ b_{n} &=\frac{1}{\frac{1}{2}}\int_{1}^{2}x \sin\left ( n\pi x\right )dx = \frac{-x\cos(n\pi x)}{(n\pi)}+\frac{\sin(n\pi x )}{(n\pi)^2} \Bigl|_{1}^{2}=\frac{-2(2-(-1)^n)}{n\pi} \end{align}

If you want to find the coefficients in another interval, you can simply find the equation of the function in that interval and calculate the integrals. Here is an exercise. Show that the below integrals yields the same results

\begin{align} a_0 &=\frac{1}{\frac{1}{2}}\int_{0}^{1}(x+1)dx \\ a_{n} &=\frac{1}{\frac{1}{2}}\int_{0}^{1} (x+1)\cos\left ( n\pi x\right )dx \\ b_{n} &=\frac{1}{\frac{1}{2}}\int_{0}^{1} (x+1)\sin\left ( n\pi x\right )dx \end{align}

Since

$$f(x) = \begin{cases}\vdots & \\ x+2 &-1\le x< 0 \\ x+1 &0\le x< 1 \\ x &1\le x< 2 \\ x-1 &2\le x< 3 \\ \vdots & \end{cases}$$

K.K.McDonald
  • 3,127
  • 1
    Looks like you are assuming the period is $T=1$. Since the period was not specified, should be as legitimate as any other choice. But your function is odd, except for the constant term. So, should be $a_n=0$ for $n \ne 0$. – mjw Feb 09 '20 at 17:33
  • The series is written as $f(x) = \frac{a_0}{2}+\sum_{n=1}^{\infty}a_n \cos(n\pi x) + \sum_{n=1}^{\infty}b_n \sin(n\pi x) $, so $a_0$ is correct. Also no further information is given, thus we have to expand the function periodically, either that, or anything further must be noted in the problem, which is not. $f(x)$ has half-wave symmetry, so $a_n=0$ for $n$ being even as we see above but $a_n \neq 0$ for $n$ being odd. In other words for $f(x)$ to have odd symmetry, we must have $f(x-\frac{1}{2})-\frac{a_0}{2}$. For an odd function $f(0)=0$. – K.K.McDonald Feb 09 '20 at 17:52
  • But to be fair that was a helpful comment. We consider an odd function to be continuous at origin and by only shifting $f(x)$, this condition can not be met. – K.K.McDonald Feb 09 '20 at 18:03
  • Yes, you are right about $\frac{a_2}{2}!$ – mjw Feb 09 '20 at 18:31
  • If you subtract $a_0/2 = 3/2$ from your function, don't you get an odd function? – mjw Feb 09 '20 at 18:32
  • The condition for "odd" is $f(x) = -f(-x)$. – mjw Feb 09 '20 at 18:33
  • insert $x=0$ in $f(x)=-f(-x)$ you get $f(0)=-f(0)\Rightarrow f(0)=0$. As silly as it looks but $f(x)-\frac{a_0}{2}$ is not an odd function. The problem is at origin. – K.K.McDonald Feb 09 '20 at 18:35
  • $\frac{\lim_{x\uparrow 0}( f(x)-3/2) + \lim{x\downarrow 0}(f(x)-3/2)}{2} = 0$ – mjw Feb 09 '20 at 18:42
  • $f(x)$ is not even continuous at the origin to begin with, thus you can not define $\lim_{x\rightarrow 0} f(x)$. A function $f$ is continuous at $x=a$ if $\lim_{x\rightarrow a^+} f(x)=\lim_{x\rightarrow a^-} f(x)=f(a)$. Also the Fourier series automatically converges to $\frac{f(a^+)+f(a^-)}{2}$ for a given point $a$. Also you can use Weierstrass-Jordan a.k.a. Cauchy definition for continuity, the $\epsilon-\delta$ definition, they all result that $f$ must be close to zero when $x$ is around zero (for a metric topological space like $\mathbb{R}$ with neighborhood) which is not the case. – K.K.McDonald Feb 09 '20 at 18:56
  • Agreed. For this function the limit as $x\rightarrow 0$ does not exist. The Fourier series converges to the average of the left and right hand limits. – mjw Feb 09 '20 at 21:45
0

If you assume the period is $T=1$ then

$$f(x) \sim \frac{a_0}{2} + \sum_{k=0}^\infty a_k \cos 2k\pi x + \sum_{k=0}^\infty b_k \sin 2k\pi x.$$

$$a_0 = 2 \int_1^2 x \, dx =3,$$

$$a_k = 2 \int_1^2 x \cos 2 k \pi x \, dx =0,$$

$$b_k = 2 \int_1^2 x \sin 2 k \pi x \, dx= -\frac{1}{k\pi}.$$

The function $f(x)$ is piecewise continuous and the series converges to $f(x)$ at points of continuity.

At the points of discontinuity (integers $n$), the series converges to the average of the left and right limits, namely $\frac{1}{2}(\lim_{x\uparrow n} f(x) + \lim_{x\downarrow n} f(x))= 3/2$.

K. K. McDonald's plot is a nice sketch, assuming $T=1.$

Please also see another example.

mjw
  • 8,647
  • 1
  • 8
  • 23