Take the 2-minute tour ×
MathOverflow is a question and answer site for professional mathematicians. It's 100% free, no registration required.

Hi,

I'm trying to employ Mercer's theorem on the kernel $k(x,y)=\min(x,y)$. It is known (and easy to verify) that this is a nonnegative-definite kernel over $[0,T]$ for any $T>0$.

Fix $T>0$. Let's calculate the eigenfunctions of the transformation $ \mathscr T_kf=\intop_{0}^T k(x,y)f(y)dy$:

$$ \lambda\psi(x)=\intop_{0}^T \min(x,y)\psi(y)dy=$$ $$ \intop_{0}^x \min(x,y)\psi(y)dy - \intop_{T}^x \min(x,y)\psi(y)dy=$$ $$ \intop_{0}^x y\psi(y)dy - x\intop_{T}^x \psi(y)dy\implies$$ $$ \lambda\psi'(x)= x\psi(x)-x\psi(x)-\intop_{T}^x \psi(y)dy\implies$$ $$ -\lambda\psi''(x)= \psi(x)\implies$$ $$\psi(x)=C_1\sin\frac x {\sqrt\lambda} + C_2\cos\frac x {\sqrt\lambda}$$

it seems like we're allowed to pick $C_1=1$ and $C_2=0$. So we pick $\psi_n(x)=\sin nx $ and $\lambda_n = n^{-2}$. Then Mercer's theorem actually says that we should get: $$ \min(x,y)=\sum_{n=1}^\infty n^{-2}\sin nx\sin ny$$

this all seem very nice, but when evaluating this numerically, it doesn't work. I tried also to normalize $\psi$ by dividing by its norm which is $\sqrt {\frac 1 {4n} (2nT-\sin2nT)}$, and it didn't help.

I also tried to substitute the original solution with $C_1,C_2$ in the original eigenvalue problem equation, and then to calculate $C_1,C_2$, but they turned out to depend on $x$, which is of cource unacceptable.

So what's wrong here?

I also asked the question on http://math.stackexchange.com/questions/272857/elaborating-mercers-theorem-rkhs-on-cameron-martin-space-kx-y-minx-y, but no answers there. I'll post in either forum immediately if an answer will come.

share|improve this question
    
Seems to be a bug in your numerics... Calculations look fine and my plots also... –  Dirk Jan 8 '13 at 21:42
    
wow that's amazing. you actually got $ \min(x,y)=\sum_{n=1}^\infty n^{-2}\sin nx\sin ny$? –  Ohad Asor Jan 8 '13 at 21:50
    
here's my code: ## #include <iostream> #include <cmath> using namespace std; long double phi(double x, double n) { return sin(n*x)/n; } int main(int, char**) { long double sum = 0, x=8,y=1; for (long double n = 1;n< 100000;n++) { sum += phi(x,n)*phi(y,n); if (((int)n)%1000) cout<<n<<' '<<sum<<endl; } return 0; } ## –  Ohad Asor Jan 8 '13 at 22:01
    
Seems like I did not look careful enough on my mesh plot... Sorry. –  Dirk Jan 8 '13 at 22:26
add comment

2 Answers

up vote 3 down vote accepted

What Branimir Ćaćić writes is correct. Another way to see that your $\lambda$'s where not right is as follows:

From $$\lambda\psi(x) = \int_0^x y\psi(y) dy + x\int_x^T \psi(y)dy$$ you get that $ $$\psi(0)=0.$$

Similarly, from $$\lambda\psi'(x) = \int_x^T \psi(y)dy$$ you get $$\psi'(T)=0.$$

Hence, you have two boundary conditions for the differential equation $\lambda\psi''(x) = -\psi(x)$. The first forces $C_2=0$, the second gives $$\lambda = \frac{T^2}{\pi^2(n+\tfrac{1}{2})^2}$$ ($T/\sqrt{\lambda}$ has to be a root of $\cos$) and no condition on $C_1$. Since you want an orthonormal basis, you have to normalize the functions in $L^2([0,T])$ which gives $C_1=\sqrt{2/T}$.

What you are missing in your numerics is that the series starts with $n=0$ and hence, your result differs from $\min(x,y)$ by $\psi_0(x)\psi_0(y) = \sin(\tfrac{\pi x}{2T})\sin(\tfrac{\pi y}{2T})$.

share|improve this answer
    
now it really works :) –  Ohad Asor Jan 9 '13 at 10:22
add comment

If my chalkboard scribblings are correct, if $f(x) = \cos(\alpha x)$ and $g(x) = \sin(\alpha x)$ for $\alpha \neq 0$, then $$ \mathscr{T}_k f(x) = \alpha^{-2}(f(x) + \alpha x\sin(\alpha T) - 1), \quad \mathscr{T}_k g(x) = \alpha^{-2}(g(x) - \alpha x \cos(\alpha T))$$ (up to some inconsequential signs), so that your orthonormal basis of eigenfunctions is $$ \psi_k(x) = \sqrt{\frac{2}{T}} \sin\left(\frac{\pi(k+\tfrac{1}{2})}{T}x\right) $$ with corresponding eigenvalues $$ \lambda_k = \frac{T^2}{\pi^2(k+\tfrac{1}{2})^2}. $$ Hence, $$ k(x,y) = \sum_{k=0}^\infty \frac{2T}{\pi^2(k+\tfrac{1}{2})^2} \sin\left(\frac{\pi(k+\tfrac{1}{2})}{T}x\right) \sin\left(\frac{\pi(k+\tfrac{1}{2})}{T}y\right).$$ I hope this works!

share|improve this answer
    
Thanks for your help! Unfortunatly, this doesn't work as well. Here's my code: #include <iostream> #include <cmath> using namespace std; long double phi(long double x, long double n, long double t = 2) { static long double pi = acos((long double)-1); return sin((n+.5)*pi*x/t)*sqrt(t*2.)/(pi*(n+.5)); } int main(int, char**) { long double sum = 0, x=.8,y=.3; for (long double n = 1;n< 100000;n++) { sum += phi(x,n)*phi(y,n); if (((int)n)%1000) cout<<n<<' '<<sum<<endl; } return 0; } –  Ohad Asor Jan 9 '13 at 8:56
add comment

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.