I am currently working on a problem where a particle of mass $m$ can move along the x-axis with no friction. The particle is moving in a gravitational field and the potential energy is given by:
$$E_{pot(x)}=-2Cm\frac{1}{\sqrt{x^2+(ab)^2}}$$
I want to find the equation of motion for this particle by using the law of conservation of energy.
$$E_{pot(x)}+E_{kin(\dot{x})}=constant$$
$$\iff -2Cm\frac{1}{\sqrt{x^2+(ab)^2}}+\frac{1}{2}m(\dot{x})^2=constant$$
I didn't know how to deal with the constant term so I just used the fact that the derivative of any constant is $0$ and differentiated both sides.
$$\implies \frac{\partial}{\partial x}(-2Cm\frac{1}{\sqrt{x^2+(ab)^2}})+\frac{\partial}{\partial x}(\frac{1}{2}m(\dot{x})^2)=0$$
$$\iff Cm\frac{2x\color{red}{\dot{x}}}{(\sqrt{x^2+(ab)^2})^3}+m\dot{x}\color{red}{\ddot{x}}=0$$
Question 1: Am I differentiating correctly here? I am not sure if I have to implicitly differentiate $x$ and $\dot{x}$
Question 2: Does my approach even make sense or am I just wasting my time here?
Edit:
$$m\dot{x}\space (\ddot{x}+\frac{C}{(x^2+(ab)^2)^\frac{3}{2}}x)=0$$
$$\iff \ddot{x}+\frac{C}{(x^2+(ab)^2)^\frac{3}{2}}x=0$$