4
$\begingroup$

Question: It is known that $f(x)=(x−4)^2$ for all $x\in [0,4]$.

Compute the half range sine series expansion for $f(x)$.

My answer :

Half range series: $p=8$, $l=4$, $a_0=a_n=0$.

$$b_n=\frac{2}{L}\int_{0}^{L}f(x)\sin\left(\frac{n\pi x}L\right)d(x)=\frac{2}{4}\int_{0}^{4}(x-4)^2\sin\left(\frac{n\pi x}4\right)d(x)$$

Partial Differentiation Let $u=(x-4)^2$; $du=2(x-4)dx$; $v=\frac{-4}{n\pi}\cos(\frac{n\pi x}4)$

\begin{align} b_n&=\frac{1}{2}[\frac{-4}{n\pi}cos(\frac{n\pi x}4)(x-4)^2+\frac{8}{n\pi}\int(x-4)\cos(\frac{n\pi x}4)d(x)]|^4_0\\ &=\frac{1}{2}[\frac{-4}{n\pi}\cos(\frac{n\pi x}4)(x-4)^2+\frac{8}{n\pi}[\frac{4}{n\pi}\sin(\frac{n\pi x}4)(x-4)-\frac{4}{n\pi}\int\sin(\frac{n\pi x}4)d(x)]]|^4_0\\ &=\frac{1}{2}[\frac{-4}{n\pi}\cos(\frac{n\pi x}4)(x-4)^2$+$\frac{8}{n\pi}[\frac{4}{n\pi}\sin(\frac{n\pi x}4)(x-4)-\frac{4}{n\pi}(\frac{-4}{n\pi}\cos\frac{n\pi x}4)]|^4_0\\ &=\frac{1}{2}[\frac{-4}{n\pi}\cos(\frac{n\pi x}4)(x-4)^2$+$\frac{8}{n\pi}(\frac{16}{n^2\pi^2}\cos\frac{n\pi x}4)]|^4_0 \end{align}

we know $cosn\pi=(-1)^n$

$\frac{1}{2}[(0+\frac{128(-1)^n}{n^3\pi^3})-(-\frac{64}{n\pi}+\frac{128}{n^3\pi^3})$

$b_n=\frac{64(-1)^n}{n^3\pi^3}-\frac{64}{n^3\pi^3}+\frac{32}{n\pi}$

My teacher told me my $b_n$ is wrong and it seems that my working also looks like wrong. Can someone please help me to recalculate my $b_n$ please. Just help me once only guys.If I get this right I would able to get full marks.I would be very very grateful to you guys if you guys able to help me. If can suggest me any ideas or simpler way to solve it if you can.Thanks

  • 0
    Should $b_n$ be the integral from $-L$ to $L$ or the integral from $0$ to $L$ because it switches from the first line to the second line without any multiplicative factor.2012-09-09
  • 0
    O to L. It alwys like that for Half Range Sine Series2012-09-09
  • 0
    But you wrote it as $-L$ to $L$ in your first definition of $b_n$....2012-09-09
  • 0
    this is the link for reference http://www.intmath.com/fourier-series/4-fourier-half-range-functions.php2012-09-09
  • 0
    I edited already2012-09-09
  • 0
    Now that it is correct, I got the same answer as you did.2012-09-09
  • 0
    But my lecturer says wrong. If you check for Half range cosine series, i got $a_n=\frac{64(-1)^n}{n^2\pi^2}$ which my lecturer say correct for half range cosine series2012-09-09

1 Answers 1

1

The integral defining your $b_n$ is correct, but the final answer is wrong. It differs from mine by ${64\over n\pi}$.

Here's my work from Mathematica:

Mathematica graphics

Here's graphical verification that we are indeed computing the series correctly (I took the 5th, 10th, and 50th partial sum, respectively):

Mathematica graphics

  • 0
    Hi JohnD. I check out my lecturer he said mine is correct now. Maybe yours is correct too but in different form I think2013-05-29
  • 0
    Yes, they are algebraically equivalent.2013-05-29