With the release of iOS8 Apple allowed third parties to make keyboards that can be installed on your iPad. If you are a science teacher, or for some other reason need to type subscripts or superscripts, one of the easiest ways to do this now, is to install Chemistry Keyboard ($3.79) Whenever you need to type a chemical formula (in any app), you can click the globe icon (to the left of the space bar in the default keyboard) to switch to Chemistry Keyboard. Within Chemistry Keyboard, if you press and hold on a number key, a pop-up gives you the option for superscript and subscript variants of the number. Slide your finger to the one you want, and it’s inserted at the cursor. Simple. Tap the globe icon again, and you are back in the default Apple keyboard.