[Math] how to solve $\frac{d^2y}{dx^2}=-ky$

calculusordinary differential equations

I read this question in my math textbook. But even its solution I can't even understand. This is in the introduction to differential equation. So I have't yet learnt any formal way to solve DE.

$$\frac{d^2y}{dx^2}=-ky$$
Step 1 (Multiply each side by $2\frac{dy}{dx}$):
$$2\frac{d^2y}{dx^2}\frac{dy}{dx}=-2ky\frac{dy}{dx}$$
Step 2 (Integrate both sides) And somehow get:
$$(\frac{dy}{dx})^2=-ky^2+C$$
Step 3 I don't know. Are you supposed to take the square root?

I am confused as how the author get from Step 1 to Step 2. I know for the right hand side, he integrate with respect to $y$. But what happen the left hand side? And how do you solve the rest of it?

Best Answer

$$y'' + ky = 0$$

The characteristic equation reads

$$\lambda^2 + k = 0$$

Hence

$$\lambda_{1, 2} = \pm i\sqrt{k}$$

hence the solution follows

$$y(x) = C_1 e^{-i\sqrt{k}x} + C_2 e^{ i \sqrt{k}x}$$

Or if you prefer

$$y(x) = C_1 \cos\sqrt{k}x + C_2 \sin\sqrt{k}x$$

Related Question