设过点M(2,-2p)的切线方程为:y-(-2p)=k(x-2),即:y=kx-2k-2p代入抛物线方程x^2=2py得:x^2=2p(kx-2k-2p)=2pkx-4pk-4p^2x^2-2pkx+4pk+4p^2=0……(1)直线与抛物线相切,说明仅有一个交点,上式仅有一个实数△=(-2pk)^2-4(4pk+4p^2)=0,即:pk^2-4k-4p=0……(2)根据韦达定理:k1+k2=4/p……(3)方程(1)的唯一解x=-(-2pk)/(2*1)=pk代入抛物线方程x^2=2py得:y=(pk)^2/(2p)=pk^2/2……(4)由(2)和(4)得:y=(4k+4p)/2=2(k+p)……(5)设点A(x1,y1),点B(x2,y2),AB中点纵坐标为:y1/2+y2/2所以:6=y1/2+y2/2=(k1+p)+(k2+p)=k1+k2+2p……(6)由(3)和(6)得:4/p+2p=6解得p=1或者p=2故抛物线方程为:x^2=2y或者x^2=4y