A differential equation and coordinate geometry problem 
If the normal drawn to a curve at any point P intersects the x-axis at G and the perpendicular from P on
the x-axis meets at N, such that the sum of the lengths of PG and NG is proportional to the abscissa of
the point P, the constant of proportionality being k. Form the differential equation and solve it to show
that the equation of the curve is,
$$y^2=cx^{\frac{1}{k}}-\frac{k^2\cdot x^2}{2k-1}; \text{ or }y^2=\frac{k^2\cdot x^2}{2k+1}-cx^{-\frac{1}{k}}$$
where $c$ is an arbitrary constant

What I did was pretty simple: I drew a diagram and then used the formula for the tangent($PG=y \csc(\theta)$), subtangent($y\cot(\theta)$) and subnormal($y\tan(\theta)$)(where $\tan(\theta)=y'|_P$) and I was left with this DE
$$\frac{\sqrt{1+y'^2}}{y'}\cdot y +(y'+\frac{1}{y'})y=kx\\ \Rightarrow \frac{\sqrt{1+y'^2}}{y'}\cdot y +(\frac{1+y'^2}{y'})y=kx$$
I am pretty much stuck at this point, I got to an answer but it didn't match the answer and I figured it was all wrong anyway due to a mistake at the beginning. There are no standard forms that I can see which lead to simpler solutions.

EDIT: Many are saying that $\tan(\theta)\neq y'$ but I have by definition defined that $y'=\tan(\theta)$.Here's the type of diagram I have in mind

 A: There is an issue with your definition of $\tan(\theta)$ and it should be as Jean Marie mentioned above.
The differential equation that you need to solve is
$$|y|\sqrt{1+y'^2}+|yy'|=kx$$
Note that the lengths of $PG$ and $NG$ are non-negative.
I will consider the case $y,y'>0$. We have
$$y\sqrt{1+y'^2}+yy'=kx$$
Squaring both sides and using that $\sqrt{1+y'^2}=\frac{kx}{y}-y'$ we have
$$y^2\left(y'^2+1+y'^2+2y'\sqrt{1+y'^2}\right)=k^2x^2$$
$$y^2\left(1+\frac{2y'kx}{y}\right)=k^2x^2$$
$$2yy'kx+y^2=k^2x^2$$
$$2yy'+\frac{1}{kx}y^2=kx$$
Now substitute $u=y^2,du=2yy'dy$
$$u'+\frac{1}{kx}u=kx$$
Can you take it from here?
A: Let $G$ be the orthogonal projection of  $P$ onto the $x$ axis, and $\theta $ := polar angle of $GP$.
I agree with your equation that I prefer to write under the form:
$$\dfrac{y}{\sin \theta}+\dfrac{y}{\tan \theta}=kx \tag{1}$$
But after that I disagree because
$$\tan \theta = - \frac{1}{y'}$$
(a classical formula)
Besides, as $$\sin \theta = \dfrac{|\tan \theta|}{\sqrt{1+(\tan \theta)^2}}$$
(please note the use of absolute values), we obtain  the following differential equation:
$$|y|\sqrt{1+y'^2}+yy'=kx$$
