Solving $y''-k^2y=0$ without substituting $e^{kx}$ As the title says I am trying to solve $y''-k^2y=0$. The method that I want to use is to assume $y'=p$ which gives us $y''=p\frac{dp}{dy}$. 
Substituting above values in original equation gives me $p\frac{dp}{dy}-k^2y=0$ which further reduces to $\frac{dy}{dx}=\sqrt{k^2y^2+c}$. On trying to solve this differential equation I am not reaching any close to the expected answer which should be summation of two exponential terms. 

$$\frac{dy}{dx}=\sqrt{k^2y^2+c}$$
with $c=k^2a$
$$\frac{dy}{dx}=|k|\sqrt{y^2+a}$$
Substitute $y=\sqrt a\sinh(t)$
$$\frac{dy}{dx}=|k|\sqrt{a\sinh^2(t)+a}=|k|\sqrt{a\cosh^2(t)}$$
$$\frac {\sqrt{a}\cosh(t)}{\cosh(t)}dt=|k|\sqrt{a}dx$$
$$\int dt=|k|\int dx$$
$$y(x)=\sqrt a \sinh(|k|x+K)$$
Using Euler's formula
$$y(x)=c_1e^{kx}+c_2e^{-kx}$$

You can also use the fact that
$$y''-k^2y=0$$
$$\frac {y''}y=k^2$$
This equation becomes a separable diff equation of first order
$$ \implies z'+z^2=k^2$$
$$  \int \frac {dz}{k^2-z^2}=\int dx$$
$$ \int \frac {dz}{k^2-z^2}=x+K_1$$
where $z=\frac {y'}y$
