Let mg be the weight of each book

let t be the thichness of each book.

The 1st book is aready on the table, so no work needs to be done.

The 2nd book has to be lifted through a height of t to beplaced on top of the 1st book.

The 3rd book has to be lifted through a height of 2t to beplaced on top of the 2nd book. etc.

The general case can be given as,

\(\displaystyle{W}_{{1}}={m}{g}\times{t}\)

\(\displaystyle{W}_{{2}}={m}{g}\times{2}{t}\)

\(\displaystyle{W}_{{3}}={m}{g}\times{3}{t}\)

\(\displaystyle{W}_{{{n}-{1}}}={m}{g}\times{\left({n}-{1}\right)}{t}\)

So, if you have n books, of thickness t, then the work done inlifting (n-1) of them on top of each other is given by,

\(\displaystyle{W}={m}{>}{\left({1}+{2}+{3}+\ldots+{\left({n}-{1}\right)}\right)}\)

You have a simple summation of the 1st (n-1) integers which is \(\displaystyle{\frac{{{1}}}{{{2}}}}{\left({n}-{1}\right)}{n}\) so,

\(\displaystyle{W}={\frac{{{1}}}{{{2}}}}{m}{>}{\left({n}-{1}\right)}{n}\)

\(\displaystyle{m}{g}={30}{N}\)

\(\displaystyle{t}={0.04}{m}\)

\(\displaystyle{n}={6}\)

\(\displaystyle{W}={\frac{{{1}}}{{{2}}}}\times{30}\times{0.04}\times{5}\times{6}\)

\(\displaystyle{W}={15}\times{0.2}\times{6}\)

\(\displaystyle{W}={18}{J}\)

let t be the thichness of each book.

The 1st book is aready on the table, so no work needs to be done.

The 2nd book has to be lifted through a height of t to beplaced on top of the 1st book.

The 3rd book has to be lifted through a height of 2t to beplaced on top of the 2nd book. etc.

The general case can be given as,

\(\displaystyle{W}_{{1}}={m}{g}\times{t}\)

\(\displaystyle{W}_{{2}}={m}{g}\times{2}{t}\)

\(\displaystyle{W}_{{3}}={m}{g}\times{3}{t}\)

\(\displaystyle{W}_{{{n}-{1}}}={m}{g}\times{\left({n}-{1}\right)}{t}\)

So, if you have n books, of thickness t, then the work done inlifting (n-1) of them on top of each other is given by,

\(\displaystyle{W}={m}{>}{\left({1}+{2}+{3}+\ldots+{\left({n}-{1}\right)}\right)}\)

You have a simple summation of the 1st (n-1) integers which is \(\displaystyle{\frac{{{1}}}{{{2}}}}{\left({n}-{1}\right)}{n}\) so,

\(\displaystyle{W}={\frac{{{1}}}{{{2}}}}{m}{>}{\left({n}-{1}\right)}{n}\)

\(\displaystyle{m}{g}={30}{N}\)

\(\displaystyle{t}={0.04}{m}\)

\(\displaystyle{n}={6}\)

\(\displaystyle{W}={\frac{{{1}}}{{{2}}}}\times{30}\times{0.04}\times{5}\times{6}\)

\(\displaystyle{W}={15}\times{0.2}\times{6}\)

\(\displaystyle{W}={18}{J}\)