If you only know a(x), you can use the following:
[tex]\frac{dv}{dt} = \frac{dv}{dx}\frac{dx}{dt} = v \frac{dv}{dx} = a(x)[/tex]
Then:
[tex]\int v dv = \frac{v^2}{2}= \int a(x) dx[/tex]
After integrating, this can be solved for v(x). Then:
[tex]\frac{dx}{dt} = v(x)[/tex]
[tex]\int dt = t = \int \frac{dx}{v(x)}[/tex]
After integrating, this gives t(x), which can then be inverted to give x(t). This procedure can be complicated and mathematically difficult, but it will work, at least numerically.