Designing a 6V --> 40V step up converter
I would start with a selection site where you input the supply voltages and output currents and it makes recommendations based on that. The former Linear technology site is good for that (now run by Analog Devices): -



In the above picture I have pre-selected "External Power Switch Boost" (inside the red box) and added some values inside the purple box. The 2nd part in the list I chose based on what the front page of the data sheet indicated: -



As you can see, the input voltage can go down to 6 volts and the output can be up to 80 volts at 7 amps. All those numbers exceed your requirements so that design would work provided that your battery (6 volts to 8.4 volts) can supply the 100 watts of power needed.

Look at the graph on the right that shows efficiency versus load versus supply voltage. With a 6 volt supply you'll get 80 volts at about 1.7 amps. If you altered the FB voltage resistor divider, you'll get 40 volts and a similar power hence you should easily be able to achieve 2.4 amps at 40 volts.

But, don't stop there; check out other offered parts and see if the data sheet might give something that works down to maybe 5.8 volts. Cover the options. I chose non-synchronous converters in the above but try looking for synchronous converters too.

There are similar engines from TI but I find the one above to be easiest. Fly-back designs are also capable of giving you 100 watts but have maybe an efficiency of only 85%.