`dep` is a polymorphic: it's a list of dependent variables (if given) or the value of n (if it's an integer). So to find the second derivative you can do `idiff(expr, y, x, 2)` or if there are other variables that should be implicitly differentiated, `ideff(expr, y, x, [a, b, c], 2)`.