Implicit differentiation question with a ladder and a house. A $13$ ft ladder is leaning against a house when its base starts to slide away from the house, at the instant when the base is $12$ ft from the house, the base is moving at a rate of $5$ ft/sec.
Question:
Let $ \theta $ be the angle between the ladder and the ground. at what rate is $\theta$ changing when the base is $12$ ft form the house?
I said $ \tan (\theta) = y x^{-1} $ then used implicit differentiation to take the derivative with respect to time.
\begin{align*}
\frac{d \theta}{dt} \sec^{2} (\theta) &= \frac {dy}{dt}\left( \frac {dx}{dt} -x^{-2} \right)\\
\implies\frac{d \theta}{dt} &= \cos^{2}(\theta) \left(\frac {dy}{dt} \left( \frac {dx}{dt} -x^{-2}\right) \right)
\end{align*}
Does this make sense or did I mess something up?
 A: Yes, you did mess something up. You've got the correct equation $\tan(\theta)=yx^{-1}$, and then you correctly decided to take the derivative of both sides with respect to time $t$, whence you obtained

$$\frac{d\theta}{dt}\sec^{2}(\theta)=\frac{dy}{dt}\left(\frac{dx}{dt}-x^{-2}\right).$$

Here's the problem: the left-hand side here is correct, but the right-hand side isn't. Do it again and carefully apply the Product Rule to the left-hand side:
$$\frac{d}{dt}\left(yx^{-1}\right)=\frac{d}{dt}\left(y\right)\cdot x^{-1}+y\cdot\frac{d}{dt}\left(x^{-1}\right)=\cdots$$
One more hint: you'll also have to set up the Pythagorean Theorem and apply the same procedure to it in order to find the numerical value of $dy/dt$ at the given time (when $dx/dt=5$).
A: With $\theta = \arctan \frac{y}{x}$ we get 
$$d \theta =d \arctan \frac{y}{x} = \frac{ d (\frac{y}{x})}{1+ (\frac{y}{x})^2}= \frac{ x \cdot d y - y \cdot d x}{x^2 + y^2}$$
Now use $x^2 + y^2 = l^2= $ const. and get 
$$ x dx + y d y = 0$$
Substituting from this $d y = -\frac{x}{y} dx$ into the first equality we get
$$ d \theta = \frac{ - \frac{x^2}{y} dx  - y dx}{x^2 + y^2} = -\frac{d x}{y}$$
Note that this is the result we would get if we looked at the angle formed with the wall, approximated the angle with the tangent, and assumed that only the bottom part is moving. 
