0
$\begingroup$

I am attempting to find the fourier series for $f(x) = x\cos x$ for $-\pi < x < \pi$. The method is fine however I find that for $n = 1$ I am unable to evaluate the coefficient $b_1$.

$f(x) = \sum_{n=1}^{\infty}{b_n\sin(nx)}$ since $f(x)$ is an odd function.

Calculating my coefficients yields $$b_n = -\left(\frac{\cos((n+1)\pi)}{n+1}+\frac{\cos((n-1)\pi)}{n-1}\right)$$

This is clearly not defined at $n=1$, how should I proceed?

Note: this is an intermediary step in order to find the fourier series of $x(1+\cos x)$ if you wanted context.

$\endgroup$
3
  • 2
    $\begingroup$ Directly integrate $x\sin(x) \cos(x) $. $\endgroup$ Dec 15, 2020 at 21:32
  • $\begingroup$ @CameronWilliams ah - that would make sense :), how stupid of me. $\endgroup$
    – Governor
    Dec 15, 2020 at 21:35
  • 1
    $\begingroup$ Not stupid! It happens. Same issue with integrating $e^{i(n-m)}$ and evaluating at the endpoints. $\endgroup$ Dec 15, 2020 at 21:50

1 Answer 1

1
$\begingroup$

Your assertion comes from produt-to-sum formula $$\sin s\cos t=\frac12\sin(s+t)+\frac12\sin(s-t)$$

So the integrand of interest in the various passages is still $\frac12\sin((n+1)x)+\frac12\sin((n-1)x)$. The only difference is that for $n=1$ its antiderivative is no longer $-\frac{\cos((n-1)x)}{2(n-1)}-\frac{\cos((n+1)x)}{2(n+1)}$.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .