Period of an Oscillating Particle

A particle oscillates with amplitude A in a one-dimensional potential that is symmetric about x=0. Meaning U(x)=U(-x)

First find velocity at displacement x in terms of U(A), U(x), and m.

Then show that the period is given by ##4\sqrt{\frac{m}{2U(A)}}\int_0^A \frac{1}{1-\frac{U(x)}{U(A)}}dx##
(hint: ##dt=\frac{dx}{v}##)2. Relevant equations

Total energy = ##U(x) + \frac{1}{2}mv^2##
Period = time it takes to complete an oscillation

I found velocity by noting that at x=A, all the energy is potential, so total energy of the system (which doesn't change) is U(A), so we can set up the equation:

##U(A)=U(x)+\frac{1}{2}mv^2## and solving for v we get:

##v=x'=\sqrt{\frac{2(U(A)-U(x))}{m}}##.

3. The attempt at a solution

Now I was thinking we could multiply the velocity at x=0 by Δt, then do v(0)Δt+v(Δt)Δt, and then v(0)Δt+v(Δt)Δt+v(2Δt)Δt and so on and so forth... this will help us find how far the particle has traveled at any time t. But obviously the right way to do the above process is by integrating our ##v## equation with respect to time, which will give us distance traveled over that time which will let us know how long it takes to travel A distance (1/4 of an oscillation).

##\int_0^t v dt = \int_0^t \sqrt{\frac{2(U(A)-U(x))}{m}}dt##

But we know ##\frac{dx}{dt}=v## so we can write ##dt=\frac{dx}{v}##...

"Period" is the time it takes for the particle to make one cycle. The particle traveling from 0 to A takes 1/4 of the time it would take to travel the whole period.

But I don't see how we can find the time it takes the particle to travel from 0 to A? We have this equation that gives us time:

##\int \sqrt{\frac{m}{2(U(A)-U(x))}}dx = t##

... but I don't get what the left hand side is a function of? Like how would I plug in A to the LHS without having to evaluate that integral?

Apparently the answer might be to make it a definite integral we would have to make both sides of ##\int \sqrt{\frac{m}{2(U(A)-U(x))}}dx = \int dt## definite integrals and I don't understand what the boundaries on both sides would be... Would we have to make them match up somehow? But the right hand side is a function of x and the LHS is a function of t...?