In the Short Term:
The battery in the iPhone 3G does not last as long as most would want, but there are some ways to extend the duration of use each charge gives you...
- Turn off push email and use the fetch tool instead, preferably only every hour (this will save heaps of battery).
- Turn off 3G when not needed (Settings>General >Network).
- Cut down your time watching videos (or listening to music).
- Reset iPhone every now and then. This will eliminate applications that have hung or are otherwise using battery.
- Turn down the LCD (Go to-Settings>Brightness)
- Turn Wi-Fi new network scanning off or Wi-Fi itself completely off.
- When playing games turn the vibrate function off (if you can) and avoid playing 3D games altogether.
- Avoid using GPS tracking excessively.
- Set the Autolock to less than 10 minutes (preferably only 1 minute). This will stop things happening when you forget to lock your iPhone and chuck it in your handbag or pocket.
- Turn off Bluetooth.
- Use Airplane Mode in low or no coverage areas.
- Turn off EQ when listening to music.
If you use a few of these tips you should be able to get at least 1-2 days of solid use out of your iPhone 3G.
In the Long Term
To ensure your battery lasts a few years ensure that (as Apple recommends) at least once per month you charge your iPhone to 100% and then completely run it down.
Replacing your iPhone 3G Battery
Your one-year warranty includes replacement for a defective battery. You can extend your coverage to two years from the date of buying your iPhone with the AppleCare Protection Plan. During the plan’s coverage time, Apple will replace the battery if it drops below 50% of its original capacity.
If your iPhone 3G is out of warranty, Apple offers a battery replacement for $79, plus $6.95 shipping, subject to local tax. Apple states on their website that they will "dispose of your battery in an environmentally friendly manner".