We study joint nonparametric estimators of the mean and the dispersion functions in extended double exponential family models. The starting point is the exponential family and the generalized linear models setting. The extended models allow for both overdispersion and underdispersion, or even a combination of both. We simultaneously estimate the dispersion function and the mean function by using P-splines with a difference type of penalty to avoid overfitting. Special attention is given to the smoothing parameter selection as well as to implementation issues. The performance of the method is investigated via simulations. A comparison with other available methods is made. We provide applications to several sets of data, including continuous ...