When the acceleration is a function of position use the following
$$ a(x) = \frac{{\rm d}v}{{\rm d}t} = \frac{{\rm d}v}{{\rm d}x} \frac{{\rm d}x}{{\rm d}t} = \frac{{\rm d}v}{{\rm d}x} u $$
$$ \int a(x)\,{\rm d} x = \int u\,{\rm d} u = \frac{1}{2} u^2 + K_1 $$
which is solved for $u(x)$.
The the position is found from
$$ t = \int \frac{1}{u(x)}\,{\rm d} x + K_2 $$
which is solved for $x(t)$.
Example
$$ a(x) = A\,x^{b} $$ $$ \int A\,x^{b}\,{\rm d} x = \frac{A}{b+1} \left( x^{b+1}-1\right) = \frac{1}{2} u^2 + K_1 $$
when $u=0$ at $x=0$ then $K_1 = \mbox{-} \frac{A}{b+1}$ or
$$ u(x) = \sqrt{\frac{2 A}{b+1} x^{b+1} } $$
Then
$$ t = \int \frac{1}{\sqrt{\frac{2 A}{b+1} x^{b+1} }}\,{\rm d} x + K_2 = \sqrt{ \frac{2(b+1)}{A (b-1)^2}} \left( x^{\mbox{-}\frac{b-1}{2}}-1\right) + K_2 $$
and when $x=0$, $t=0$ then $K_2 = \sqrt{ \frac{2(b+1)}{A (b-1)^2}}$ or
$$ t = \sqrt{ \frac{2(b+1)}{A (b-1)^2}} x^{\mbox{-}\frac{b-1}{2}} $$
$$ x(t) = \left( \frac{t}{\sqrt{ \frac{2(b+1)}{A (b-1)^2}}}\right) ^{\mbox{-} \frac{2}{b-1}} $$$$ x(t) = \left( \frac{t}{\sqrt{ \frac{2(b+1)}{A (b-1)^2}}}\right) ^{\mbox{-} \frac{2}{b-1}} = \left( \frac{A (b-1)^2}{2 (b+1)}\right)^{\mbox{-}\frac{1}{b-1}} \;t^\left({\mbox{-}\frac{2}{b-1}}\right)$$
If your mass was $m=1$ then $a=f(x)$ in graph and
$$ x=1.397882\, t^{3.058906} $$