Fixed derivative for not Interrval()
Added tests