Converting a word problem into an equation? Trignometry and calculus The problem is question 3 of what I am about to download into this question. I drew a diagram of what the problem actually is, my professor has verified it's correct. I don't want an exact answer to this question, just a way to convert question 3 into an equation so that I can use programming to solve. I have software I have created that can solve for zeros of functions and minimums of functions numerically.
I am thinking that this is a problem of looking for some type of maximum because we want the biggest ladder that can fit through. Is this correct?
It's probably a nooby question, but my trignometry is pretty rusty. I have a feeling it will be blatantly obvious
 A: Here's how I think of it. You can break it into two triangles, one with base $7$, hypotenuse $L_1$ and angle $\theta \neq 0$ and a second triangle of height $9$, hypotenuse $L_2$ and identical angle $\theta$. (Depending on where you put theta) you get the equations $$\cos(\theta)=\frac{7}{L_1}$$ and $$\sin(\theta)=\frac{9}{L_2}$$ use these two equations to get $L = L_1+L_2$. You can minimize $L$ and get your answer.
A: So you have: $l$ is the length of the ladder, and $\theta$ is the angle between the ladder and the wall atop the T of the junction.
Find the minimum of $\;l = 9\csc \theta + 7\sec \theta\;$ for $\;\theta\in (0;\pi/2)\;$ .   This will be the longest ladder which can navigate the corner.   (Any longer and it cannot pass the narrowest part of the turn.)
$$\begin{align}
l & =\min_{\theta\in(0;\pi/2)}\left( \frac 9 {\sin\theta} + \frac 7 {\cos\theta}\right)
\\[2ex]
& \boxed{\begin{align}
 0 & = \frac{-9\cos\theta}{\sin^2\theta}+\frac{7\sin\theta}{\cos^2\theta}
\\[1ex] 0 & = -9\cos^3 \theta + 7 \sin^3 \theta
\\[1ex] \tan^3 \theta & = 9/7
\\[1ex] \theta & = \arctan\sqrt[3]{\tfrac 97}
\end{align}}
\\[2ex] l & = \frac 9{\sin\arctan\sqrt[3]{\tfrac 97}}+\frac 7{\cos\arctan\sqrt[3]{\tfrac 97}}
\\[1ex] & = (3 \sqrt[3]{21}+7) \sqrt{1+3 \sqrt[3]{\tfrac 3{7^2}}}
\end{align}$$
