Linear Permutation of Grouped Things I can not search this over the internet so I thought some of you guys can help me out. The question goes like this. 

There are 15 books. Of these are 5 Mathematics, 7 Physics, and 3 books on Chemistry. In how many ways can they be arranged in a shelf if the three subjects are to be grouped together? 

P.S. I tried the using the permutation formula involving identical elements. But it's not arriving to the right answer in my book. Thanks in advance.
It doesn't seem like the permutation formula involving identical elements should apply here -- after all, the different Mathematics books are not identical. None of the fifteen books are identical.

I think the best way to think about this question is as follows: since each group must remain together, first choose the order of the groups, then choose the order within each group.
The number of ways of each books can be arranged is: $5!\times7!\times3!$ = $3628800$. The number of ways the subjects (group) can be arranged is: $3! = 6$.

Multiply both results = $21772800$.