The condition of SHM is stated below,
Acceleration is directly proportional to negative of displacement of particle.
If ‘ ‘ is the acceleration,
is the displacement
Then, for Simple Harmonic Motion,
where
is constant
(a)
This is in the form of
Therefore, this is SHM
(b)
It is clear it is not SHM