Find a number $N \in \mathbb{N}$ such that $|f(x) - \sum_{n=0}^{N}| \leq 0.1$. Trouble with minus-sign.

55 Views Asked by At

The function $f(x) = |x|, x\in [-\pi, \pi[$ has the Fourier series $$f(x) = \frac{\pi}{2}- \frac{4}{\pi}\sum_{n=1}^\infty \frac{\cos\Big((2n-1)x\Big)}{(2n-1)^2} $$ Find a number $N \in \mathbb{N}$ such that the difference between $f(x)$ and the N'th partial sum $S_N(x) = \sum_{n=1}^{N} \frac{\cos\Big((2n-1)x\Big)}{(2n-1)^2} $ is less than $0.1$ for all $x$. Also find $N_2$ such that the difference is less than $0.01$.

Solution

$N=4$ for $0.1$. $N_2= 33$ for $0.01$.

Attempt

The integral criterium says that $|f(x) - S_N(x)| \leq \displaystyle\int_{N}^{\infty} f(x) \: dx$.

Setting $f(n)= - \frac{4}{\pi}\frac{\cos\Big((2n-1)x\Big)}{(2n-1)^2}$ and considering the "worst case scenario" $x=0$ (I think) we get this inequality.

$$\int_{N}^\infty \frac{-4}{\pi(2n-1)^2} \: dn \leq 0.1 $$ $$\frac{-2}{\pi(2N-1)} \leq 0.1$$

Solving this with respect to $N$ yields $N<-2.6$ which doesn't make sense.

However, if I remove the minus-sign, such that we have $\frac{2}{\pi(2N-1)} \leq 0.1$ I get $N>3.6$ so $N=4$ which matches the solution.

But how do I justify removing the minus-sign? I don't think I've defined $f(n)$ wrong.

1

There are 1 best solutions below

0
On BEST ANSWER

Well, notice that we always have:

$$-1\le\cos\left(x\right)\le1\tag1$$

So, when you apply integral criterium we need to solve:

$$\int\limits_{\text{N}}^{\infty}-\frac{4}{\pi}\cdot\frac{-1}{\left(2\text{n}-1\right)^2}\space\text{dn}\le\frac{1}{10}\space\implies\space\text{N}\ge\frac{10}{\pi}+\frac{1}{2}\approx3.6831\space\implies\space\text{N}=4\tag2$$ $$\int\limits_{\text{N}}^{\infty}-\frac{4}{\pi}\cdot\frac{-1}{\left(2\text{n}-1\right)^2}\space\text{dn}\le\frac{1}{100}\space\implies\space\text{N}\ge\frac{100}{\pi}+\frac{1}{2}\approx32.331\space\implies\space\text{N}=33\tag3$$

In general we get:

$$\int\limits_{\text{N}}^{\infty}-\frac{4}{\pi}\cdot\frac{-1}{\left(2\text{n}-1\right)^2}\space\text{dn}\le\text{k}\space\implies\space\text{N}\ge\frac{1}{\pi\text{k}}+\frac{1}{2}\space\implies\space\text{N}=\left\lceil\frac{1}{\pi\text{k}}+\frac{1}{2}\right\rceil\tag4$$