Tell me more ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

share|improve this question
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. – Euler....IS_ALIVE Sep 9 '12 at 6:40
O to L. It alwys like that for Half Range Sine Series – David Sep 9 '12 at 6:48
But you wrote it as $-L$ to $L$ in your first definition of $b_n$.... – Euler....IS_ALIVE Sep 9 '12 at 6:49
this is the link for reference intmath.com/fourier-series/4-fourier-half-range-functions.php – David Sep 9 '12 at 6:49
I edited already – David Sep 9 '12 at 6:50
show 2 more comments

1 Answer

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.