  We use metric formalism in $f(R)$ modified gravity to study the dynamics of
various systems from the solar system to the cosmological scale. we assume an
ansatz for the derivative of action as a function of distance and describe the
Pioneer anomaly and the flat rotation curve of the spiral galaxies. Having the
asymptotic behavior of action, we propose the action of $f(R) = (R + \Lambda)(1
+ \ln(R/R_c)/(R/R_0 + 2/\alpha))$ where in galactic and solar system scales it
can recover our desired form. The vacuum solution of this action also results
in a positive late time acceleration for the universe. We fix the parameters of
this model, comparing with the Pioneer anomaly, rotation curve of spiral
galaxies and Supernova Type Ia gold sample data.
