I have an equation:
$\cos \left(\sqrt{\left(x_f-x_i\right){}^2+\left(y_f+y_i\right){}^2}\right)$
where $x_i$ and $y_i$ are constants, that gives the following graph as a function of $x_f$ and $y_f$:
where, at some constant position $x_f$ the 2D graph of the equation as a function of $y_f$ gives the $z$ height like the following:
I am trying to find a way to write an integral (unsolved) that represents the height $z$ as a function of the location $(x_f, y_f)$ and the initial values $(x_i, y_i)$ where the $y_i$ value goes from $0$ to $l$.
$\sum _{i=1}^n \text{Cos}\left[\sqrt{\left(x_f-x_i\right){}^2+\left(y_f-\text{$\Delta $y} i\right){}^2}\right.$ where the limit of n goes to infinity.
And for the integral, I have:
$\int _0^l\cos \left(\sqrt{\left(x_f-x_i\right){}^2+\left(y_f-dy\right){}^2}\right)$$dy$,
but I don't think this is the correct way to write it. Does anybody know how it is that I can write this integral in terms of what I am trying to accomplish? Thanks.

