I try to reconstruct a camera of a video sequence via match moving techniques. After the reconstruction process all seemed to work as expected, but then I've realized my camera is moving forward instead of zooming into the 3d-scene like this:

Every dot of the path represents the position of the camera in 3d space (Frame 1 to 40)
I know that (initial situation):
- focal length is 35mm at frame 1
- focal length is 85mm at frame 40
- the distance to the object is 0.8m
When I try to animate this values by hand (see the image below) it is unfortunately not accurate enough, because of the camera man's delay in turning the lens.

Desired effect (Frame 1 to 40)
Is it mathematically possible to convert the camera motion into a zoom to get the correct focal length for every single frame?
A point to start with or any suggestions would be appreciated.
in short
You can calculate the focal length of the zooming camera $f_z$ $$ f_z = \frac{d_z f_m}{d_m} $$ with $d_z$ the distance to the object from the zooming camera. $f_m$ represents the focal length of the the moving camera and $d_m$ represents the distance to the object from the moving camera.
explanation
You can use the magnification formula to calculate the magnification $m$ with the focal length $f$ and the distance to the object $d$. $$ M = \frac{f}{d - f} $$ While you want to have the same magnification for the camera in motion and the camera in zooming mode $m_m = m_z$ the equation will look like this: $$ \frac{f_m}{d_m - f_m} = \frac{f_z}{d_z - f_z} $$ Solving this for $f_z$:
$$ f_z = \frac{d_z f_m}{d_m} $$
example
So if the camera that should zoom has a distance to the object of $800mm$ and the camera that is in motion has a focal length of $35mm$, the focus length of the zooming camera is $$f_z = \frac{800mm \times 35mm}{d_m}$$ while $d_m$ is the distance to the object from the moving camera in the current frame.