The variable $book_term_id
has not been set. You either need to pass it to your function or set it in your function.
Pass it to your function:
<?php dropdown($book_term_id); ?>
Set it in your function:
function dropdown(){
$book_term_id = 5; // if a global variable, you can just use: global $book_term_id;
$dropdown = array(
'child_of' => $book_term_id,
'hide_empty' => 0
)
wp_dropdown_categories( $dropdown );
}