SHM or simple harmonic motion is termed as the total energy that is executed by the particle which exhibits SHM( simple harmonic motion). Further, in simple words, simple harmonic motion is the total energy which is exhibited by the system of the block, equivalent to the potential energy stored in the spring and the addition of the kinetic energy. It is directly proportional to the amplitude of the Square.
To help you in understanding this concept in detail, simple harmonic motion can be given by the formulaÂ
 E = ½ (A2 – x2) + ½ 2x2
 The total energy present in the SHM of a particle is constant. It is not dependent on instantaneous displacement and the relationship between kinetic energy, simple harmonic motion, and the potential energy of SHM.Â
Total potential energy is given by ½ K  x2
Energy in simple harmonic motion
The addition of the potential energy and the kinetic energy is the total energy that is being present in simple harmonic motion,
below given is the formula of total energy in simple harmonic motion,
TE= KE + PEÂ
E = ½ mω2(A2)
In simple harmonic motion-
·    The total energy is directly proportional to the mass.
·    The total energy is directly proportional to the square of oscillations frequency.
·    The total energy is directly proportional to the osculation amplitude Square.
As we already know that the law of conservation of mass states that energy can neither be created nor destroyed; applying this law in simple harmonic motion will always be constant, but the potential and kinetic energy can be changed.
What is potential energy?
The energy stored in an object is considered potential energy; potential energy depends on the body’s position and various parts; a steel ball will have less potential energy when kept. Still, the potential energy will increase if we hold the steel ball at any height.
We can also convert potential energy into kinetic energy and even electrical energy,
Potential energy DefinitionÂ
potential energy can be defined as the potential energy with kinetic energy in mechanical energy. Its total will be gravitational energy which will be constant.Â
Gravitational potential energy
gravitational potential energy means that the energy possessed by any object relates to its position two others; gravitational potential energy can be calculated by multiplying the mass of an object by the distance from the point of reference.
Below is the potential energy formula of gravitation
GPE = mgh ( where M is the mass of the body in kilograms, G is the acceleration due to gravity, and H is the height of the body from the ground)
·    Here, M is the mass of any object in kilograms.
·    Here, G is the acceleration due to gravity, whose value is 9.8 meters per second.
·    Here, it is the height of the object from the ground.
Elastic potential energy-
Elastic potential energy is the force applied to deform an object. This process is hold defined as the force applied to any object until it gets removed and the shape gets its original shape; the ready formation of any object can include stretching or twisting.
Below, given is the formula of elastic potential energy-
F = k . x ( where F is the force, K is the constant, and delta X is the compressed or expanded length of the object)
Potential energy formula
Here we are going to discuss the formula of potential energy, and below given is the formula of the potential energy-
PE = mgh
·    Here, PE is the potential energy of an object.
·    M indicates the mass of a given body, written in kg.
·    G indicates the acceleration due to gravity which is 9.8ms/sec.
·    H is the height of the object.
Potential energy derivation-
Here, we are going to derive the formula for potential energy-
As we already know,
F=du/dx.
Du = -Fdx
 = –
Here the force which is acting upon the body can be written as,
F = mg ( where F is the force, M is the mass of the body and G is the acceleration due to gravity)
By substituting the values, we will get.
U = -[mg(h1-h2)]
U = [mg(h1-h2)] ( here, H1 is the height from the reference point, and H2 is the height of the object).
Conclusion
Potential energy of Simple Harmonic Motion can be defined as the energy which is being exhibited by any particle when it is stationary. The potential energy can be explicit into two types namely gravitational potential energy and elastic potential energy. The article comprise of all these quantities and the brief explanation about all these quantities. Further, we had discussed the derivation of simple harmonic motion potential energy, ½ K  x2 and its types you can check the article to get the information regarding this topic.