Direct derivatives implementation