- #1

- 94

- 0

## Homework Statement

hello, so I've got a couple of problems I need someone to kind of check over because on one of them, I'm not sure if it's correct, and then the other looks to be incorrect.

For problem 1, we have a 2[tex]\pi[/tex] periodic function where f(x) = xsin(x)

For the second problem, I need to use sine expansion on f(x) = (1+cos([tex]\pi[/tex]x))*sin([tex]\pi[/tex]x)

## Homework Equations

cosine expansion = [tex]\left.a_{0}+\sum^{\infty}_{k=1}a_{k}cos(\frac{kx\pi}{p})[/tex]

sine expansion =[tex]\left.\sum^{\infty}_{k=1}b_{k}sin(\frac{kx\pi}{p})[/tex]

trig identities:

[tex]\left.2cos(a)sin(b)= sin(a+b) - sin(a-b)[/tex]

[tex]\left.2sin(a)sin(b)= cos(a-b) - cos(a+b)[/tex]

## The Attempt at a Solution

For [tex]\left.f(x) = xsin(x)[/tex]:

It's an even function so I can use cosine expansion,

so [tex]a_{0}[/tex] would be:

[tex]\left.a_{0}=\frac{1}{\pi}\int^{\pi}_{0}xsin(x)[/tex]

doing integration by parts I get

-xcosx+sinx

after evaluating I get

[tex]\left.a_{0}=-1[/tex]

Now for [tex]\left.a_{k}[/tex]:

[tex]\left.a_{k}=\frac{2}{\pi}\int^{\pi}_{0}xsin(x)cos(kx)[/tex]

using trig identities for sin(x)cos(kx),

2sin(x)cos(kx)=(sin(kx+x)-sin(kx-x))

So now the integral becomes:

[tex]\left.a_{k}=\frac{1}{\pi}\int^{\pi}_{0}xsin((k+1)x)-xsin((k-1)x)[/tex]

after the integration by parts I have:

[tex]\left.a_{k}=\frac{1}{\pi}(\frac{-xcos((k+1)x)}{k+1}+\frac{xcos((k-1)x)}{k-1}+\frac{sin((k+1)x)}{\left(k+1\right)^{2}}-\frac{sin((k-1)x)}{\left(k-1\right)^{2}})\right|^{\pi}_{0}[/tex]

now when I evaluate it, the sin terms will be zero and the only terms I get are these two:

[tex]\left.\frac{-xcos((k+1)x)}{k+1}+\frac{xcos((k-1)x)}{k-1}[/tex] when evaluated at [tex]\pi[/tex]

now I simplified it by simply saying the cos will alternate between 1 and -1 depending on k and so I had the two terms reduced to:

[tex]\left.\frac{-1^{k}\pi}{k+1}+\frac{-1^{k+1}\pi}{k-1}[/tex]

so [tex]\left.a_{k}=\frac{1}{\pi} * \left(\frac{-1^{k}\pi}{k+1}+\frac{-1^{k+1}\pi}{k-1}\right)[/tex]

so my fourier series will be:

[tex]\left.-1+\sum^{\infty}_{k=1}(\frac{-1^{k}}{k+1}+\frac{-1^{k+1}}{k-1})cos(\frac{kx\pi}{p})[/tex]

Please let me know if this looks correct Thanks!!!

For the second one, I first simplified f(x) by saying:

[tex]\left.\left(1+cos\left(\pi *x\right)\right)sin\left(\pi*x)= sin(\pi * x)+ cos(\pi*x)sin(\pi*x)[/tex]

so for the [tex]b_{k}[/tex]:

[tex]\left.b_{k}= 2\int^{1}_{0}\left(sin(\pi * x)+ cos(\pi*x)sin(\pi*x)\right)*sin\left(\pi * x\right)dx[/tex]

I split the integral up so:

[tex]\left.b_{k}= 2\int^{1}_{0}sin\left(\pi * x\right)*sin\left(\pi * kx\right)dx + 2\int^{1}_{0}cos\left(\pi*x\right)sin\left(\pi*x\right)*sin\left(\pi * kx\right)dx[/tex]

So I use a couple of trig identities where

[tex]\left.2sin\left(\pi *x\right)sin\left(\pi *kx\right)= cos\left((k-1)\pi *x\right)-cos\left((k+1)\pi *x\right)[/tex]

and

[tex]\left.2cos(\pi* x)sin(\pi *x) = sin(2 \pi *x)[/tex]

then:

[tex]\left.2sin(2 \pi *x)sin(k \pi *x) = cos((k-2)\pi *x) - cos((k+2) \pi *x)[/tex]

so now our [tex]b_{k}[/tex] becomes:

[tex]\left.b_{k}= 2\int^{1}_{0}cos\left((k-1)\pi *x\right)-cos\left((k+1)\pi *x\right)dx + \frac{1}{2}\int^{1}_{0}cos((k-2)\pi *x) - cos((k+2) \pi *x)dx[/tex]

so lastly I do all the integration and got:

[tex]\left.\left(\frac{sin((k-1) \pi *x)}{(k-1)\pi}-\frac{sin((k+1)\pi *x)}{(k+1)\pi}+\frac{1}{2}\left(\frac{sin((k-2) \pi *x)}{(k-2)\pi}-\frac{sin((k+2)\pi *x)}{(k+2)\pi}\right)\right)\right|^{1}_{0}[/tex]

So here's my problem with this second exercise, all the terms goto zero since they have [tex]\pi[/tex] terms and so I'm confused(maybe I did my integrations wrong, or trig identities wrong).

Thanks to whoever decideds to help and read this long post!!!!

Last edited: