Please can someone look at this working (see attached).

The equation in question is [43]. It is highlighted with a red border.

The numerical answers in the pdf are correct and have been verified against published material.

That being said, I believe there must be a problem with equation [43] as I am not getting the same answers. I don't know how the algebra was simplified etc. to get to [43].

I have inputted [43] as it is in matlab and get incorrect results:

Code (Text):

function [y] = inf_res_hex_odd(x,y,m,n)
y = ((1)/(4*(pi^2)))*((3-2*cos(y).*cos(m*x+n*y)-cos((m-1)*x+n*y))./(4-cos(y).*(cos(y)+cos(x))));
end

Example:

There are 2 possibilities:
1) I made a mistake in my matlab function, or,
2) There is a mistake/typo in [43]

If anyone can offer any help with this I would be really appreciative.

Don't expect people to look up MatLab syntax and command(s).

Type the equation in Latex so people can see it. What variables do you put in for x,y,m, and n? (I (and maybe others) don't know MatLab syntax/command(s) so don't know what the (x,y,1,0... -pi,pi,-pi,pi) stuff means, although it looks like ranges of evaluation)

In addition, your formatting was sloppy/lazy: there are more ))) on the one side of 1/4pi^2 than there are on the other. How is someone supposed to understand what you actually want?

Something like:
[tex]f(x,y,m,n)=\frac
{\frac {1} {4 \times \pi^2} \times \left ( 3-2 \times \cos{y} \right)
\times \cos \left( m \times x + n \times y \right ) - \cos \left ( \left (m-1 \right ) \times x + n \times y \right)}
{\left ( 4-\cos{y} \right ) \times \left (\cos{y} + \cos{x} \right ) } [/tex]