# Can we represent Simple Harmonic function as triangular waves?

Having studied the topic recently I found out that simple harmonic motion can represented well with sine and cosine functions.Take for example a pendulum swing which could look like :

and the equations governing the motion would be

So I've been wondering why can't simple harmonic motion be represented in form of triangular waves.Although the equations above involve angular momentum so I may be contradicting myself but fundamentally the velocity time is sine function :

$$-\sin(x)$$

and the gradient represents the acceleration is non-uniformly increasing and decreasing.

What if instead of that you use

$$-(\arcsin(\sin(x))$$

Which would represent a triangular wave whose gradient would depict that the acceleration is uniformly accelerating and decelerating.So would this represent harmonic motion or is it fundamentally incorrect.

Harmonic motion in physics isn't so much defined by a periodic solution as it is defined by a certain differential equation. The equation for the harmonic oscillator is $$\ddot{x} + kx = 0,$$ where $k$ is some constant. The general solution to this equation can be written $$x(t) = A \sin(\sqrt{k}t) + B \cos(\sqrt{k}t),$$ where $A$ and $B$ depend on the initial conditions.

Sines and cosines simply fall out naturally from the basic equation. Triangle waveforms, on the other hand, are not even differentiable at kinks, so they are not so naturally governed by a differential equation.

This is not possible, as you will see if you derive simple harmonic motion from first principles. The defining equation of simple harmonic motion is: $$\ddot x \propto -x$$ This is linked closely to Hooke's Law, where $F = -kx$, where $F$ is the restoring force, $k$ is the spring constant, and $x$ is the extension from the equilibrium position. So, by considering this to be a case of Hooke's Law, by noting Newton's 2nd Law, we can rewrite this as: $$\ddot x + \frac {k}{m} x = 0$$ This is a second order linear differential equation. Let's solve it:

The complementary function, $x_{CF}$, takes the form $e^{\lambda t}$.

Homogenous Equation: $$\lambda^2 e^{\lambda t} + \frac {k}{m} e^{\lambda t} = 0$$ $$\lambda^2 + \frac {k}{m} = 0$$ $$\lambda = \pm i \sqrt{\frac {k}{m}}$$ $$\therefore x_{CF} = A \cos{\sqrt{\frac {k}{m}}t} + B \sin{\sqrt{\frac {k}{m}}t}$$

Particular integral, $x_{PI} = 0$

So: $$x = A \cos{\omega t} + B \sin{\omega t}$$ Where $\omega = \sqrt{\frac {k}{m}}$

$A$ and $B$ are found by taking boundary conditions, e.g. At $t = 0, x = x_0$

Therefore, simple harmonic motion must take the above form. The value for $\omega$ will vary depending what physical model for simple harmonic motion you derive from, but the condition $\ddot x \propto -x$ must be true.

Note, by considerations in trigonometry, the above equation can be written in alternative forms: $$x = P\cos{(\omega t + \alpha)}$$ $$x = Q\cos{(\omega t + \beta)}$$