So, the problem I have run into is that my solution, although I see no errors, does not match the professors; however the two equations are VERY similar yet completely different and I was wondering if you guys could shed some insight.John lives 2 miles north from a road, which is separated from John's house by a grove. If he walks from his house to the road along any straight line, the last mile of his walk is through the grove. Find the shape of the grove by describing its northern boundary by an equation.
My Approach
I looked at the question geometrically. So what we would have is for any given theta is
Where $L$ is the length of the path he took. So then if we set the road to be the x-axis and Johns house to be the point $(0, 2)$ to get the y-coordinate we need to find the difference in the lengths of the vertical legs of these two similar triangles. Well we know that $$L=\frac{2}{\cos\theta}$$ And the difference in height of the similar triangles which we'll call $y=f(\theta)$ is given by $$f(\theta)=2-(L-1)\cos\theta$$ $$=2-(\frac{2}{\cos\theta}-1)\cos\theta=\cos\theta$$ Then finally to get the equation in terms of $x$ and $y$ we know that $\theta=\arctan(\frac{|x|}{2})$ and since $\arctan$ is an odd function $\theta=\pm \arctan(\frac{x}{2})$. Therefore the equation is $$f(x)=\cos[\pm\arctan(\frac{x}{2})]=\cos[\arctan(\frac{x}{2})]$$ Note: removing the $\pm$ can be done since $\cos$ is an even function.
Professor's Solution
Let the road be the line $x=0$ and John's house be at the point $(0,2)$. Assume that he walks on the line $y=2-2x/a$, for some real $a$. Its x-intercept is $a$. The point where the grove begins has coordinates $$(a-\frac{a}{\sqrt{a^2+4}}, \frac{2}{\sqrt{a^2+4}})$$ which gives a parametric equation of the curve. We can solve for $a$ in terms of $y$: $$a=2y^{-1}\sqrt{1-y^2}$$ for $y>0$. Thus $$x=(2y^{-1}-1)\sqrt{1-y^2}$$ for $y>0$. So the equation is $$x^2y^2=(2-y)^2(1-y^2)$$ (for the component for $y>0$).
Question
So as you can see we got different answers, however if you graph the two different equations they are very close

Because of this I was wondering if you guys could 1) explain whos right, because I can't see whats wrong with my work and 2) if someone is right, is it just a coincidence that these two equations are so similar?
Your solution is wrong, because the $x$ in $\tan\theta=x/2$ is not the abscissa of the point on the curve, but rather of the point on the $x$ axis at the end of the straight path. You should take instead: $$ \tan\theta={x\over 2-y} $$ and remembering that $\cos^2\theta=1/(1+\tan^2\theta)$ you can readily recover your professor's solution.