
Let a 1-dimensional force continuous, bounded and integrable
\begin{equation}
0<f\left(x\right)<+\infty\:, \qquad 0<\int\limits_{\xi=0}^{\xi=x}f\left(\xi\right)\mathrm{d}\xi<+\infty\:, \qquad\forall x \in \mathbb{R}^{+}
\tag{01}
\end{equation}
acting on a particle initially at rest on the origin with rest mass $\;m_{0}$, see Figure. On one hand we have
\begin{equation}
\mathrm{d}\left(mc^2\right)=f\left(\xi\right)\mathrm{d}\xi=\mathrm{d}\mathrm{W}\left(\xi\right)
\tag{02}
\end{equation}
so integrating and considering the initial conditions
\begin{equation}
m\left(x\right)=m_{0}+\dfrac{1}{c^{2}}\int\limits_{\xi=0}^{\xi=x}f\left(\xi\right)\mathrm{d}\xi=m_{0}+\dfrac{1}{c^{2}}\mathrm{W}\left(x\right)
\tag{03}
\end{equation}
where
\begin{align}
\!\!\!\!\!\!\!\!\!\!\!\!W(x) & =\int\limits_{\xi=0}^{\xi=x}f\left(\xi\right)\mathrm{d}\xi=\text{work done by force $f(x)$ from $0$ to $x$} \quad [W(x)> 0\:\: \forall x>0]
\\
&=\left(m-m_{0}\right)c^{2}=\text{kinetic energy of the particle}
\tag{04}
\end{align}
and on the other hand
\begin{equation}
f=\dfrac{\mathrm{d}p}{\mathrm{d}t}=\dfrac{\mathrm{d}\left(mv\right)}{\mathrm{d}t} =m\dfrac{\mathrm{d}v}{\mathrm{d}t}+v\dfrac{\mathrm{d}m}{\mathrm{d}t}
\tag{05}
\end{equation}
so
\begin{equation}
f\left(x\right)\mathrm{d}x=\frac12 m\,\mathrm{d}v^{2}+v^{2}\mathrm{d}m
\tag{06}
\end{equation}
Replacing in (06) the term $\,\mathrm{d}m\,$ by its expression from (02)
\begin{equation}
f\left(x\right)\mathrm{d}x=\frac12 m\,\mathrm{d}v^{2}+\dfrac{v^{2}}{c^{2}}f\left(x\right)\mathrm{d}x
\tag{07}
\end{equation}
so
\begin{equation}
\dfrac{f\left(x\right)\mathrm{d}x}{m}=\frac12\dfrac{\mathrm{d}v^{2}}{\left(1-\dfrac{v^{2}}{c^{2}}\right)}
\tag{08}
\end{equation}
Inserting the expression (03) for $\,m\,$ and replacing $\,f\left(x\right)\mathrm{d}x \rightarrow \mathrm{d}\mathrm{W}\left(x\right)\,$ we reach the following differential equation with respect to the separated variables $\,x\,$ and $\,v^{2}\,$
\begin{equation}
\dfrac{\mathrm{d}\mathrm{W}\left(x\right)}{\left[m_{0}c^{2}+\mathrm{W}\left(x\right)\vphantom{\frac12}\right]}=\frac12\dfrac{\mathrm{d}\left(\dfrac{v^{2}}{c^{2}}\right)}{\left(1\!-\!\dfrac{v^{2}}{c^{2}}\right)}
\tag{09}
\end{equation}
or
\begin{equation}
\dfrac{\mathrm{d}\left[m_{0}c^{2}+\mathrm{W}\left(x\right)\vphantom{\frac12}\right]}{\hphantom{\mathrm{d}}\left[m_{0}c^{2}+\mathrm{W}\left(x\right)\vphantom{\frac12}\right]}=-\frac12 \dfrac{\mathrm{d}\left(1\!-\!\dfrac{v^{2}}{c^{2}}\right)}{\hphantom{\mathrm{d}}\left(1\!-\!\dfrac{v^{2}}{c^{2}}\right)}
\tag{10}
\end{equation}
that is
\begin{equation}
\mathrm{d}\left(\ln\left[m_{0}c^{2}+\mathrm{W}\left(x\right)\vphantom{\tfrac12}\right]\vphantom{\frac12}\!\!\right)= \mathrm{d}\left[\ln\left(1\!-\!\dfrac{v^{2}}{c^{2}}\right)^{-\frac12}\vphantom{\frac12}\!\!\right]
\tag{11}
\end{equation}
Considering the initial conditions the integration of (11) yields
\begin{equation}
m_{0}c^{2}+\mathrm{W}\left(x\right)=m_{0}c^{2}\left(1\!-\!\dfrac{v^{2}}{c^{2}}\right)^{-\frac12}
\tag{12}
\end{equation}
From equations (12) and (03)
\begin{equation}
m\left(\upsilon\right)=\dfrac{m_{o}}{\sqrt{1-\dfrac{\upsilon^{2}}{c^{2}}}}
\tag{13}
\end{equation}
while solving (12) with respect to $\,v\,$ we have its following expression as function of $\,x\,$
\begin{equation}
v\left(x\right)=c\sqrt{1\!-\!\left[\dfrac{m_{0} c^{2}}{m_{0}c^{2}+\mathrm{W}\left(x\right)}\right]^{2}}
\tag{14}
\end{equation}
Since $\,\mathrm{W}\left(x\right)\,$ is a positive increasing function of $\,x\,$ and
\begin{equation}
\lim_{x\rightarrow +\infty}\mathrm{W}\left(x\right)=+\infty
\tag{15}
\end{equation}
we have
\begin{equation}
\lim_{x\rightarrow +\infty}v\left(x\right)=c \:, \qquad 0<v\left(x\right)<c \quad \forall x \in \mathbb{R}^{+}
\tag{16}
\end{equation}
If we want to find the position as function of time, that is $\,x\left(t\right)\,$, then from equation (14) given that $\,v\left(x\right)=\mathrm{d}x/\mathrm{d}t\,$, we have after separation of the variables $\,x\,$ and $\,t\,$
\begin{equation}
\left(1\!-\!\left[\dfrac{m_{0} c^{2}}{m_{0}c^{2}+\mathrm{W}\left(x\right)}\right]^{2}\right)^{-\frac12}\mathrm{d}x=c\,\mathrm{d}t
\tag{17}
\end{equation}
To have analytic solution depends upon the possibility of analytic integration of the function of the lhs of (17).
For example in case of constant force, $\,f\left(x\right)=f_{0}>0 \quad \forall x \in \mathbb{R}^{+}\,$, the analytic solution is(1)
\begin{equation}
x\left(t\right)=\dfrac{m_{o}c^{2}}{f_{0}}\left[\sqrt{1+\left(\dfrac{f_{0}t}{m_{o}c}\right)^{2}}-1\right]
\tag{18}
\end{equation}
(1)
See in my answer here :Inertia on relativistic mass when particle is near speed of light