simple calculus question

• Aug 15th 2012, 07:57 AM
simple calculus question
Hi guys,

I have a simple calculus question, (so simple it's actually embarrassing(Worried))
$\mbox{if we have: } p(D_i,D_i^* \mid \Psi) = \frac{1}{4w_i} sech^2(\frac{D_i^* - D_i}{2w_i})$
$\mbox{then: }\sum\limits_{i=1}^{N}log \frac{\int_{d_i}^{\infty} p(D_i, D_i^* \mid \Psi) dD^* }{\int_{0}^{d_i} p(D_i, D_i^* \mid \Psi) dD^* } = \sum\limits_{i=1}^{N}w_i (d_i - D_i)$
But I can't get that result!!!
Can anyone show me the intermediate steps please?
• Aug 15th 2012, 12:34 PM
Vlasev
Re: simple calculus question
I assume that you are integrating with respect to $D_i^*$. You mostly need the following identities

$\int p(D_i,D_i^* | \Psi ) dD_i^* = \frac{1}{2}\tanh\left(\frac{D_i^*-D_i}{2w_i}\right)$
$\tanh(x) = \frac{e^x-e^{-x}}{e^x+e^{-x}}$

Then you find the limit as $D_i^*\to \infty$. It is 1/2 or -1/2 depending on whether $w_i>0$ or not. Suppose that $w_i>0$. Then

$\int_{d_i}^{\infty} p(D_i,D_i^* | \Psi ) dD_i^* = \frac{1}{2}\left(1-\tanh\left(\frac{d_i-D_i}{2w_i}\right)\right)$

The integral in the denominator is

$\int_{0}^{d_i} p(D_i,D_i^* | \Psi ) dD_i^* = \frac{1}{2}\left(\tanh\left(\frac{d_i-D_i}{2w_i}\right) - \tanh\left(\frac{-D_i}{2w_i}\right)\right)$

Converting to trigonometric form, the top integral becomes

$\int_{d_i}^{\infty} p(D_i,D_i^* | \Psi ) dD_i^* = \frac{2 e^{D_i/w_i}}{e^{d_i/w_i}+e^{D_i/w_i}}$

and the bottom integral becomes

$\int_{0}^{d_i} p(D_i,D_i^* | \Psi ) dD_i^* = \frac{2 \left(e^{d_i/w_i}-1\right) e^{D_i/w_i}}{\left(e^{D_i/w_i}+1\right)\left(e^{d_i/w_i}+e^{D_i/w_i}\right)}$

The fraction of these simplifies to

$\frac{\int_{d_i}^{\infty} p(D_i,D_i^* | \Psi ) dD_i^*}{\int_{0}^{d_i} p(D_i,D_i^* | \Psi ) dD_i^*} = \frac{e^{D_i/w_i}+1}{e^{d_i/w_i}-1}$

The whole sum is now equal to

$\sum_{i=1}^N \log \left(\frac{e^{D_i/w_i}+1}{e^{d_i/w_i}-1}\right)$

I'm not sure how one can proceed from here.
• Aug 16th 2012, 11:09 AM
Re: simple calculus question
Thank you Vlasev,

I am getting quite similar results to yours, which is obviously different the one I expected!
My original reference is the appendix section of this paper:
http://carlos-hernandez.org/papers/hernandez_cvpr07.pdf

The authors are quite well known in their field and the paper was published in a very high ranked conference, so I will be very surprised if their calculation is wrong.
• Aug 16th 2012, 09:53 PM
Vlasev
Re: simple calculus question
Even thought they are well-known and the conference is highly-ranked, it's not guarantee that there won't be any mistakes. I'd say that there will be more mistakes in places where a derivation should be "obvious". The referees will probably not check. As for this, I don't know whether it's wrong or not.

Edit: I think their identity might well be wrong.