1. A ladder simultaneously leans against a 4.0m wall and a tall building that is 1.0 m behind the wall. Find the length of the shortest ladder that can be used. How high against the building will the leader reach in this case?

Do the optimization in terms of the angle that the ladder makes with the ground.

Diagram:

So basically I am asked to express both L1 + L2 in terms of theta where L = L1 + L2 andtheta = u

Using similar triangles:

4/x = h/x+1

and:

L1 = 4/sin u

L = h/sin u

L2 = h/sin u - L1

If I am going about this correctly what should I do next? I mean I'm at a complete loss here as there are just too many unknowns and I know that in optimization you should reduce the variable to just one which would be theta. How would I go about in doing this?