What happens in a two lens system with two converging lenses when the object is placed at the focus of the first lens? I was working on my physics homework when I incorrectly copied part of a table for an optics problem with a two lens system, and I found myself trying to find the total magnification of a system of two converging lenses with the object at the focal length of the first lens. I found the final image distance by treating the first image distance as if it were infinity, leading the second image distance to be the second focal length. I'm not sure that's right in this case. The final part of the question was to calculate the total magnification, which gave me an expression that looked like 

$M=m_1m_2=(\frac{i_1}{p_1})(\frac{i_2}{p_2})=(\frac{\infty}{f_1})(\frac{f_2}{\infty}).$

Did I do something wrong? What is the physical result of this setup?
 A: For all of these specific, weird cases, I usually start by getting a general solution. I make the solution as direct as possible: derive the expressions that spit out the required outputs straight from the given inputs. Then I plug in the numbers for the weird case and see what happens.
For the first lens, image position and image size are given by:
$$
s_1' = - \frac{f_1 s_1}{f_1-s_1}
$$
$$
h_1' = - \frac{h_1 s_1'}{s_1}
$$
For the second lens at distance $d$, object position and size are:
$$s_2 = d - s_1' = d + \frac{f_1 s_1}{f_1-s_1}$$
$$h_2 = h_1' = - \frac{h_1 s_1'}{s_1}$$
So image position and size are:
$$
s_2' = - \frac{f_2 s_2}{f_2-s_2} = \frac{d f_{1} f_{2} - {\left(d - f_{1}\right)} f_{2} s_{1}}{d f_{1} - f_{1} f_{2} - {\left(d - f_{1} - f_{2}\right)} s_{1}}
$$
$$
h_2' = - \frac{h_2 s_2'}{s_2} = -\frac{f_{1} f_{2} h_{1}}{d f_{1} - f_{1} f_{2} - {\left(d - f_{1} - f_{2}\right)} s_{1}}
$$
Finally, total magnification is:
$$
m = \frac{h_2'}{h_1} = -\frac{f_{1} f_{2}}{d f_{1} - f_{1} f_{2} - {\left(d - f_{1} - f_{2}\right)} s_{1}}
$$
The weird case you're interested in is when $s_1 = f_1$. Let's plug it into the equations:
$$ s_2' = f_2 $$
$$ h_2' = - \frac{f_2 h_1}{f_1} $$
$$ m = - \frac{f_2}{f_1} $$
So it would seem that the system should work without any weird infinities after all. Interesting.
Some notes
Technically, I used simplifications that can hide a division by zero. A more proper way of doing all this would be to keep the ugly expressions as they are, without canceling out potential zeros:
$$ s_2' = \frac{{\left(d + \frac{f_{1} s_{1}}{f_{1} - s_{1}}\right)} f_{2}}{d - f_{2} + \frac{f_{1} s_{1}}{f_{1} - s_{1}}}$$
$$ h_2' = -\frac{f_{1} f_{2} h_{1}}{{\left(d - f_{2} + \frac{f_{1} s_{1}}{f_{1} - s_{1}}\right)} {\left(f_{1} - s_{1}\right)}}$$
$$ m = -\frac{f_{1} f_{2}}{{\left(d - f_{2} + \frac{f_{1} s_{1}}{f_{1} - s_{1}}\right)} {\left(f_{1} - s_{1}\right)}}$$
Plugging in $s_1 = f_1$ directly will now properly lead to divisions by zero so we can't do it. What we can do, however, is calculate the limit of these expressions as $s_1$ approaches $f_1$, which leads to the exact same solution as before.
BTW, I used SageMath for all of this. I'd rather not do it by hand.
