Okay, so now I want to know what the effect gravitational lensing has on the distance to luminosity ratio and the distance to redshift ratio of stars and galaxies. I am not considering gravitational redshift in this yet, though, just that amount light will bend as it is emitted tangent from the surface of a star along the edges of our line of sight. Since the lines of sight across the edges of a star are not a straight line, then, we will see a little more of the surface area than we otherwise would as the path of the light bends slightly around the edge of the star, making it a little brighter than it would otherwise be. Since most of the bending occurs in the immediate vicinity of the star, that is where most of the curvature would take place, so the line of sight itself would be almost precisely the same as that for the straight-line tangent points from the observer, but I will still figure in an approximation for the difference with this as well when d/r is large, which is usually the case anyway, to be as close to precisely accurate as possible.

For a path of the light forming a hyperbola with the vertices at (a,0) and the focus at (c,0), the center of mass of the star will be at the focus at (c,0). We will place an observer at (x,y). Since we have placed the origin of the hyperbola at (0,0) in this case, the formula for the hyperbola is just x^2/a^2-y^2/b^2=1. c^2=a^2+b^2, so it becomes x^2/a^2-y^2/(c^2-a^2)=1. Also, since the vertice lies at the edge of the star, the radius is r=c-a, so the formula in terms of this now becomes x^2/(c-r)^2-y^2/(2cr-r^2)=1.

The distance of the center of mass from the observer is d=sqrt[(x-c)^2+y^2]. The original angle of the path of light is zero along the y axis from the vertice. To find the angle of the path the light is travelling when it reaches the observer, which is the total amount of curvature the light has undergone, we need to find the slope between points on the hyperbola at (x,y) and some infinitesimal distance along that path. This is where the approximation takes place, however, since the total amount of curvature would be found first at points approaching an infinite distance, but since most of the curvature occurs near the surface of the star, then if d is very much greater than r, which it would be in almost every case for an observer, then the discrepency would be tremendously small, even many, many times smaller than the difference in the curvature to straight line paths to begin with.

For a given y, x would be x=sqrt[1+y^2/(2cr-r^2)](c-r). For another point at y'=y+dy, x' would be x'=sqrt[1+(y+dy)^2/(2cr-r^2)](c-r). The angle the path has curved, then, isL=tan-1 [(x'-x)/(y'-y)] = tan-1 [sqrt(1+(y+dy)^2/(2cr-r^2))-sqrt(1+y^2/(2cr-r^2))(c-r)/dy], which for large d, and therefore large x and y, reduces to a very good approximation of justL=tan-1 [(c-r)/sqrt(2cr-r^2)]. So with a known c, r, x, and y, we can find the curvature, which would then tell us the mass of the object. Normally, one would start with the mass and find the curvature to find c, though, but we can work back and forth with it if the mass is known, to determine what c must then be.

Now, from this we can tell the angle of the path of the light as it reaches the observer from a line parallel with the x axis to be justL1=90-L. We can also find the total angle from the x axis at the observer to the center of mass withL2=tan-1 [(y-c)/x]. The difference in the angle from this last angle to that of the straight line tangent points isL3=sin-1 [r/d], and to the end of the hyperbola near the observer isL4=L2 -L1.

So the actual radius of the star is r=sin(L3)*d, so the radius across our line of sight is rT=sin(L3)*cos(L3)*d=r*cos(L3), but the curve of the hyperbola due to the lensing will make it appear as rL=sin(L4)*cos(L4)*d. The ratio of the area of sight, then, will be rL^2/rT^2. Now we need to find out how much of the surface area of the star is actually seen. For this, we know that the way this is set up, we can actually see all of the way around to (a,0) on one side, where the original angle at that point is zero. For the straight line tangent point on this same side, however, we can only see around to an angle that is cut short of that byL5=90 -L2 +L3. The angle between the tangent points around the circumference, then, isLT=180-2*L3, while the angle around the circumference for the lensing isLL=2*(90 -L3 +L5)=180 - 2*L3 + 180 - 2*L2 + 2*L3=360-2*L2 (L2 is nearly 90 degrees greater thanL3 the way I've done this, which is why there is a 180 degree difference in the formulas for the two).

From here we can find the surface area of the spherical cap on the surface of the star between each set of angles around the circumference. For the straight line tangent points, this is S=2pihr, where h=r-cos(90-L3)*r, so S=2pir^2*[1-cos(90-L3)], and for the curved path we get S'=2pih'r, where h'=r-cos(180-L2)]. The star is then brighter by the ratio of the areas for the line of sight and the ratio of the surface area seen than that of the straight line tangent. This gives us a total ratio between the two of

[rT^2/rL^2]*[S'/S]=

[sin(r/d) * cos(r/d)]^2 / [(sin[tan-1 ((y-c)/x) - 90 + tan-1 ((c-r)/sqrt(2cr-r^2))]) / (cos[tan-1 ((y-c)/x) - 90 + tan-1 ((c-r)/sqrt(2cr-r^2))])]^2 * [1-cos(180 - tan-1 ((y-c)/x))] / [1-cos(90 - sin-1 (r/d))]

This is the final formula, but before I continue on too much further with this, I'm going to try to plug in some quick values where d>>r to attempt to reduce this last formula as well in order to replace it with an extremely close approximation, so we'll have something a little easier to work with.