We generalized the mKdV equation such that the static equations included the sn differential equation. As a result, a good correspondence was obtained between the KdV and mKdV equations. For the general genus two hyperelliptic curves, we obtained differential equations for the Weierstrass-type and Jacobi-type hyperelliptic functions. Considering the special case of λ6 = 0, λ0 = 0, the Weierstrass-type and Jacobi-type hyperelliptic functions are different solutions to the same hyperelliptic differential equations. These solutions are then connected via a special Sp (4, R) Lie group transformation.