Given an orthogonal rectangle with sides a and b, what rotations $\theta$ result in a bounding box with maximum height c.q. width?
I hope this is formulated correctly. By bounding box, I mean the smallest orthogonal rectangle that contains each of the 4 corners of the inner rectangle after rotating this inner rectangle. I'm interested in the largest individual sides, not their area.
I believe this comes down to deriving the width and height of the resulting rectangle as a function of the given variables and maximizing those. Taking an example:
The sides of the resulting bounding box are given by $h = h_1 + h_2 = a \sin \theta + b \cos \theta$.
I'm unsure if there is a distinction between situation $a<b$ or not but I believe the result will be obtained in analogous manner regardless.
How would I in this example with $a<b$ maximize $h$?

The maximum height possible is the length of the diagonal. This occurs when the diagonal is verticle. $$h_{max}=\sqrt{a^2+b^2}$$