1
$\begingroup$

FourierSinCoefficient works normally like this and the result is checked with Integrate.

FourierSinCoefficient[Sin[2x], x, n]
(*  DiscreteDelta[-2 + n] *)

Integrate[2/Pi Sin[2x] Sin[2x], {x, 0, Pi}]
(*  1   *)

Q. Another try is in a stange behavior. I expect the following result is made with ConditionalExpression or Piecewise But that is 0 without n.

FourierSinCoefficient[(Sin[x] + Sin[2x]), x, n]
(*  0   *)

I think that's result might be Piecewise[{{1, n == 1 || n == 2}, {0, True}}].

Contrastively, FourierCoefficient works normally like this.

FourierCoefficient[(Sin[x] + Sin[3 x]), x, n]

(* Piecewise[{{-I/2, n == 1 || n == 3},{I/2, n == -3 || n == -1}}, 0] *)
$\endgroup$
  • $\begingroup$ When I evaluate Integrate[(2/Pi) Sin[2*x] Sin[n*x], {x, 0, Pi}], I get: $$\frac{4 \sin (\pi n)}{\pi \left(n^2-4\right)}$$. (Mathematica 10.0.2) $\endgroup$ – Mahdi Jun 23 '15 at 17:34
  • $\begingroup$ @Mahdi yes Q2 is my mistake:) sorry. $\endgroup$ – Junho Lee Jun 23 '15 at 21:56
1
$\begingroup$

I'm not sure if this helps. I think the problem can be traced back to this simple case.

Let

f[n_] := Sin[n \[Pi]]/(\[Pi] n)

This should Simplify[] to DiscreteDelta[n]. But at least I have found no way to accomplish this.

Let us investigate the function.

For Mathematica f[n] it is zero for any integer because of the Sin:

Simplify[f[n], n \[Element] Integers]

(* Out[128]= 0 *)

The case n==0 has slipped through.

For n->0 we have

f[0]

During evaluation of In[129]:= Power::infy: Infinite expression 1/0 encountered. >> During evaluation of In[129]:= Infinity::indet: Indeterminate expression 0 ComplexInfinity encountered. >>

(* Out[129]= Indeterminate *)

So we have to take the limit

Limit[f[n], n -> 0]

(* Out[130]= 1 *)

Relevant in the present case is

c[n_, a_] = FourierSinCoefficient[Sin[a x], x, n]

(*
Out[146]= (2 (-1)^n n Sin[a \[Pi]])/(a^2 \[Pi] - n^2 \[Pi])
*)

For integers a and n this should Simplify[] to DiscreteDelta[n-a]. But again, it doesn't.

But the value is infact DiscreteDelta[n-a]

Table[{aa, 
   Limit[Table[{DiscreteDelta[n - aa], c[n, a]}, {n, 1, 3}], a -> aa]}, {aa, 1, 3}]

(* {
{1, {{1, 1}, {0, 0}, {0, 0}}}, 
{2, {{0, 0}, {1, 1}, {0, 0}}}, 
{3, {{0, 0}, {0, 0}, {1, 1}}}
} *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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