SECTION III.     A Singular Isothermal Sphere Lens With Shear (At Origin)

    This section provides the step by step analytical solution for the image positions and magnifications in the case of an SIS lens with shear at the origin.  It then uses these calculations for comparison to demonstrate how to use gravlens to obtain such a solution.

Part 1. Analytical Analysis

    This exercise is very much like the one in the previous section except this time we will consider shear,Gamma.  The images produced by the lens in this case are defined by the equations:
(1) u Coordinate Position Equation
(2) v Coordinate Position Equation
where (u, v) specifies the source position and (x, y) specifies the image position.

To calculate the magnification of each image, we must solve the magnification tensor
(3) Magnification Tensor
for
(4) Determinant Equation
where Alpha (x) and Alpha (y) are defined as:
(5) Alpha (x) Definition
(6) Alpha (y) Definition

The derivatives of Alpha (x) and Alpha (y) are:
(7) Derivative of Alpha x in terms of x
(8) Derivative of Alpha x in terms of y
(9) Derivative of Alpha y in terms of x
(10) Derivative of Alpha y in terms of y

For the sake of simplicity, we will convert to polar coordinates and then solve the tensor.  It might be beneficial to check the polar results by solving for the magnification in terms of Cartesian coordinates; however, we leave that as an exercise for the reader.
(11) Polar Coordinate Conversions
<GRAPH IN POLAR COORDINATES>

(12) Polar Derivative of Alpha x in terms of x
(13) Polar Derivative of Alpha x in terms of y
(14) Polar Derivative of Alpha y in terms of x
(15) Polar Derivative of Alpha x in terms of x

(16) Polar Coordinate Magnification Tensor

(17) Polar Magnification Tensor Determinant

This equation demonstrates that the images which lie on the same axis will have the same magnifications. 


To solve these equations we will assume a value of 0.1 since that is a somewhat common value for shear.
(18) Gamma Value
Also, we will assume the value for the deflection angle or Einstein radius is the same as that in the previous SIS example:
(19) Einstein Radius Value
and the source is at the origin so
(20) Source Position Coordinate Values

The four images will form a cross with this set up.  To solve for the image positions we first set x = 0 and solve for y
(21) u Coordinate Position Solution
(22) Equation for y Coord of Image Position Solution #1

We then set y = 0 and solve for x
(23) v Coordinate Position Solution
(24) Equation for x Coord of Image Position Solution #2

Note that because the equation is for the absolute value of yBeta must always be either positive or negative so it will always produce a positive value:
(25) Image Position Solution #1
and
(26) Image Position Solution #2
Thus, the images are at:
(27) Image Position Results

We can now easily solve for the two magnications.  For the two images that lie on the y-axis (x = 0):
(28) Polar Image Angle Definition #1
so the magnification of these two images is:
(29) Image Magnification Solution #1
For the other two images, which lie on the x-axis (y = 0):
(30) Polar Image Angle Definition #2
so the magnification of these images is:
(31) Image Magnification Solution #2

Part 2. Gravlens Analysis

        Now, we can use the gravlens software to obtain the same results.  This time the input file will differ slightly in that the shear, Gamma, represented by p[6]in the model, will have a value of 0.1. 
   In this example, the source is assumed to be at the origin.  The Cartesian coordinates that define the source position are given by:
u = 0.00
v = 0.00

Thus, the input file for this run must contain the following information:
   startup 1 1
     0 0 0 0 0 0 0 0 0 0
   findimg 0.00 0.00


Now to use gravlens to perform this run, at the prompt we enter the command:
> gravlens <file>

There will be a number of warnings generated by the code.  These can simply be ignored.  Thus, the software will return:
findimg results:
0.000000e+000 0.000000e+000  # source
# 5 images:
-2.231923e-012 -7.990992e-012 8.167932e-008
-5.230776e-015 -6.362636e-001 -4.546169e+000
8.119611e-021 6.362636e-001 -4.546169e+000
-7.776778e-001 -7.062582e-020 5.556270e+000
7.776778e-001 -7.062590e-020 5.556270e+000

These results will contain a fifth "ghost" image which can be ignored.  It will lie very close to the origin and will have an extremely low magnification.  This "image" is produced due to part of the code which attempts to smooth out the transition in finding the images.

/\_INTRODUCTION_/\
< SECTION II
SECTION IV>