1

so I have a problem and I ALMOST have it, but get stuck at the very end (you'll see why)

so what we are given is a simple periodic function:

$f(t)\begin{cases}5\sin t & 0\leq t\leq\pi\\0 & \pi \leq t \leq 2\pi \end{cases}$

where $T=2\pi$ and $\omega=1$

I'm really uncomfortable using the even/odd shortcuts, because my teacher has done a very poor job explaining it all, so I just used the general formulae...

what I got was this:

$a_{n}=\frac{1}{\pi}\left[\int_{0}^{\pi}5 \sin t \cos (nt)+\int_{\pi}^{2\pi}0*\cos (nt) \right]$

and therefore only:

$a_{n}=\frac{5}{\pi}\left[\int_{0}^{\pi}\sin t \cos (nt) \right]$

using

$\sin(mt)\cos(nt) = \frac{1}{2}\left[\sin((m-n)t)+\sin((m+n)t)\right]$

we have:

$a_{n}=\frac{5}{2\pi}\left[\int_{0}^{\pi}\sin((m-n)t)+\int_{0}^{\pi}\sin((m+n)t) \right]$

$a_{n}=\frac{5}{2\pi}\left[\left(\left(\frac{-1}{1-n}\right)\cos((1-n)t)\right)_0^\pi+\left(\left(\frac{-1}{1+n}\right)\cos((1+n)t)\right)_0^\pi \right]$

$a_{n}=\frac{5}{2\pi}\left[\left(\left(\frac{-1}{1-n}\right)\left(-1-1\right)\right)+\left(\left(\frac{-1}{1+n}\right)\left(-1-1\right)\right) \right]$

$a_{n}=\frac{5}{2\pi}\left[\left(\frac{2}{1-n}\right)+\left(\frac{2}{1+n}\right) \right]$

$a_{n}=\frac{5}{\pi}\left[\frac{1+n+1-n}{1-n^{2}} \right]$

$a_{n}=\frac{10}{\pi}\left(\frac{1}{1-n^{2}} \right)$

I wont bore you with the $b_{n}$ coefficient as it comes up as zero...

>

ok, this is all fine and dandy so far... but once I need to actually apply it to the formulae

$f(t) = \frac{1}{2}a_{0}+\sum_{n=1}^\infty a_n\cos(nt)$

my coefficient immediately falls apart once you sub in $n=1$

I've looked over my work many times and the only thing I can think that I have have wrong was when I was subbing in $\pi$ and $0$ into my $\cos$ functions... where do I go from here?? or did I miss something completely??

--GD

Hyperplane
  • 11,659

2 Answers2

3

I list three things that went wrong.

Mistake 1. For $a_1$ you really need to do a seperate case since $\int \sin((1-n)t)\,dt\neq \frac{-1}{1-n}\cos((1-n)t)$ for $n=1$. We find $a_1$ as follows \begin{align} a_1&=\frac{1}{\pi}\int^\pi_0 5\sin(t)\cos(t)\,dt\\ &=\frac{5}{2\pi}\int^\pi_0 \sin(2t)\,dt\\ &=0 \end{align}

Mistake 2. As pointed out in the other answer $\cos(k\pi)=(-1)^k$.

Mistake 3. $b_n = 0$ for all $n\geq 2$ is true, but $b_1\neq 0$ , because: $$b_1 = \frac{1}{\pi}\int^\pi_0 5 \sin^2t\,dt>0$$ There is a positive integrand except on a null set.

You could know the last mistake by just noting that you cannot get only a cosine Fourier series when having a piecewise smooth function which is not even. So that should ring a bell. A theorem says so, which I think is given in every lecture about Fourier series. But I don't bother you with it if you don't know it.

Shashi
  • 8,738
  • ok, I see some mistakes there, thanks...

    but still have a problem, because $\int\sin((1-n)t) dt = \frac{1}{1-n}cos((1-n)t)$ and we still find outselves with that $\frac{1}{1-n^{2}}$ mess...

    as for the $\cos(k\pi)$ stuff, is that still applicable, since we have $(1+-n)$????

    – George Dimitriou Jan 27 '18 at 08:57
  • @GeorgeDimitriou I don't understand you well. Have you tried to do $a_1$ separately? Something like $a_1=......$ – Shashi Jan 27 '18 at 09:12
  • is it acceptable to omit a1 and then roll with all other values for n>1???...

    and is it acceptable to have only one value for bn??...

    sorry for the silly questions... Fourier series are new to me...

    – George Dimitriou Jan 27 '18 at 09:16
  • @GeorgeDimitriou it's not acceptable to ignore some terms. Maybe read the idea of Fourier series? However in this specific case we have $a_1=0$ (see my edit to the answer). And it's totally fine to have only one $b_n$. Does this help you? – Shashi Jan 27 '18 at 09:27
  • yeh it helps alot actually... I've mostly learned about Fourier series from Khan Academy and that was very useful, however I'm still unsure about when to apply the whole "x when n is even, y when n is odd" etc...

    from the help you have given me, I have been able to get my result down to:

    $f(t) = -\frac{5}{\pi}+\frac{5}{2\pi}\sin t-\frac{10}{\pi} \sum_{n=2}^\infty \left(\frac{1}{1-n^{2}}\right)\cos(nt)$

    hows this looking???

    also, do you have any resources to learn more about Fourier series?? any videos or reading material?? thanks heaps for your help so far... really appreciate it

    – George Dimitriou Jan 27 '18 at 11:40
  • @GeorgeDimitriou I didn't do the calculations so I can't know if it's good. You can check via wolfram alpha maybe. I don't have suggestions for study material. I studied fourier series as a part of functional analysis course. – Shashi Jan 27 '18 at 13:51
0

The step from

$$a_{n}=\frac{5}{2\pi}\left[\left(\left(\frac{-1}{1-n}\right)\cos((1-n)t)\right)_0^\pi+\left(\left(\frac{-1}{1+n}\right)\cos((1+n)t)\right)_0^\pi \right]$$

to

$$a_{n}=\frac{5}{2\pi}\left[\left(\left(\frac{-1}{1-n}\right)\left(-1-1\right)\right)+\left(\left(\frac{-1}{1+n}\right)\left(-1-1\right)\right) \right]$$

is wrong because $\cos(k \pi) = \begin{cases}-1:& k \text{ odd} \\ +1:& k\text{ even}\end{cases}$, but you just substitute $-1$ in any case.

Shashi
  • 8,738
Hyperplane
  • 11,659