Choosing unit vectors for harmonic motion problems

Consider a vertical pendulum affected by gravity (See the pdf file i included). Now i can choose two different opposite directions for my unit vectors which give me different equations.
$$\downarrow : m\ddot x = mg-kx$$
$$\uparrow : m\ddot x = kx-mg$$
Which of course makes perfect sense, changing direction changes the sign. The problem is now if i want to solve them the second case yields a weird result.

so in the first case the (real) solution would be (if we set ##\omega _n^2 = \frac{k}{m}##)
$$x = Acos(\omega _n t )+ Bsin(\omega _n t) + \frac{mg}{k}$$
and for the second case
$$x = Ae^{\omega _n t} + Be^{-\omega _n t} +\frac{mg}{k}$$

So what I'm wondering why i would get a different solution just by changing the direction of the unit vector and how i can reconcile the approaches or know how i should choose the direction of my unit vectors.

Attachments

• Springh.pdf
7.1 KB · Views: 170

PeroK
$$\downarrow : m\ddot x = mg-kx$$
$$\uparrow : m\ddot x = kx-mg$$
$$\uparrow : m\ddot x = -kx-mg$$