# How can I show that the equation holds?

Suppose we have the following data:

1. $$r=\frac{vk}{h^2}$$

2. $$u[i,j]$$ is a function of two variables with $$i,j$$ integers.

3. $$\frac{u[i,j+1]-u[i,j]}{k}=v\frac{u[i+1,j]-2u[i,j]+u[i-1,j]}{h^2}$$

Then I would like to show using Mathematica that the following equation is true:

$$u[i,j+1]=(1-2r)u[i,j]+r(u[i+1,j]+u[i-1,j])$$

This is trivial to do by hand but when it comes to prove it with Reduce, it get nowhere...more precisly I give the following commands:

r=v k/h^2;

u[i_,j_];

(u[i,j+1]-u[i,j])/k==v (u[i+1,j]-2 u[i,j]+u[i-1,j])/h^2;

Reduce[u[i,j+1]=(1-2 r) u[i,j]+r (u[i+1,j]+u[i-1,j])]


And what I get are strange messages....Can someone tell me what I am doing wrong or propose a better way to do that? Thanks.

ClearAll[r, i, j, u, v, k, h]

True