Hi,
in[1]= r = Integrate[Sin[m x] Sin[n x], {x, 0, 2 Pi}]
out ....
in[2]= % /. m->2
out...
in[3]= Limit[%, n->2]
out Pi
Amir Speicher
"steve_H" <nma124 at hotmail.com> wrote in message
news:c0ftbt$c7p$1 at smc.vnet.net...
> I type:
>
> r = Integrate[Sin[m x] Sin[n x], {x, 0, 2 Pi}]
>
> then I type
>
> r /. {n -> 2, m -> 2}
>
> I get error (1/0 expression encountered) and no result.
>
> but when I let m=2 and n=2 right into the integral first, it works:
>
> r = Integrate[Sin[2 x] Sin[2 x], {x, 0, 2 Pi}]
>
> and I get Pi as expected.
>
> I wanted to integrate this once, and try the output for different n,m.
>
> I did not think it will make a difference as to when I replace m and n
> by their numerical values, but Mathematica disagrees.
>
> I know Mathematica is correct in this, since it is clear from the result
> of the integration why I get 1/0. But it seems to me I should
> get the same result if I replace m,n inside the integral before
> the integration operation starts, or replace them afterwords.
>
> For example, when I type
>
> Integrate[Sin[m x], {x, 0, Pi}]
> % /. m -> 4
>
> I get zero.
>
> and when I replace m with 4 inside the integral first, I get the same
> result as above:
>
> Integrate[Sin[4 x], {x, 0, Pi}]
> 0
>
>
> So, what do you think? is there something I am missing here?
>
> thanks
> Steve
>